/* =========================================
   Home Akcios Hero (1 nagy + mini sav)
   ========================================= */

.home-sale-hero {
    --sale-radius: 20px;
    --sale-border: rgba(15, 23, 42, .12);
    --sale-muted: rgba(71, 85, 105, .92);
    --sale-accent: var(--nk-accent, #f59e0b);
    --sale-bg: linear-gradient(150deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
    --sale-shadow: 0 20px 45px rgba(15, 23, 42, .08);

    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 16px 8px;
}

.home-sale-hero-head {
    margin-bottom: 14px;
}

.sale-hero-main {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 18px;
    border-radius: var(--sale-radius);
    border: 1px solid var(--sale-border);
    background: var(--sale-bg);
    box-shadow: var(--sale-shadow);
    overflow: hidden;
}

.sale-hero-main::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 78% 20%, rgba(250, 204, 21, .14), transparent 46%);
}

.sale-hero-main-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .18;
    pointer-events: none;
}

.sale-hero-main-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sale-hero-media,
.sale-hero-content {
    position: relative;
    z-index: 1;
}

.sale-hero-media {
    min-height: 340px;
    display: grid;
    place-items: center;
    background: linear-gradient(170deg, rgba(255,255,255,.95), rgba(241,245,249,.92));
    border-right: 1px solid rgba(15, 23, 42, .08);
    overflow: hidden;
}

.sale-hero-media::after {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 14px;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        rgba(226, 232, 240, .45) 22%,
        rgba(255, 255, 255, .82) 36%,
        rgba(226, 232, 240, .45) 50%
    );
    background-size: 220% 100%;
    transition: opacity .18s ease;
}

@keyframes saleHeroMediaShimmer {
    0% {
        background-position: 110% 0;
    }
    100% {
        background-position: -120% 0;
    }
}

.sale-hero-media img {
    width: min(100%, 520px);
    max-height: 360px;
    object-fit: contain;
    transition: opacity .22s ease;
}

.home-sale-hero.is-loading .sale-hero-media img {
    opacity: .55;
}

.home-sale-hero.is-loading .sale-hero-media::after {
    opacity: .94;
    animation: saleHeroMediaShimmer 1.05s linear infinite;
}

.sale-hero-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    padding: 26px 24px;
}

.sale-hero-badge {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7c2d12;
    background: linear-gradient(180deg, rgba(253, 224, 71, .94), rgba(251, 191, 36, .92));
    border: 1px solid rgba(180, 83, 9, .22);
}

.sale-hero-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.18;
    letter-spacing: -.02em;
    /* Reserve height so autoplay doesn't shift the page while user is scrolled down. */
    min-height: 2.36em; /* 2 lines @ 1.18 line-height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sale-hero-prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.sale-hero-price-current {
    font-size: clamp(1.4rem, 2.3vw, 2rem);
    font-weight: 900;
    letter-spacing: -.02em;
    color: #111827;
}

.sale-hero-price-old {
    font-size: 1rem;
    color: var(--sale-muted);
    text-decoration: line-through;
}

.sale-hero-price-old.is-hidden {
    display: none;
}

.sale-hero-savings {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(71, 85, 105, .95);
}

.sale-hero-savings.is-hidden {
    display: none;
}

.sale-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.sale-hero-addform {
    margin: 0;
}

.sale-hero-cta {
    width: fit-content;
    min-width: 170px;
}

.sale-hero-quickadd {
    width: fit-content;
    min-width: 170px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, .48);
    background: rgba(255, 255, 255, .92);
    color: #0f172a;
    font-weight: 850;
    letter-spacing: -.01em;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .10);
    transition:
        transform 160ms cubic-bezier(.22, .61, .36, 1),
        background 160ms cubic-bezier(.22, .61, .36, 1),
        border-color 160ms cubic-bezier(.22, .61, .36, 1),
        box-shadow 160ms cubic-bezier(.22, .61, .36, 1);
}

@media (hover: hover) and (pointer: fine) {
    .sale-hero-quickadd:hover {
        background: rgba(255, 255, 255, .98);
        border-color: rgba(245, 158, 11, .66);
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
    }
}

.sale-hero-quickadd:active {
    transform: translateY(0);
}

.sale-hero-quickadd:focus-visible {
    outline: 2px solid rgba(245, 158, 11, .40);
    outline-offset: 2px;
}

.sale-hero-strip-wrap {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.sale-hero-nav {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .10);
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.sale-hero-nav:disabled {
    opacity: .42;
    cursor: default;
}

.sale-hero-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px;
}

.sale-hero-strip::-webkit-scrollbar {
    display: none;
}

.sale-hero-thumb {
    flex: 0 0 180px;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 8px;
    text-align: left;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(255, 255, 255, .92);
    color: #0f172a;
    cursor: pointer;
    scroll-snap-align: start;
    font: inherit;
    overflow: hidden;
    transition:
        transform 160ms cubic-bezier(.22, .61, .36, 1),
        box-shadow 160ms cubic-bezier(.22, .61, .36, 1),
        border-color 160ms cubic-bezier(.22, .61, .36, 1),
        background-color 160ms cubic-bezier(.22, .61, .36, 1);
}

@media (hover: hover) and (pointer: fine) {
    .sale-hero-thumb:hover {
        transform: translateY(-1px);
        border-color: rgba(245, 158, 11, .38);
        box-shadow: 0 10px 22px rgba(15, 23, 42, .10);
    }
}

@media (hover: none) {
    .sale-hero-thumb:active {
        transform: scale(.99);
    }
}

.sale-hero-thumb-media {
    height: 104px;
    border-radius: 12px;
    background: rgba(241, 245, 249, .75);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sale-hero-thumb-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sale-hero-thumb-name {
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
}

.sale-hero-thumb-price {
    display: block;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.sale-hero-thumb.is-active {
    border-color: rgba(245, 158, 11, .58);
    background: rgba(255, 255, 255, .98);
    box-shadow:
        0 0 0 2px rgba(245, 158, 11, .18),
        0 14px 28px rgba(15, 23, 42, .12);
}

.sale-hero-thumb.is-active .sale-hero-thumb-media {
    background: rgba(253, 230, 138, .30);
}

@media (max-width: 980px) {
    .sale-hero-main {
        grid-template-columns: 1fr;
    }

    .sale-hero-media {
        min-height: 280px;
        border-right: 0;
        border-bottom: 1px solid rgba(15, 23, 42, .08);
    }

    .sale-hero-strip-wrap {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
    }

    .sale-hero-thumb {
        flex-basis: 164px;
    }
}

@media (max-width: 640px) {
    .home-sale-hero {
        padding: 12px 10px 4px;
    }

    .home-sale-hero-head {
        margin-bottom: 10px;
    }

    .sale-hero-main {
        gap: 12px;
        border-radius: 18px;
    }

    .sale-hero-media {
        min-height: 180px;
    }

    .sale-hero-media img {
        width: min(100%, 320px);
        max-height: 200px;
    }

    .sale-hero-content {
        padding: 14px 14px 16px;
        gap: 10px;
    }

    .sale-hero-strip-wrap {
        grid-template-columns: 1fr;
    }

    .sale-hero-nav {
        display: none;
    }

    .sale-hero-thumb {
        flex-basis: 144px;
        padding: 8px;
    }

    .sale-hero-thumb-media {
        height: 92px;
    }

    .sale-hero-thumb-name {
        font-size: 13px;
        color: rgba(15, 23, 42, .92);
        min-height: 0;
    }

    .sale-hero-thumb-price {
        font-size: 13px;
        color: rgba(15, 23, 42, .92);
    }
}

@media (max-width: 430px) {
    /* User feedback: "Aktuális akciók" túl nagy mobilon. */
    .sale-hero-media {
        min-height: 150px;
    }

    .sale-hero-media img {
        width: min(100%, 280px);
        max-height: 160px;
    }

    .sale-hero-content {
        padding: 12px 12px 14px;
    }

    .sale-hero-title {
        font-size: 1.25rem;
        line-height: 1.12;
        word-break: break-word;
    }

    .sale-hero-cta {
        width: 100%;
        min-width: 0;
        font-size: 12px;
    }

    .sale-hero-thumb {
        flex-basis: 132px;
    }

    .sale-hero-thumb-media {
        height: 78px;
    }

    .sale-hero-thumb-name,
    .sale-hero-thumb-price {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sale-hero-thumb,
    .sale-hero-media img {
        transition: none !important;
    }

    .home-sale-hero.is-loading .sale-hero-media::after {
        animation: none !important;
    }
}
