/* =====================================================
   PROMOTII - GS Woo Product Views
===================================================== */
.home-promotii {
    padding: 48px 0;
    background: #f5f5f5;
}

/* =====================================================
   SECTION HEADING
===================================================== */
.hero-overlay,
.hcard__overlay {
    display: none !important;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 36px;
    padding-top: 8px;
}

.section-heading__line {
    flex: 1;
    height: 2px;
    background: linear-gradient(
        to var(--line-dir, right),
        transparent 0%,
        #d0d0d0 40%,
        #9a0019 100%
    );
}

.section-heading__line:last-child {
    --line-dir: left;
}

.section-heading__title {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #222;
    white-space: nowrap;
    position: relative;
    padding: 0 4px;
}

.section-heading__title::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--bdt-brand, #9a0019);
    border-radius: 2px;
}

/* =====================================================
   CARDURI HOME - BunDeTot Theme
===================================================== */
.home-cards {
    padding: 56px 0 64px;
    background: #f5f5f5;
}

.home-cards__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Card generic */
.hcard {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: 0 6px 28px rgba(0,0,0,0.14);
    display: block;
    text-decoration: none;
    color: #fff;
    background: #111;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hcard:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.28);
    transform: translateY(-3px);
}

.hcard__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
    will-change: transform;
}

.hcard:hover .hcard__img {
    transform: scale(1.06);
}

/* Gradient de jos in sus — permanent */
.hcard__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75) 0%,
        rgba(0,0,0,0.25) 50%,
        rgba(0,0,0,0.0) 100%
    );
    transition: background 0.4s ease;
}

.hcard:hover .hcard__overlay {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.82) 0%,
        rgba(0,0,0,0.38) 55%,
        rgba(0,0,0,0.05) 100%
    );
}

/* Linie bordeaux care apare la hover — jos */
.hcard::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bdt-brand, #9a0019);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

.hcard:hover::after {
    transform: scaleX(1);
}

/* Continut card - fara blur */
.hcard__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 28px 26px;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.0) 100%);
    transition: transform 0.35s ease;
}

.hcard:hover .hcard__body {
    transform: translateY(-4px);
}

.hcard__label {
    display: inline-block;
    background: var(--bdt-brand, #9a0019);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.hcard__title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0 0 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: #fff;
}

.hcard__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
    border-bottom: 1.5px solid rgba(255,255,255,0.6);
    padding-bottom: 2px;
}

.hcard:hover .hcard__cta {
    opacity: 1;
    transform: translateY(0);
}

.hcard__cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: #fff;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 900px) {
    .home-cards__inner {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-cards__inner .hcard:last-child {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 7;
    }
}

@media (max-width: 560px) {
    .home-cards__inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .home-cards__inner .hcard:last-child {
        grid-column: auto;
        aspect-ratio: 4 / 3;
    }
    .hcard__title { font-size: 1.25rem; }
}

/* =====================================================
   GALERIE 3 COLOANE FULL WIDTH
===================================================== */
.home-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: calc(100vw / 3 * 1187 / 768);
    overflow: hidden;
}

/* Coloanele laterale */
.hgal__col--tall {
    position: relative;
    overflow: hidden;
}

.hgal__col--tall .hgal__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Coloana mijloc: 2 imagini stacked */
.hgal__col--stack {
    display: flex;
    flex-direction: column;
    border-left: 3px solid #fff;
    border-right: 3px solid #fff;
    overflow: hidden;
}

.hgal__stack-item {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.hgal__stack-item + .hgal__stack-item {
    border-top: 3px solid #fff;
}

.hgal__stack-item .hgal__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Logo: fundal alb, centrat */
.hgal__img--contain {
    background: #fff;
    padding: 24px;
}

/* =====================================================
   PRODUSE SLIDER (home promotii)
===================================================== */
.bdt-products-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.bdt-products-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.bdt-products-track {
    display: flex;
    gap: 24px;
    transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.bdt-products-track .bdt-pcard {
    flex: 0 0 calc(25% - 18px);
    min-width: 0;
}

/* Sageti slider */
.bdt-slider-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
    z-index: 2;
}

.bdt-slider-btn:hover:not(:disabled) {
    background: var(--bdt-brand, #9a0019);
    border-color: var(--bdt-brand, #9a0019);
    color: #fff;
}

.bdt-slider-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.bdt-slider-prev {
    margin-right: 14px;
}

.bdt-slider-next {
    margin-left: 14px;
}

.bdt-pcard {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.bdt-pcard:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    transform: translateY(-3px);
}

/* Imagine */
.bdt-pcard__img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
}

.bdt-pcard__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease;
}

.bdt-pcard:hover .bdt-pcard__img {
    transform: scale(1.06);
}

/* Badge stoc epuizat */
.bdt-pcard__oos-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 2;
}

.bdt-pcard--oos .bdt-pcard__img {
    filter: grayscale(40%);
    opacity: 0.85;
}

/* Body card */
.bdt-pcard__body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.bdt-pcard__cat {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bdt-brand, #9a0019);
}

.bdt-pcard__name {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 2px 0 4px;
    color: #222;
}

.bdt-pcard__name a {
    color: inherit;
    text-decoration: none;
}

.bdt-pcard__name a:hover {
    color: var(--bdt-brand, #9a0019);
}

.bdt-pcard__price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 6px;
}

.bdt-pcard__price .woocommerce-Price-amount {
    color: #222;
}

.bdt-pcard__price del {
    opacity: 0.5;
    font-weight: 400;
    font-size: 0.8rem;
    margin-right: 4px;
}

.bdt-pcard__price ins {
    text-decoration: none;
    color: var(--bdt-brand, #9a0019);
}

/* Ascunde butoanele WC nedorite in grid (Selecteaza optiunile, Citeste mai mult etc.) */
.bdt-pcard__actions a.product_type_variable,
.bdt-pcard__actions a.product_type_external,
.bdt-pcard__actions a.product_type_grouped,
.bdt-pcard__actions a.button:not(.add_to_cart_button) {
    display: none !important;
}

/* Elimina spatiul din wrapper cand nu e buton vizibil */
.bdt-pcard__actions {
    margin: 0;
    padding: 0;
    min-height: 0;
}

/* Buton add to cart in card */
.bdt-pcard__actions .button,
.bdt-pcard__actions .add_to_cart_button {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--bdt-brand, #9a0019);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, opacity 0.2s;
    margin-top: auto;
}

.bdt-pcard__actions .button:hover,
.bdt-pcard__actions .add_to_cart_button:hover {
    background: #7a0014;
    color: #fff !important;
}

.bdt-pcard--oos .bdt-pcard__actions .button {
    background: #aaa;
    cursor: default;
}

.bdt-pcard--oos .bdt-pcard__actions .button:hover {
    background: #aaa;
}

/* Responsive slider */
@media (max-width: 1100px) {
    .bdt-products-track .bdt-pcard {
        flex: 0 0 calc(33.333% - 16px);
    }
}

@media (max-width: 768px) {
    .bdt-products-track {
        gap: 14px;
    }
    .bdt-products-track .bdt-pcard {
        flex: 0 0 calc(50% - 7px);
    }
    .bdt-slider-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    .bdt-slider-prev { margin-right: 8px; }
    .bdt-slider-next { margin-left: 8px; }
}

@media (max-width: 420px) {
    .bdt-products-track .bdt-pcard {
        flex: 0 0 calc(50% - 5px);
    }
    .bdt-products-track {
        gap: 10px;
    }
    .bdt-pcard__body {
        padding: 10px 10px 14px;
    }
    .bdt-pcard__name {
        font-size: 0.78rem;
    }
}

/* =====================================================
   GALERIE — RESPONSIVE MOBIL
===================================================== */
@media (max-width: 768px) {
    .home-gallery {
        display: flex;
        flex-direction: column;
        height: auto;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        gap: 3px;
        overflow: visible;
    }

    /* Coloanele laterale — inaltimea se adapteaza la imaginea naturala */
    .hgal__col--tall {
        height: auto;
        overflow: visible;
    }

    .hgal__col--tall .hgal__img {
        position: static;
        width: 100%;
        height: auto;
        object-fit: unset;
    }

    /* Coloana mijloc: ascunde imaginea cu logo, arata doar platoul */
    .hgal__col--stack {
        height: auto;
        border-left: none;
        border-right: none;
        overflow: visible;
    }

    /* Ascunde imaginea cu logo (al doilea stack-item) */
    .hgal__stack-item:last-child {
        display: none;
    }

    /* Primul stack-item — inaltime naturala */
    .hgal__stack-item:first-child {
        flex: unset;
        height: auto;
        min-height: unset;
        overflow: visible;
    }

    .hgal__stack-item .hgal__img {
        position: static;
        width: 100%;
        height: auto;
        object-fit: unset;
    }

    .hgal__stack-item + .hgal__stack-item {
        border-top: none;
    }
}
