/* =============================================
   HERO CAROUSEL — Kiemelt termekek bemutato
   ============================================= */

.hero-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: var(--spacing-xs) 0;
}

/* JS-driven progress bar (synced to autoplay interval) */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color, #e67e22), #ffb347);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 2;
    pointer-events: none;
}

/* Magassag valtozatok */
.hero-compact { --hero-height: 160px; }
.hero-tall    { --hero-height: 220px; }

/* =========================
   TRACK
========================= */
.hero-carousel-track {
    display: flex;
    gap: 12px;
    padding: 0 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.hero-carousel-track::-webkit-scrollbar {
    display: none;
}

/* =========================
   SLIDE
========================= */
.hero-slide {
    flex: 0 0 auto;
    width: 150px;
    height: var(--hero-height, 160px);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    cursor: pointer;
    background: var(--border-color, #222);
    transition:
        transform .45s cubic-bezier(.22, .61, .36, 1),
        box-shadow .35s ease;
}

/* Banner mod: szeles slide */
.hero-slide-banner {
    width: calc(100vw - 28px);
    max-width: 600px;
}

/* =========================
   HOVER EFFECTS — csak desktop
========================= */
@media (hover: hover) {
    /* Lift + shadow — termek slide */
    .hero-slide:not(.hero-slide-banner):hover {
        transform: translateY(-6px) scale(1.04);
        box-shadow:
            0 10px 25px rgba(0, 0, 0, 0.35),
            0 2px 6px rgba(0, 0, 0, 0.25);
    }

    /* Banner slide — visszafogott hover */
    .hero-slide-banner:hover {
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.25);
    }

    /* Cinematic zoom */
    .hero-slide:hover .hero-slide-image {
        transform: scale(1.12);
    }

    /* Light sweep effect */
    .hero-slide:not(.hero-slide-banner)::before {
        content: "";
        position: absolute;
        top: 0;
        left: -120%;
        width: 60%;
        height: 100%;
        background: linear-gradient(
            110deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent
        );
        transform: skewX(-25deg);
        pointer-events: none;
        z-index: 1;
    }

    .hero-slide:not(.hero-slide-banner):hover::before {
        animation: heroSweep 1.4s ease;
    }
}

@keyframes heroSweep {
    0%   { left: -120%; }
    100% { left: 140%; }
}

/* =========================
   IMAGE
========================= */
.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(.19, 1, .22, 1);
}

/* =========================
   OVERLAY
========================= */
.hero-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(
        transparent 0%,
        rgba(0, 0, 0, 0.55) 40%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: left;
    backdrop-filter: blur(2px);
    pointer-events: none;
}

/* =========================
   TEXT
========================= */
.hero-slide-title {
    color: #fff;
    font-family: var(--menu-font, inherit);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Footer sor: ar + kosar gomb egymás mellett */
.hero-slide-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 4px;
    pointer-events: auto;
}

.hero-slide-price {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Kis + gomb — kosar hint */
.hero-slide-cart-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color, #5b7a82);
    color: #fff;
    font-size: 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

@media (hover: hover) {
    .hero-slide:hover .hero-slide-cart-hint {
        transform: scale(1.15);
        background: var(--primary-hover, #4a6970);
    }
}

/* Banner alcim */
.hero-slide-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* =========================
   BADGES — kerek ikon badge-ek a kep jobb felso sarkaban
========================= */
.hero-slide-badges {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2;
    pointer-events: none;
}

/* =========================
   DOTS
========================= */
.hero-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
}

.hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s cubic-bezier(.22, .61, .36, 1);
}

.hero-dot.active {
    background: var(--primary-color, #e67e22);
    width: 22px;
    border-radius: 4px;
}

/* =========================
   DARK MODE (triple-target)
========================= */

[data-theme="dark"] .hero-dot {
    background: rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .hero-dot.active {
    background: var(--primary-color, #e67e22);
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .hero-dot {
        background: rgba(255, 255, 255, 0.25);
    }
    [data-theme="auto"] .hero-dot.active {
        background: var(--primary-color, #e67e22);
    }
}

/* =========================
   RESPONSIVE
========================= */

/* Tablet */
@media (max-width: 1024px) {
    .hero-slide {
        width: 135px;
    }
    .hero-compact { --hero-height: 150px; }
    .hero-tall    { --hero-height: 210px; }
}

/* Mobil */
@media (max-width: 768px) {
    .hero-slide {
        width: 115px;
    }
    .hero-compact { --hero-height: 130px; }
    .hero-tall    { --hero-height: 180px; }
    .hero-carousel-track {
        gap: 10px;
        padding: 0 12px;
    }
    .hero-slide-title {
        font-size: 12px;
    }
    .hero-slide-price {
        font-size: 10px;
    }
    .hero-slide-overlay {
        padding: 8px 10px;
    }
    .hero-slide-cart-hint {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    .hero-slide-badges {
        top: 4px;
        right: 4px;
        gap: 2px;
    }
    .hero-slide-badges .item-badge {
        width: 18px;
        height: 18px;
        font-size: 0.45rem;
    }
}

/* Kis mobil */
@media (max-width: 380px) {
    .hero-slide {
        width: 100px;
    }
    .hero-compact { --hero-height: 120px; }
    .hero-tall    { --hero-height: 160px; }
    .hero-carousel-track {
        gap: 8px;
        padding: 0 10px;
    }
    .hero-slide-title {
        font-size: 11px;
    }
    .hero-slide-overlay {
        padding: 6px 8px;
    }
    .hero-slide-badges {
        top: 3px;
        right: 3px;
        gap: 1px;
    }
    .hero-slide-badges .item-badge {
        width: 16px;
        height: 16px;
        font-size: 0.4rem;
    }
    .hero-slide-cart-hint {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
}

/* =========================
   ACCESSIBILITY
========================= */

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-track {
        scroll-behavior: auto;
    }
    .hero-slide,
    .hero-slide-image {
        transition: none;
    }
    .hero-progress {
        display: none;
    }
    /* Sweep animation off */
    .hero-slide::before {
        display: none;
    }
}
