/* ═══════════════════════════════════════════════════════════
   frontend.css — Theme Editor frontend widget styles
   Încărcat doar când modulul homepage_designer este activ.
   ═══════════════════════════════════════════════════════════ */

/* ── Navigation Widget (CSS custom properties from inline style) ─ */
#hpNavCustom .navbar-nav .nav-link {
    color: var(--nav-link-color, #c2c7d0) !important;
    font-size: var(--nav-link-size, 14px) !important;
    font-family: var(--nav-link-font, inherit);
}
#hpNavCustom .navbar-nav .nav-link:hover,
#hpNavCustom .navbar-nav .nav-link:focus {
    color: var(--nav-link-hover, #ffffff) !important;
}
#hpNavCustom .navbar-nav .dropdown-item {
    font-size: var(--nav-link-size, 14px) !important;
    font-family: var(--nav-link-font, inherit);
}

/* ── Section / Column Layout ─────────────────────────── */
.hp-section { margin-bottom: 20px; }
.hp-section-columns { display: flex; flex-wrap: wrap; gap: 0; }
.hp-column { box-sizing: border-box; padding: 0 10px; }
.hp-column.hp-col-10  { flex: 0 0 10%; max-width: 10%; }
.hp-column.hp-col-20  { flex: 0 0 20%; max-width: 20%; }
.hp-column.hp-col-25  { flex: 0 0 25%; max-width: 25%; }
.hp-column.hp-col-33  { flex: 0 0 33.333%; max-width: 33.333%; }
.hp-column.hp-col-50  { flex: 0 0 50%; max-width: 50%; }
.hp-column.hp-col-66  { flex: 0 0 66.666%; max-width: 66.666%; }
.hp-column.hp-col-75  { flex: 0 0 75%; max-width: 75%; }
.hp-column.hp-col-80  { flex: 0 0 80%; max-width: 80%; }
.hp-column.hp-col-100 { flex: 0 0 100%; max-width: 100%; }
@media (max-width: 768px) {
    .hp-column { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* ── Footer Widget Layout ───────────────────────────── */
.ff-section { margin-bottom: 20px; }
.ff-columns { display: flex; flex-wrap: wrap; gap: 0; }
.ff-column { box-sizing: border-box; padding: 0 10px; }
.ff-column.ff-col-10  { flex: 0 0 10%; max-width: 10%; }
.ff-column.ff-col-20  { flex: 0 0 20%; max-width: 20%; }
.ff-column.ff-col-25  { flex: 0 0 25%; max-width: 25%; }
.ff-column.ff-col-33  { flex: 0 0 33.333%; max-width: 33.333%; }
.ff-column.ff-col-50  { flex: 0 0 50%; max-width: 50%; }
.ff-column.ff-col-66  { flex: 0 0 66.666%; max-width: 66.666%; }
.ff-column.ff-col-75  { flex: 0 0 75%; max-width: 75%; }
.ff-column.ff-col-80  { flex: 0 0 80%; max-width: 80%; }
.ff-column.ff-col-100 { flex: 0 0 100%; max-width: 100%; }
@media (max-width: 768px) {
    .ff-column { flex: 0 0 50% !important; max-width: 50% !important; }
    .ff-column.ff-col-100 { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* ── Slider Widget ──────────────────────────────────── */
.hp-widget-slider {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.hp-widget-slider .carousel-item {
    background-color: #fff;
    line-height: 0;
}
.hp-widget-slider .slider-img {
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Săgeți mai mari pe desktop (ca hero-slider din styles.css) */
.hp-widget-slider .carousel-control-prev,
.hp-widget-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}
.hp-widget-slider .carousel-control-prev {
    left: 20px;
}
.hp-widget-slider .carousel-control-next {
    right: 20px;
}
.hp-widget-slider .carousel-control-prev-icon,
.hp-widget-slider .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 25px;
    background-size: 55%;
    transition: background-color 0.2s;
}
.hp-widget-slider .carousel-control-prev-icon:hover,
.hp-widget-slider .carousel-control-next-icon:hover {
    background-color: rgba(0, 0, 0, 0.75);
}
@media (max-width: 768px) {
    .hp-widget-slider .slider-img { height: 300px; }
    .hp-widget-slider { border-radius: 0; box-shadow: none; }
    .hp-widget-slider .carousel-control-prev,
    .hp-widget-slider .carousel-control-next {
        width: 36px;
        height: 36px;
    }
    .hp-widget-slider .carousel-control-prev {
        left: 8px;
    }
    .hp-widget-slider .carousel-control-next {
        right: 8px;
    }
    .hp-widget-slider .carousel-control-prev-icon,
    .hp-widget-slider .carousel-control-next-icon {
        padding: 14px;
    }
}

/* ── Categories Widget ──────────────────────────────── */
.hp-cat-card {
    display: block; text-align: center;
    padding: calc(6px + var(--cat-img-size, 180px) * 0.04);
    background: #fff; border-radius: 10px;
    transition: all 0.2s; text-decoration: none; color: #333;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    flex: 0 0 auto;
    width: calc(var(--cat-img-size, 180px) + 28px);
}
.hp-cat-card:hover {
    border-color: #cbd5e0; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px); text-decoration: none; color: #333;
}
.hp-cat-img {
    width: var(--cat-img-size, 180px); aspect-ratio: 1 / 1;
    margin: 0 auto 8px; border-radius: 8px; overflow: hidden;
    background: #f8f9fa; transition: width 0.3s ease;
}
.hp-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.hp-cat-name {
    display: block; font-weight: 600;
    font-size: calc(8px + var(--cat-img-size, 180px) * 0.028);
    color: #333;
}
.hp-cat-flex-row { display: flex; gap: 16px; justify-content: center; }
.hp-cat-grid-wrap { flex-wrap: wrap; }
.hp-cat-slider-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 20px;
}
.hp-section-title {
    font-size: 22px; font-weight: 700;
    margin-bottom: 20px; text-align: center;
}
.hp-section-title-left {
    font-size: 22px; font-weight: 700;
    margin-bottom: 0; text-align: left;
}
.hp-cat-slider-arrows { display: flex; gap: 8px; }
.hp-slider-arrow {
    width: 36px; height: 36px; border: 1px solid #dee2e6;
    border-radius: 50%; background: #fff; color: #333;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.hp-slider-arrow:hover { background: #f8f9fa; border-color: #adb5bd; }
.hp-slider-arrow:focus { outline: none; }

/* ── Products Widget ────────────────────────────────── */
.hp-product-card {
    background: #fff; border: 1px solid #e9ecef;
    border-radius: 8px; overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex; flex-direction: column;
}
.hp-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.hp-product-link {
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit; flex: 1;
}
.hp-product-link:hover { text-decoration: none; color: inherit; }
.hp-product-img-wrap {
    position: relative; height: var(--prod-img-size, 200px);
    background: #f8f9fa; overflow: hidden;
}
.hp-product-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hp-badge {
    position: absolute; top: 8px; left: 8px;
    padding: 2px 8px; font-size: 12px; font-weight: 700;
    border-radius: 3px; color: #fff;
}
.hp-badge-sale { background: #dc3545; }
.hp-product-name {
    font-size: 14px; font-weight: 600;
    margin: 10px 10px 5px; line-height: 1.3;
    height: 2.6em; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; flex: 0 0 auto;
}
.hp-product-price { padding: 0 10px 12px; flex-shrink: 0; }
.hp-old-price {
    text-decoration: line-through; color: #6c757d;
    font-size: 12px; margin-right: 5px;
}
.hp-current-price { font-weight: 700; color: #28a745; font-size: 16px; }
.hp-prod-slider-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 20px;
}
.hp-prod-slider-arrows { display: flex; gap: 8px; }
.carousel .hp-product-card-slide { margin-bottom: 0; }
.hp-product-list {
    display: flex; flex-direction: column; gap: 12px;
}
.hp-product-list-item {
    border: 1px solid #e9ecef; border-radius: 8px; overflow: hidden;
    background: #fff; transition: box-shadow 0.2s;
}
.hp-product-list-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.hp-product-list-link {
    display: flex; align-items: center;
    text-decoration: none; color: inherit;
    padding: 12px; gap: 16px;
}
.hp-product-list-link:hover { text-decoration: none; color: inherit; }
.hp-product-list-img {
    width: var(--prod-img-size, 200px);
    height: var(--prod-img-size, 200px);
    flex-shrink: 0; border-radius: 6px; overflow: hidden;
    background: #f8f9fa;
}
.hp-product-list-img img { width: 100%; height: 100%; object-fit: cover; }
.hp-product-list-info { flex: 1; min-width: 0; }
.hp-product-list-name {
    font-size: 16px; font-weight: 600;
    margin: 0 0 6px; color: #333;
}
.hp-product-list-info .hp-product-price { padding: 0; }
.hp-add-to-cart-btn {
    display: block; width: calc(100% - 10px);
    margin: auto 5px 8px; padding: 6px 10px;
    font-size: 13px; font-weight: 600;
    border: 1px solid #007bff; border-radius: 4px;
    background: #007bff; color: #fff; cursor: pointer;
    text-align: center; transition: background 0.2s, border-color 0.2s;
}
.hp-add-to-cart-btn:hover { background: #0056b3; border-color: #0056b3; }
.hp-add-to-cart-btn i { margin-right: 4px; }
.hp-add-to-cart-btn-disabled {
    border-color: #6c757d; background: #6c757d;
    cursor: not-allowed; opacity: 0.65;
}
.hp-add-to-cart-list-btn {
    display: inline-block; margin-top: 8px;
    padding: 5px 14px; font-size: 13px; font-weight: 600;
    border: 1px solid #007bff; border-radius: 4px;
    background: #007bff; color: #fff; cursor: pointer;
}
.hp-add-to-cart-list-btn:hover { background: #0056b3; border-color: #0056b3; }

/* ── Banner Widget ──────────────────────────────────── */
.hp-widget-banner { padding: 20px 0; }
.hp-banner-link { display: block; }
.hp-banner-img {
    width: 100%; max-height: var(--banner-height, 300px);
    object-fit: cover; border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Divider Widget ─────────────────────────────────── */
.hp-widget-divider { padding: 0; }
.hp-divider-line { display: block; max-width: 100%; }

/* ── Text Widget ────────────────────────────────────── */
.hp-widget-text { padding: 30px 0; }
.hp-widget-text-title {
    font-size: 22px; font-weight: 700;
    margin: 0 0 15px;
}
.hp-widget-text-content {
    font-size: 15px; line-height: 1.7; color: #333;
    padding-right: 8px;
}
.hp-widget-text-content img {
    max-width: 100%; height: auto; border-radius: 4px;
}

/* ── Newsletter Widget ──────────────────────────────── */
.hp-widget-newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0; color: #fff;
}
.hp-newsletter-wrap { text-align: center; max-width: 600px; margin: 0 auto; }
.hp-newsletter-title {
    font-size: 24px; font-weight: 700; margin-bottom: 10px;
}
.hp-newsletter-desc { font-size: 15px; margin-bottom: 20px; opacity: 0.9; }
.hp-newsletter-form .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 5px; overflow: hidden;
}
.hp-newsletter-form .form-control { border: none; padding: 12px 16px; font-size: 15px; }
.hp-newsletter-form .btn {
    padding: 12px 24px; background: #28a745;
    border: none; font-weight: 600;
}
.hp-newsletter-form .btn:hover { background: #218838; }

/* ── Footer Links Widget ────────────────────────────── */
.hp-widget-footer-links {
    background: #f8f9fa; padding: 30px 0;
    border-top: 1px solid #e9ecef;
}
.hp-footer-col-title {
    font-size: 16px; font-weight: 700;
    margin: 0 0 12px; color: #333;
}
.hp-footer-links { list-style: none; padding: 0; margin: 0; }
.hp-footer-links li { margin-bottom: 6px; }
.hp-footer-links a {
    color: #6c757d; font-size: 14px;
    text-decoration: none; transition: color 0.15s;
}
.hp-footer-links a:hover { color: #007bff; text-decoration: underline; }

/* ── Custom HTML Widget ─────────────────────────────── */
.hp-widget-custom-html { padding: 30px 0; }
.hp-widget-custom-html h2 {
    font-size: 16px; font-weight: 700;
    margin: 0 0 12px; color: #333;
}

/* ── Video Widget ───────────────────────────────────── */
.hp-widget-video { padding: 10px 0; }
.hp-widget-video-title {
    font-size: 22px; font-weight: 700;
    margin: 0 0 15px;
}

/* ── Trust Widget ──────────────────────────────────── */
.hp-widget-trust { padding: 0; }
.hp-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 30px 10px;
    border-radius: 10px;
}
.hp-trust-box {
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid #1e2b38;
}
.hp-trust-box:hover {
    transform: translateY(-4px);
    border-color: #39ff14;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.hp-trust-icon { font-size: 28px; line-height: 1; }
.hp-trust-icon i { font-size: 28px; }
.hp-trust-text strong { display: block; color: #fff; font-size: 15px; }
.hp-trust-text span { color: #9fb3c8; font-size: 13px; }
@media (max-width: 768px) {
    .hp-trust-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hp-trust-box { padding: 15px; }
    .hp-trust-icon { font-size: 22px; }
}
