/* ── Reset / Global ──────────────────────────────────────── */
body {
    padding-top: 70px; /* spațiu pentru navbar fixed */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #1a1a2e; /* contrast ≥ 10:1 pe #f8f9fa */
}

/* ── Navbar link style (personalizabil) ──────────────────── */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}
.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

/* ── LCP / CLS fixes ──────────────────────────────────── */
#mainImage { aspect-ratio: 1 / 1; width: 100%; height: auto; }
.product-card img { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: contain; }

/* ── Accessibility fixes ───────────────────────────────── */
.text-muted { color: #4a5568 !important; }
.breadcrumb-item.active { color: #4a5568 !important; }
.breadcrumb-item a { color: #2b6cb0 !important; }
a:not(.btn) { color: #0056b3; }                     /* contrast 7:1 on #f8f9fa */
a:not(.btn):hover { color: #003d80; }
.site-footer a { color: #63b3ed !important; }
.site-footer .text-muted { color: #a0aec0 !important; }
.support-contact { display: inline-block; padding: 8px 4px; min-height: 44px; line-height: 1.4; }
.badge-success { background-color: #1e7e34 !important; }
.btn-primary { background-color: #0056b3 !important; border-color: #0056b3 !important; }
.btn-outline-primary { color: #0056b3 !important; border-color: #0056b3 !important; }
.btn-outline-primary:hover { background-color: #0056b3 !important; color: #fff !important; }
.btn-outline-secondary { color: #4a5568 !important; border-color: #4a5568 !important; }
.btn-outline-secondary:hover { background-color: #4a5568 !important; color: #fff !important; }
.site-footer .text-muted { color: #a0aec0 !important; }
.support-contact { display: inline-block; padding: 8px 4px; min-height: 44px; line-height: 1.4; }

.main-content {
    min-height: 60vh;
    padding: 30px 0;
}

/* ── Section Headers ────────────────────────────────────── */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #007bff;
    display: inline-block;
}

.section-spacer {
    padding: 40px 0;
}

/* ── Hero Slider ────────────────────────────────────────── */
.hero-slider {
    margin-top: -30px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    /* Colțurile de sus pătrate (sliderul e lipit de bara de sus),
       iar cele de jos rămân rotunjite, ca înainte. */
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hero-slider .carousel-item {
    background-color: #fff;
    line-height: 0;
}

.hero-slider .slider-img {
    width: 100%;
    height: 650px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-slider .slider-placeholder {
    width: 100%;
    height: 650px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.hero-slider .slider-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider .slider-caption-minimal {
    background: none;
    padding: 0;
    bottom: 30px;
    left: 5%;
    right: 5%;
    text-align: center;
}

.hero-slider .slider-caption-minimal p {
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    margin: 0;
    padding: 8px 16px;
    display: inline-block;
    border-radius: 6px;
}

/* Săgeți peste imagine */
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.hero-slider .carousel-control-prev {
    left: 20px;
}

.hero-slider .carousel-control-next {
    right: 20px;
}

.hero-slider .carousel-control-prev-icon,
.hero-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;
}

.hero-slider .carousel-control-prev-icon:hover,
.hero-slider .carousel-control-next-icon:hover {
    background-color: rgba(0, 0, 0, 0.75);
}

/* ── Product Card ───────────────────────────────────────── */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: #fff;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.product-card .card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-card .card-body {
    padding: 15px;
}

.product-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 40px;
}

.product-card .card-title a {
    color: #333;
    text-decoration: none;
}

.product-card .card-title a:hover {
    color: #007bff;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e7e34; /* contrast 5.5:1 */
}

.product-price .old-price {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666; /* contrast 5:1 */
    text-decoration: line-through;
    margin-left: 8px;
}

/* ── Chenare produse (shop + categorii): prețul normal TĂIAT în stânga,
   prețul redus în dreapta — exact ca în chenarele de pe homepage.
   Se aplică pe toate ecranele, inclusiv pe mobil. */
.product-card .product-card-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.product-card .product-card-price .sale-price {
    order: 2;
    white-space: nowrap; /* „… Lei” nu se mai rupe pe rândul următor */
}

.product-card .product-card-price .old-price {
    order: 1;
    margin-left: 0;
    margin-right: 8px;
    white-space: nowrap;
}

/* ── Shop + categorii: 4 produse pe rând pe desktop ─────────────────────────
   Cardul e ceva mai îngust, deci prețurile primesc fonturi puțin mai mici
   și padding mai mic, ca prețul tăiat + prețul redus să stea pe un rând. */
@media (min-width: 992px) {
    #shop-products-grid > .col-md-3,
    #cat-products-grid > .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    #shop-products-grid .product-card .card-body,
    #cat-products-grid .product-card .card-body {
        padding: 10px;
    }

    #shop-products-grid .product-card .product-price,
    #cat-products-grid .product-card .product-price {
        font-size: 1rem;
    }

    #shop-products-grid .product-card .product-price .old-price,
    #cat-products-grid .product-card .product-price .old-price {
        font-size: 0.75rem;
        margin-right: 5px;
    }
}

/* Pe ecrane late (≥1200px) cardurile au loc pentru ambele prețuri chiar și cu
   4 cifre → nu mai lăsăm prețul redus să treacă pe rândul 2. */
@media (min-width: 1200px) {
    #shop-products-grid .product-card-price,
    #cat-products-grid .product-card-price {
        flex-wrap: nowrap;
    }
}

/* ── Shop + categorii: 2 produse pe rând pe mobil ─────────────────────────── */
@media (max-width: 575.98px) {
    #shop-products-grid,
    #cat-products-grid {
        margin-left: -6px;
        margin-right: -6px;
    }

    #shop-products-grid > .col-md-3,
    #cat-products-grid > .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 6px;
        padding-right: 6px;
    }

    #shop-products-grid .product-card .card-body,
    #cat-products-grid .product-card .card-body {
        padding: 8px;
    }

    #shop-products-grid .product-card .product-price,
    #cat-products-grid .product-card .product-price {
        font-size: 0.85rem;
    }

    #shop-products-grid .product-card .product-price .old-price,
    #cat-products-grid .product-card .product-price .old-price {
        font-size: 0.75rem;
        margin-right: 5px;
    }
}

/* ── Shop (mobil/tabletă): buton „Filtre” + modal pentru filtre ───────────── */
.shop-filter-toggle,
.shop-filter-close {
    display: none;
}

/* bara cu „Afișează … / Filtre / sortare” */
.shop-toolbar {
    gap: 8px;
}

@media (max-width: 991.98px) {
    /* ── Bara shop pe mobil ──
       rândul 1: numărul de produse;
       rândul 2: butonul „Filtre” (alb pe negru) + sortarea, late și egale */
    .shop-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
        background: #f8fafc;
        border: 1px solid #e9ecef;
        border-radius: 12px;
    }

    /* numărul de produse, pe rândul de sus */
    .shop-toolbar .shop-toolbar-count {
        flex: 1 0 100%;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        font-size: 0.8rem;
        color: #6b7280 !important;
        white-space: nowrap;
    }

    /* butonul „Filtre” și sortarea: late, egale, pe același rând */
    .shop-filter-toggle,
    .shop-toolbar select.form-control {
        flex: 1 1 0;
        min-width: 0;
        min-height: 44px;
        border-radius: 10px;
        font-size: 0.85rem;
    }

    /* butonul „Filtre”: text alb pe fundal negru */
    .shop-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 14px;
        font-weight: 600;
        white-space: nowrap;
    }

    /* forțat (cu !important) ca să nu fie suprascris de stilurile Bootstrap
       ale clasei .btn-outline-primary, în nicio stare a butonului */
    .shop-toolbar .shop-filter-toggle,
    .shop-toolbar .shop-filter-toggle:hover,
    .shop-toolbar .shop-filter-toggle:focus,
    .shop-toolbar .shop-filter-toggle:active,
    .shop-toolbar .shop-filter-toggle:not(:disabled):not(.disabled):active,
    .shop-toolbar .shop-filter-toggle:not(:disabled):not(.disabled):focus {
        color: #fff !important;
        background-color: #111 !important;
        border-color: #111 !important;
    }

    .shop-toolbar .shop-filter-toggle:active,
    .shop-toolbar .shop-filter-toggle:not(:disabled):not(.disabled):active {
        background-color: #333 !important;
        border-color: #333 !important;
    }

    /* sortarea: lată, aliniată cu butonul */
    .shop-toolbar select.form-control {
        height: auto;
        padding: 10px 12px;
        background-color: #fff;
        border: 1px solid #d7dde5;
    }

    /* sidebar-ul de filtre devine modal: ascuns până se apasă butonul */
    .shop-filter-sidebar {
        display: none;
    }

    /* sertar pe jumătate de ecran, care intră din dreapta */
    .shop-filter-sidebar.is-open {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 50%;
        max-width: 50%;
        height: 100%;
        max-height: 100%;
        z-index: 2000;
        margin: 0;
        border: 0;
        border-radius: 14px 0 0 14px;
        background: #fff;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .shop-filter-sidebar.is-open .card-header {
        position: sticky;
        top: 0;
        z-index: 2;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
        border-radius: 14px 0 0 0;
    }

    /* „icon + Filtre” pe un singur rând, fără rupere de text */
    .shop-filter-sidebar.is-open .card-header h5 {
        font-size: 1.05rem;
        white-space: nowrap;
        margin-right: auto;
    }

    /* butonul „Resetează” trece pe rândul al doilea, pe toată lățimea sertarului */
    .shop-filter-sidebar.is-open .card-header .btn {
        flex: 1 0 100%;
        font-size: 0.8rem;
    }

    /* Conținutul filtrelor trebuie vizibil în modal: pe mobil mobile.css îl
       ascunde, ca parte din vechiul comportament de „pliere” a sidebar-ului. */
    .shop-filter-sidebar.is-open .card-body {
        display: block !important;
    }

    /* fără săgeata de pliere în modal */
    .shop-filter-sidebar.is-open .card-header::after {
        content: none;
    }

    /* X-ul din stânga sus pentru închidere (roșu) */
    .shop-filter-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        margin-right: 10px;
        padding: 0;
        border: 1px solid #dc3545;
        border-radius: 50%;
        background: #fff;
        color: #dc3545;
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
    }

    .shop-filter-close:hover,
    .shop-filter-close:focus {
        background: #dc3545;
        color: #fff;
    }

    /* cât timp modalul e deschis, pagina din spate nu se derulează */
    body.shop-filters-open {
        overflow: hidden;
    }
}

/* X-ul de închidere rămâne vizibil cât timp modalul e deschis
   (ex. tabletă întoarsă în landscape, unde nu se mai aplică regulile de mobil) */
.shop-filter-sidebar.is-open .shop-filter-close {
    display: inline-flex;
}

/* Fundal semitransparent peste restul ecranului, cât timp modalul e deschis */
.shop-filter-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1999;
    background: rgba(0, 0, 0, 0.35);
}

/* ── Shop: galerie imagini în cardurile de produs ───────────
   Efect de slide orizontal: imaginea următoare intră din stânga
   și se deplasează spre dreapta, iar cea veche iese spre dreapta. */
.product-img-link {
    display: block;
}

.product-img-box {
    position: relative;
    overflow: hidden;
}

.product-img-box .product-img-slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateX(-100%);   /* parcată în stânga, în afara cadrului */
    transition: transform 0.6s ease;
    pointer-events: none;
    will-change: transform;
}

.product-img-box .product-img-slide-img.is-active {
    transform: translateX(0);       /* imaginea curentă, pe poziție */
    z-index: 2;
}

.product-img-box .product-img-slide-img.is-leaving {
    transform: translateX(100%);    /* imaginea veche iese spre dreapta */
    z-index: 3;
}

/* folosit doar pentru repoziționarea instantanee în afara cadrului */
.product-img-box .product-img-slide-img.no-transition {
    transition: none;
}

/* pentru utilizatorii cu „reduce motion” activat: schimbare fără animație */
.product-img-box.no-anim .product-img-slide-img {
    transition: none;
}

/* ── Pagina de categorie: bara orizontală dintre produse și descriere ── */
.category-description-divider {
    border: 0;
    border-top: 1px solid #dee2e6;
    margin: 30px 0 20px;
    opacity: 1;
}

.product-card .badge-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5; /* deasupra imaginilor din autoslide */
}

.product-card .badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.85rem;
    padding: 5px 10px;
    z-index: 5; /* deasupra imaginilor din autoslide */
}

/* ── Category Carousel ──────────────────────────────────── */
.category-carousel .carousel-item .row {
    justify-content: center;
}

.category-card {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s ease;
    display: block;
    color: #333;
    text-decoration: none;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #007bff;
}

.category-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
    margin-bottom: 10px;
}

.category-card .category-name {
    font-weight: 600;
    font-size: 1rem;
}

/* ── Placeholder ────────────────────────────────────────── */
.placeholder-img {
    width: 100%;
    height: 220px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2.5rem;
}

.category-card .placeholder-img {
    height: 180px;
}

/* ── Product Detail Page ────────────────────────────────── */
.product-gallery {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Colțul miniaturilor verticale */
.gallery-thumbs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.thumb-scroll {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 64px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    font-size: 0.8rem;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.thumb-scroll:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.thumb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: hidden;
    scroll-behavior: smooth;
}

.gallery-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    opacity: 1;
    border-color: #999;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: #007bff;
}

/* Imagine principală */
.gallery-main {
    flex: 1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

.gallery-main img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

/* Fallback placeholder (când nu există imagini) */
.product-detail-img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 10px;
}

.product-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e7e34; /* contrast ~5.5:1 on white */
}

.product-detail-price .old-price {
    font-size: 1.2rem;
    color: #666; /* contrast ~5:1 on white */
    text-decoration: line-through;
    margin-left: 12px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-slider .slider-placeholder {
        height: 250px;
    }
    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next {
        width: 36px;
        height: 36px;
    }
    .hero-slider .carousel-control-prev {
        left: 8px;
    }
    .hero-slider .carousel-control-next {
        right: 8px;
    }
    .hero-slider .carousel-control-prev-icon,
    .hero-slider .carousel-control-next-icon {
        padding: 14px;
    }
    .hero-slider {
        border-radius: 0;
        box-shadow: none;
    }
    .hero-slider .slider-img {
        height: 300px;
    }
    .hero-slider .slider-placeholder {
        height: 300px;
    }
    .hero-slider .slider-caption-minimal {
        bottom: 15px;
    }
    .hero-slider .slider-caption-minimal p {
        font-size: 0.85rem;
        padding: 4px 12px;
    }
    .product-card .card-img-top {
        height: 180px;
    }

    /* Product gallery responsive */
    .product-gallery {
        flex-direction: column-reverse;
        align-items: center;
    }

    .gallery-thumbs {
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
        max-width: 100%;
    }

    .thumb-list {
        flex-direction: row;
        max-height: none;
        overflow-y: visible;
        overflow-x: auto;
    }

    .gallery-thumb {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
    }

    .thumb-scroll {
        width: 28px;
        height: 56px;
    }

    .gallery-main {
        min-height: 280px;
        width: 100%;
    }

    .gallery-main img {
        max-height: 350px;
    }
}

/* ── Two-Tier Menu: Roots + Mega Columns ────────────────── */
/* Hover activation for the top-level dropdown */
.dropdown-hover:hover > .dropdown-menu {
    display: block;
}

/* First level: root categories dropdown */
.dropdown-roots {
    min-width: 260px;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin-top: 0 !important;
}

.dropdown-roots .dropdown-item {
    padding: 8px 18px;
    font-weight: 500;
    color: #333;
    transition: background 0.12s;
}

.dropdown-roots .dropdown-item:hover {
    background: #eef4ff;
    color: #0056b3;
}

.dropdown-roots .dropdown-item small {
    font-weight: 400;
    font-size: 0.75rem;
}

.dropdown-roots .dropdown-item .fa-chevron-right {
    font-size: 0.7rem;
    line-height: 1.4;
    opacity: 0.5;
}

/* Root item wrapper for submenu positioning */
.root-item {
    position: relative;
}

/* Invisible bridge so mouse can travel from root to mega menu */
.root-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: -12px;
    width: 12px;
    height: 100%;
    z-index: 1001;
}

/* Hover on a root → show its mega menu panel */
.root-item:hover > .mega-menu {
    display: block;
}

/* Mega menu panel (second level) */
.mega-menu {
    position: absolute;
    top: -8px;
    left: 100%;
    width: 660px;
    padding: 0 !important;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    background: #fff;
    display: none;
    z-index: 1000;
}

.mega-menu .container {
    padding: 14px 10px;
}

.mega-menu .row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
}

.mega-menu .menu-col {
    flex: 1 1 0%;
    min-width: 0;
    padding: 0 12px;
    border-right: 1px solid #eee;
}

.mega-menu .menu-col:last-child {
    border-right: none;
}

.mega-menu .mega-group {
    margin-bottom: 16px;
    break-inside: avoid;
}

.mega-menu .mega-heading {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #007bff;
    padding: 4px 0;
    margin-bottom: 2px;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.mega-menu .mega-heading:hover {
    color: #0056b3;
    text-decoration: underline;
}

.mega-menu .mega-link {
    display: block;
    font-size: 0.88rem;
    color: #555;
    padding: 3px 0 3px 8px;
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
    white-space: nowrap;
}

.mega-menu .mega-link:hover {
    color: #007bff;
    padding-left: 14px;
    text-decoration: none;
}

/* Mobile: collapse to stacked */
@media (max-width: 991.98px) {
    .dropdown-hover:hover > .dropdown-menu {
        display: none;
    }
    .dropdown-hover.show > .dropdown-menu {
        display: block;
    }

    .dropdown-roots {
        min-width: auto;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .root-item {
        position: static;
    }

    .root-item:hover > .mega-menu {
        display: none;
    }

    .mega-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        left: auto !important;
        top: auto !important;
        border-radius: 0;
        box-shadow: none;
        margin-left: 1rem;
        border-left: 2px solid #007bff;
    }

    .mega-menu .container {
        padding: 10px 0;
    }

    .mega-menu .row {
        flex-wrap: wrap;
    }

    .mega-menu .menu-col {
        flex: 0 0 100%;
        max-width: 100%;
        border-right: none;
        padding: 0;
        white-space: normal;
    }

    .mega-menu .mega-group {
        margin-bottom: 12px;
    }

    .mega-menu .mega-link {
        padding-left: 16px;
        white-space: normal;
    }

    .mega-menu .mega-heading {
        white-space: normal;
    }
}

/* ── Filter Sidebar ──────────────────────────────────────── */
.filter-sidebar {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.filter-sidebar .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 16px;
}

.filter-sidebar .card-header h5 {
    font-size: 1rem;
    font-weight: 600;
}

.filter-group {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 16px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-checkbox-list {
    max-height: 220px;
    overflow-y: auto;
}

.filter-checkbox {
    margin-bottom: 4px;
}

.filter-checkbox .custom-control-label {
    font-size: 0.875rem;
    cursor: pointer;
    padding-top: 1px;
}

.filter-count {
    color: #888;
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 2px;
}

/* ── Category Tree in Filter Sidebar ────────────────────── */
.category-tree-list {
    padding: 2px 0;
}
/* ── Level 0 (direct children) ── */
.category-tree-item {
    position: relative;
    padding: 2px 0 2px 20px;
    margin-left: 8px;
}
.category-tree-item .filter-checkbox {
    margin: 0;
    padding: 2px 0;
    width: 100%;
}
.category-tree-item .custom-control-label {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.12s ease;
    cursor: pointer;
}
.category-tree-item .custom-control-label:hover {
    background: #f0f7ff;
}
.category-tree-name {
    font-size: 0.88rem;
    font-weight: 500;
}
.category-tree-count {
    font-size: 0.78rem;
    color: #888;
    white-space: nowrap;
    margin-left: 6px;
}

/* ── Tree connector lines ── */
.tree-level-0 {
    padding-left: 20px;
}
.tree-level-1 {
    padding-left: 40px;
}
.tree-level-2 {
    padding-left: 60px;
}
.tree-level-3 {
    padding-left: 80px;
}
.tree-level-4 {
    padding-left: 100px;
}

.filter-checkbox .custom-control-label:hover {
    color: #007bff;
}

/* ── Filtru preț: slider cu două mânere ─────────────────── */
.price-range-values {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
}

.price-range-value {
    background: #f1f3f5;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}

.price-range-sep {
    color: #adb5bd;
}

.price-range-slider {
    position: relative;
    height: 30px;
    margin: 0 4px;
}

.price-range-track {
    position: absolute;
    top: 13px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 2px;
    background: #e0e0e0;
}

.price-range-fill {
    position: absolute;
    top: 13px;
    height: 4px;
    border-radius: 2px;
    background: #007bff;
}

.price-range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    outline: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.price-range-input::-webkit-slider-runnable-track {
    background: none;
    border: none;
    height: 30px;
}

.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 6px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #007bff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

.price-range-input::-moz-range-track {
    background: none;
    border: none;
}

.price-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #007bff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    pointer-events: auto;
    z-index: 3;
}

/* Product card enhancements */
.product-col {
    margin-bottom: 20px;
}

/* Sort dropdown styling */
select.form-control-sm {
    font-size: 0.8rem;
    padding: 4px 8px;
    cursor: pointer;
}

/* ── Cart / Checkout Styles ───────────────────────────────── */

/* Cart count badge in navbar */
.cart-count-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    vertical-align: super;
    margin-left: 2px;
}

/* Cart item rows (card-based) */
.cart-item-row .card-body {
    padding: 16px;
}

.cart-item-row:hover {
    border-color: #cce5ff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.08);
}

.cart-item-img-fluid {
    width: 100%;
    max-width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
}

.cart-item-img-placeholder {
    width: 100%;
    max-width: 100px;
    height: 80px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.5rem;
    border-radius: 6px;
}

.cart-item-name {
    font-size: 0.95rem;
    line-height: 1.3;
}

.cart-item-name a {
    color: #333;
    font-weight: 600;
}

.cart-item-name a:hover {
    color: #007bff;
    text-decoration: none;
}

.cart-item-price {
    font-size: 0.85rem;
    color: #888;
}

.cart-item-total {
    font-size: 1rem;
}

/* Quantity group */
.qty-group .form-control {
    width: 50px;
    min-width: 50px;
    text-align: center;
}

.qty-group .btn {
    font-size: 0.85rem;
    padding: 2px 10px;
}

/* Cart summary card */
.cart-summary .card-header {
    background: #f8f9fa;
    font-weight: 600;
}

.cart-summary .card-body {
    padding: 20px;
}

.cart-summary .h5 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Checkout items list */
.checkout-items .list-group-item {
    padding: 12px 16px;
    font-size: 0.9rem;
}

/* Add to Cart section on product detail page */
.add-to-cart-section {
    padding: 10px 0;
}

.qty-group-lg .form-control {
    width: 70px;
    min-width: 70px;
    text-align: center;
    font-size: 1.1rem;
    height: 48px;
}

.qty-group-lg .btn {
    font-size: 1.2rem;
    padding: 8px 16px;
    height: 48px;
}

.btn-add-to-cart {
    height: 48px;
    font-size: 1.1rem;
    padding: 8px 24px;
}

/* Add to Cart button on product cards */
.btn-add-to-cart-card {
    font-size: 0.82rem;
    padding: 6px 10px;
    transition: all 0.15s ease;
}

.btn-add-to-cart-card:hover {
    background: #007bff;
    color: #fff;
}

/* Success message on checkout */
.text-success {
    color: #28a745 !important;
}

/* ── Categories carousel → grid (desktop) ────────────── */
@media (min-width: 992px) {
    .hp-widget-categories .carousel-inner {
        overflow: visible;
    }
    .hp-widget-categories .carousel-item {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }
    .hp-widget-categories .carousel-control-prev,
    .hp-widget-categories .carousel-control-next,
    .hp-widget-categories .carousel-indicators {
        display: none !important;
    }
}

/* ── Categories widget: cleaner cards (no white borders) ── */
.hp-cat-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.hp-cat-img {
    /* pătrat, ca poza să umple cadrul (fără spațiu gol sub poză) */
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    overflow: hidden !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
}
.hp-cat-img img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: transparent;
}
.hp-cat-name {
    padding: 4px 0;
}

/* ═══════════════════════════════════════════════════════════
   Live Search (migrated from header.php inline)
   ═══════════════════════════════════════════════════════════ */
.live-search-inline {
    position: relative;
}
.live-search-inline form {
    width: auto;
}
.live-search-inline input {
    min-width: 200px;
}
.live-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 580px;
    max-height: none;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 6px;
}
.live-search-results.show {
    display: block;
}
.live-search-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 16px !important;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
}
.live-search-item:last-child {
    border-bottom: none;
}
.live-search-item:hover {
    background-color: #f8f9fa;
}
.live-search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f1f1f1;
}
.live-search-item .ls-info {
    flex: 1;
    min-width: 0;
}
.live-search-item .ls-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}
.live-search-item .ls-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: #28a745;
}
.live-search-item .ls-price s {
    font-weight: 400;
    color: #999;
    margin-left: 4px;
}
.live-search-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   Footer Styles (migrated from footer.php)
   ═══════════════════════════════════════════ */
.site-footer {
    background-color: #1a1a1a;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
    padding: 0;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-newsletter {
    padding: 48px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.newsletter-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}
.newsletter-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 20px;
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.newsletter-input-group {
    display: flex;
    width: 100%;
    max-width: 480px;
    gap: 0;
}
.newsletter-input {
    flex: 1;
    padding: 12px 18px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 2px solid #fff;
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
}
.newsletter-input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}
.newsletter-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #007bff;
    border: 2px solid #007bff;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    white-space: nowrap;
}
.newsletter-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}
.newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    max-width: 480px;
    cursor: pointer;
}
.newsletter-consent a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}
.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 40px 0 32px;
}
.footer-col-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-block;
}
.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}
.footer-contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}
.footer-contact-info li i {
    width: 16px;
    text-align: center;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.4);
}
.footer-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #007bff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
}
.footer-contact-btn:hover {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.footer-brand-icon {
    font-size: 28px;
    color: #007bff;
}
.footer-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.footer-brand-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 16px;
}
.footer-payment-icons {
    display: flex;
    gap: 12px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.4);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
}
.footer-bottom-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}
.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
}
.footer-sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}
.footer-platform a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 500;
}
.footer-platform a:hover {
    color: #fff;
}
/* Sigle ANPC / EuPlatesc din bara de jos: se micsoreaza pe ecrane mici,
   nu ies niciodata din container si nu se deformeaza. */
.footer-anpc {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
}
.footer-anpc a {
    display: inline-flex;
    max-width: 100%;
}
.footer-anpc-img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
@media (max-width: 768px) {
    .footer-anpc { gap: 10px; }
    .footer-anpc-img { height: 32px; }
}
@media (max-width: 420px) {
    .footer-anpc-img { height: 28px; }
}
/* Footer widget overrides */
.site-footer .hp-widget {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.site-footer .hp-widget .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
}
.site-footer .hp-widget .row { margin: 0; }
.site-footer .hp-widget-text-content { color: rgba(255, 255, 255, 0.8); }
.site-footer .hp-widget-text-content ul,
.site-footer .hp-widget-text-content ol { padding-left: 0; list-style-position: inside; }
.site-footer .hp-footer-col-title { color: #fff; font-size: 16px; margin: 0 0 16px 0; padding: 0; }
.site-footer .hp-footer-links a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.site-footer .hp-footer-links a:hover { color: #fff; padding-left: 4px; }
.site-footer .hp-nav-menu { background: transparent !important; padding: 0 !important; }
.site-footer .hp-nav-menu a { color: rgba(255, 255, 255, 0.7); }
.site-footer .hp-nav-menu a:hover { color: #fff; }
.site-footer .hp-widget-text { padding: 40px 0 32px !important; }
.site-footer .hp-widget-text-title { margin: 0 0 16px !important; }
.site-footer .hp-widget-custom-html { padding: 40px 0 32px !important; color: rgba(255, 255, 255, 0.8); }
.site-footer .hp-widget-custom-html h2 { margin: 0 0 16px; }
.site-footer .hp-widget-divider { padding: 0 !important; }
.site-footer .hp-widget-divider hr { border-color: rgba(255, 255, 255, 0.1) !important; }
.site-footer .hp-widget-banner { background: transparent !important; padding: 0 !important; border: none !important; }
.site-footer .hp-widget-footer-links { padding: 40px 0 32px !important; }
.site-footer .hp-widget-footer-links .container { max-width: 100%; padding: 0; margin: 0; background: transparent; }
.site-footer .hp-widget-footer-links .row { margin: 0; }
.site-footer .hp-widget-footer-links [class*="col-"] { padding: 0; }
/* Footer responsive */
@media (max-width: 992px) {
    .footer-columns { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 576px) {
    .footer-newsletter { padding: 36px 0 28px; }
    .newsletter-title { font-size: 20px; }
    .newsletter-input-group { flex-direction: column; gap: 8px; }
    .newsletter-input { border-radius: 8px; border-right: 2px solid #fff; }
    .newsletter-btn { border-radius: 8px; width: 100%; }
    .footer-columns { grid-template-columns: 1fr; gap: 28px; padding: 28px 0 20px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; gap: 6px; }
    .footer-sep { display: none; }
}

/* ── Checkout Progress Stepper ─────────────────────────── */
.checkout-progress { margin-bottom: 1.5rem; }
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.checkout-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    cursor: default;
}
.checkout-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e9ecef;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}
.checkout-step-item.active .checkout-step-circle {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.2);
}
.checkout-step-item.completed .checkout-step-circle {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}
.checkout-step-item.completed .step-num { display: none; }
.checkout-step-item.completed .step-check { display: inline !important; }
.checkout-step-label {
    font-size: 12px;
    margin-top: 6px;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}
.checkout-step-item.active .checkout-step-label { color: #007bff; font-weight: 600; }
.checkout-step-item.completed .checkout-step-label { color: #28a745; }
.checkout-step-line {
    flex: 1;
    min-width: 40px;
    max-width: 80px;
    height: 3px;
    background: #dee2e6;
    margin: 0 4px;
    position: relative;
    top: -14px;
    transition: background 0.3s ease;
}
.checkout-step-line.completed { background: #28a745; }
.checkout-step-line.active { background: #007bff; }
@media (max-width: 576px) {
    .checkout-step-circle { width: 32px; height: 32px; font-size: 14px; }
    .checkout-step-label { font-size: 10px; }
    .checkout-step-line { min-width: 20px; max-width: 40px; }
}

/* ── Descriere produs (HTML scris in admin) ─────────────────────
   Stiluri de rezerva pentru paragrafe/tabele, folosite si atunci cand
   editorul vizual elimina atributele `style` din continut. */
.product-description { font-size: 15px; line-height: 1.7; color: #333; overflow-wrap: break-word; }
.product-description > :last-child { margin-bottom: 0; }
.product-description p { margin: 0 0 1rem; }
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5 { margin: 1.5rem 0 0.75rem; font-weight: 600; line-height: 1.3; }
.product-description h2 { font-size: 1.4rem; }
.product-description h3 { font-size: 1.2rem; }
.product-description ul,
.product-description ol { margin: 0 0 1rem 1.25rem; }
.product-description li { margin-bottom: 0.35rem; }
.product-description img { max-width: 100%; height: auto; }
.product-description a { color: #0056b3; }
.product-description blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid #dee2e6;
    color: #555;
    background: #f8f9fa;
}
.product-description table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    font-size: 15px;
}
.product-description table th,
.product-description table td {
    padding: 10px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}
.product-description table thead th,
.product-description table th {
    background: #2c3e50;
    color: #ffffff;
    font-weight: 600;
}
.product-description table tbody tr:nth-child(even) { background: #f9f9f9; }
.product-description table caption { caption-side: top; padding: 0.5rem 0; color: #6c757d; }
@media (max-width: 576px) {
    .product-description table { font-size: 14px; }
    .product-description table th,
    .product-description table td { padding: 8px; }
}

.footer-copyright {
    color: #cea55c;
}
