/* PakMart cinematic 3D luxury hero */
.hero-cinema {
    position: relative;
    min-height: min(92vh, 920px);
    padding: 5rem 0 3rem;
    overflow: hidden;
    isolation: isolate;
}

.hero-cinema-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201, 169, 98, 0.14), transparent 60%),
        radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.04), transparent 45%),
        linear-gradient(180deg, #0c0c0e 0%, #070708 78%);
    z-index: 0;
}

.hero-cinema-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: heroGlowDrift 14s ease-in-out infinite alternate;
}

.hero-cinema-glow-a {
    width: 280px;
    height: 280px;
    background: rgba(201, 169, 98, 0.35);
    top: 10%;
    left: 8%;
}

.hero-cinema-glow-b {
    width: 320px;
    height: 320px;
    background: rgba(232, 213, 163, 0.18);
    bottom: 8%;
    right: 5%;
    animation-delay: -6s;
}

.hero-cinema-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
    opacity: 0.35;
}

.hero-cinema-shimmer {
    position: absolute;
    inset: -50% -20%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
    animation: heroShimmer 8s linear infinite;
    pointer-events: none;
}

.hero-cinema-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 2rem;
    align-items: center;
}

.hero-cinema-copy {
    max-width: 560px;
}

.hero-stage-wrap {
    position: relative;
    min-height: 420px;
    display: grid;
    place-items: center;
}

.hero-stage {
    position: relative;
    width: min(100%, 520px);
    height: 420px;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.hero-orbit-ring {
    position: absolute;
    inset: 12% 8%;
    border: 1px solid rgba(201, 169, 98, 0.25);
    border-radius: 50%;
    transform: rotateX(72deg);
    box-shadow: 0 0 40px rgba(201, 169, 98, 0.12);
    animation: heroRingSpin 24s linear infinite;
}

.hero-float-card {
    --radius: 210px;
    --tilt: -8deg;
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(120px, 28vw, 168px);
    aspect-ratio: 4/5;
    margin-left: calc(clamp(120px, 28vw, 168px) / -2);
    margin-top: calc(clamp(120px, 28vw, 168px) * 1.25 / -2);
    transform-style: preserve-3d;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 98, 0.35);
    background: rgba(0, 0, 0, 0.55);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 30px rgba(201, 169, 98, 0.12);
    animation: heroOrbit 22s linear infinite;
    animation-delay: calc(var(--i) * -4.4s);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
    color: #fff;
}

.hero-float-card:hover {
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.65),
        0 0 40px rgba(201, 169, 98, 0.28);
    z-index: 5;
}

.hero-float-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: translateZ(18px) scale(1.02);
    filter: contrast(1.05) saturate(1.05);
    background: linear-gradient(145deg, #121214 0%, #0a0a0c 100%);
    padding: 0.35rem;
}

.hero-float-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent 42%, rgba(201, 169, 98, 0.15));
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero-float-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.45rem 0.5rem;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35));
    color: #f5f0e6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-stage-caption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: var(--gold-light);
    opacity: 0.95;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

@keyframes heroOrbit {
    from { transform: rotateY(0deg) translateZ(210px) rotateY(0deg) rotateX(var(--tilt)); }
    to { transform: rotateY(360deg) translateZ(210px) rotateY(-360deg) rotateX(var(--tilt)); }
}

@keyframes heroRingSpin {
    from { transform: rotateX(72deg) rotateZ(0deg); }
    to { transform: rotateX(72deg) rotateZ(360deg); }
}

@keyframes heroGlowDrift {
    from { transform: translate(0, 0); }
    to { transform: translate(24px, -18px); }
}

@keyframes heroShimmer {
    from { transform: translateX(-20%) rotate(8deg); }
    to { transform: translateX(20%) rotate(8deg); }
}

.category-hero {
    margin-top: 1rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.category-hero-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    aspect-ratio: 16/10;
    background: linear-gradient(145deg, #121214 0%, #0a0a0c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0.75rem;
}

.product-card-footer {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.product-desc {
    margin: 0.35rem 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-view-details {
    width: 100%;
    text-align: center;
}

@media (max-width: 991px) {
    .hero-cinema-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cinema-copy {
        margin: 0 auto;
    }

    .hero-cta {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .hero-stage-wrap {
        min-height: 340px;
    }

    .hero-stage {
        height: 340px;
    }

    .hero-float-card {
        --radius: 170px;
        animation-name: heroOrbitMobile;
    }

    @keyframes heroOrbitMobile {
        from { transform: rotateY(0deg) translateZ(170px) rotateY(0deg) rotateX(-6deg); }
        to { transform: rotateY(360deg) translateZ(170px) rotateY(-360deg) rotateX(-6deg); }
    }
}

@media (max-width: 575px) {
    .hero-cinema {
        padding-top: 4.5rem;
        min-height: auto;
    }

    .hero-stage {
        height: 300px;
        width: 100%;
    }

    .hero-float-card {
        width: 108px;
        margin-left: -54px;
        margin-top: -68px;
    }

    .category-hero {
        padding: 1.25rem;
    }
}

.hero-search-block {
    margin-top: 1.25rem;
    position: relative;
    max-width: 420px;
}

.hero-search-panel {
    margin-top: 0.65rem;
    position: relative;
}

.hero-search-panel .search-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 20;
    max-height: 280px;
    overflow: auto;
}

@media (max-width: 991px) {
    .hero-search-block {
        max-width: 100%;
    }
}

/* Mobile ONLY — hide title/subtitle; order: tagline → animation → CTAs → search */
@media (max-width: 767.98px) {
    .hero-cinema-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .hero-cinema-copy {
        display: contents;
        max-width: none;
    }

    .hero-cinema-copy .hero-eyebrow {
        order: 1;
        margin-bottom: 0;
    }

    .hero-cinema-copy .hero-title,
    .hero-cinema-copy .hero-subtitle {
        display: none !important;
    }

    .hero-stage-wrap {
        order: 2;
        width: 100%;
    }

    .hero-cinema-copy .hero-cta {
        order: 3;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        gap: 0.75rem;
    }

    .hero-cinema-copy .hero-search-block {
        order: 4;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-cinema-copy .hero-search-toggle {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-float-card,
    .hero-orbit-ring,
    .hero-cinema-glow,
    .hero-cinema-shimmer {
        animation: none !important;
    }

    .hero-float-card {
        position: relative;
        display: inline-block;
        margin: 0.5rem;
        left: auto;
        top: auto;
        transform: none !important;
    }

    .hero-stage {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        perspective: none;
    }
}
