/* ═══════════════════════════════════════════════════════════════
   GILAF STORE — Homepage Hero & Category Redesign v2
   Premium contained layout matching reference design
   Isolated namespace: .gf-hero-*, .gf-cat-*
   ═══════════════════════════════════════════════════════════════ */

/* ─── Hero Banner Container ─────────────────────────────────── */
.gf-hero-wrap {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px 0 24px;
    padding-top: var(--gf-hero-top-offset, 92px);
}

.gf-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: #eae4da;
}

/* ─── Background Slider Layer ───────────────────────────────── */
.gf-hero .gf-hero-bg-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    background: #eae4da;
}

.gf-hero .gf-hero-bg-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    transition: opacity 0.8s ease;
}

.gf-hero .gf-hero-bg-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.gf-hero .gf-hero-bg-slide.slide-in {
    opacity: 1;
    visibility: visible;
    z-index: 3;
    animation: gfSlideIn 0.9s ease-in-out forwards;
}

.gf-hero .gf-hero-bg-slide.slide-out {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    animation: gfSlideOut 0.9s ease-in-out forwards;
}

@keyframes gfSlideIn {
    0%   { opacity: 0; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes gfSlideOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.97); }
}

.gf-hero .gf-hero-bg-slide img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Default slide overlay for text readability */
.gf-hero .gf-hero-bg-slide.gf-hero-default::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(105deg, rgba(26,60,52,0.55) 0%, rgba(26,60,52,0.20) 55%, transparent 75%);
    z-index: 1;
}

/* Uploaded slides - stronger left gradient for text readability */
.gf-hero .gf-hero-bg-slide:not(.gf-hero-default)::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 70%; height: 100%;
    background: linear-gradient(to right, rgba(20,50,42,0.65) 0%, rgba(26,60,52,0.22) 60%, transparent 100%);
    z-index: 1;
}

/* ─── Hero Content Overlay — full cover, pointer-events:none ── */
.gf-hero-content {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* ─── Text Block — upper-left area, never touches CTA zone ──── */
.gf-hero-text-block {
    position: absolute;
    top: 44px;
    left: 48px;
    max-width: 460px;
    max-height: calc(100% - 132px);
    overflow: hidden;
    pointer-events: auto;
}

.gf-hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #C5A059;
    margin-bottom: 12px;
}

.gf-hero-tagline i {
    font-size: 0.72rem;
    color: #C5A059;
}

.gf-hero-text-block h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.18;
    color: #fff;
    margin: 0 0 14px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gf-hero-text-block h1 .gf-hero-gold {
    color: #C5A059;
    font-style: italic;
}

.gf-hero-text-block p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin: 0;
    max-width: 380px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ─── CTA Row — FIXED bottom-left, never pushed by text ──────── */
.gf-hero-cta-row {
    position: absolute;
    bottom: 44px;
    left: 48px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: nowrap;
    pointer-events: auto;
    z-index: 6;
}

.gf-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    min-width: 178px;
    background: linear-gradient(135deg, #1f4d3a 0%, #2d6a4f 45%, #c6a55b 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 5px 20px rgba(31,77,58,0.45), 0 2px 8px rgba(198,165,91,0.25);
    position: relative;
    overflow: hidden;
}

.gf-hero-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 60%);
    border-radius: inherit;
    pointer-events: none;
}

.gf-hero-cta:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 32px rgba(198,165,91,0.55), 0 4px 12px rgba(31,77,58,0.4);
    filter: brightness(1.08);
    color: #fff;
}

.gf-hero-cta i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}


.gf-hero-cta-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    min-width: 168px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.65);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.gf-hero-cta-outline:hover {
    border-color: #C5A059;
    color: #C5A059;
    background: rgba(197,160,89,0.08);
}

/* ─── Hero Slider Dots (CENTERED) ──────────────────────────── */
.gf-hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.gf-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.gf-hero-dot.active {
    background: #1A3C34;
    transform: scale(1.15);
}

.gf-hero-dot:hover {
    background: rgba(255,255,255,0.8);
}

/* ─── Hero text animation ───────────────────────────────────── */
.gf-hero-text-block {
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.gf-hero-text-block.gf-hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    visibility: hidden;
    /* No height:0 — absolutely positioned, no flow impact */
}


/* ═══════════════════════════════════════════════════════════════
   CATEGORY SECTION — Large evenly-distributed cards
   ═══════════════════════════════════════════════════════════════ */

.gf-cat-section {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 36px 24px 0 24px;
}

.gf-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.gf-cat-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--color-green, #1A3C34);
    margin: 0;
    font-style: italic;
}

.gf-cat-header a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-green, #1A3C34);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s ease;
}

.gf-cat-header a:hover {
    color: var(--color-gold, #C5A059);
}

.gf-cat-header a i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.gf-cat-header a:hover i {
    transform: translateX(3px);
}

/* ─── Category Grid Row ─────────────────────────────────────── */
.gf-cat-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 18px;
    padding-bottom: 4px;
}

/* ─── Category Card — Large Premium Style ───────────────────── */
.gf-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--color-text, #2C241B);
    transition: transform 0.25s ease;
}

.gf-cat-card:hover {
    transform: translateY(-4px);
}

.gf-cat-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.9;
    border-radius: 14px;
    background: linear-gradient(145deg, #faf7f2 0%, #f2ebe1 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.gf-cat-card:hover .gf-cat-card-img {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.gf-cat-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Placeholder icon when no image */
.gf-cat-card-img .gf-cat-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #C5A059;
}

.gf-cat-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: var(--color-text, #2C241B);
}

/* ─── "View All" Card ──────────────────────────────────────── */
.gf-cat-card-viewall .gf-cat-card-img {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 2px solid rgba(26,60,52,0.35);
    box-shadow: 0 4px 14px rgba(26,60,52,0.10);
}

.gf-cat-card-viewall .gf-cat-card-img i {
    font-size: 1.7rem;
    color: #1A3C34;
    transition: transform 0.3s ease, color 0.3s ease;
}

.gf-cat-card-viewall:hover .gf-cat-card-img {
    border-color: #C5A059;
    background: rgba(197,160,89,0.08);
    box-shadow: 0 8px 24px rgba(197,160,89,0.25);
    transform: translateY(-3px);
}

.gf-cat-card-viewall:hover .gf-cat-card-img i {
    transform: translateX(5px);
    color: #C5A059;
}

.gf-cat-card-viewall .gf-cat-card-title {
    color: var(--color-green, #1A3C34);
    font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (768–1024px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .gf-hero-wrap {
        padding: 0 16px 0 16px;
        padding-top: var(--gf-hero-top-offset, 80px);
    }

    .gf-hero {
        min-height: 340px;
        border-radius: 14px;
    }

    .gf-hero-text-block {
        top: 36px;
        left: 36px;
        max-width: 380px;
        max-height: calc(100% - 118px);
    }

    .gf-hero-cta-row {
        bottom: 36px;
        left: 36px;
        gap: 12px;
    }

    .gf-hero-text-block h1 {
        font-size: 2rem;
    }

    .gf-hero-text-block p {
        font-size: 0.88rem;
    }

    .gf-cat-section {
        padding: 28px 16px 0 16px;
    }

    .gf-cat-row {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 14px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 767px)
   Split layout: image fills top zone, CTAs in dark strip below.
   No content cropped. No button overlap on product imagery.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* ─── Full-width edge-to-edge: remove all side spacing ─── */
    .gf-hero-wrap {
        padding: 0;
        padding-top: var(--gf-hero-top-offset, 70px);
        max-width: 100%;
        margin: 0;
    }

    /* Hero: locked aspect ratio = same container on every phone width */
    .gf-hero {
        aspect-ratio: 13 / 14;  /* 780×840 uploads fill this exactly, zero crop */
        min-height: 320px;      /* floor fallback for old browsers only */
        border-radius: 0;
        background: #162e27;    /* dark green — fills any sub-pixel gaps */
    }

    /* Image slider: fills full height — no CTA strip by default */
    .gf-hero .gf-hero-bg-slider {
        right: 0;
        bottom: 0;
        width: auto;
        height: auto;
        background: #162e27;    /* dark bg ensures no beige bleed on contain edges */
    }

    /* Gradient bridge — hidden by default (shown only when CTA strip enabled) */
    .gf-hero::before {
        content: '';
        position: absolute;
        bottom: 90px;
        left: 0; right: 0;
        height: 52px;
        background: linear-gradient(to bottom, transparent 0%, rgba(14, 40, 30, 0.92) 100%);
        z-index: 3;
        pointer-events: none;
        display: none;
    }

    /* Image: centered — product stays fully visible with 13:14 upload ratio */
    .gf-hero .gf-hero-bg-slide img {
        object-position: center center;
    }

    /* ── Text block: stays in the upper image zone ── */
    .gf-hero-tagline {
        font-size: 0.58rem;
        letter-spacing: 2px;
        margin-bottom: 6px;
    }

    .gf-hero-text-block {
        top: 22px;
        left: 20px;
        max-width: calc(100% - 56px);
        max-height: calc(100% - 138px);
    }

    .gf-hero-text-block h1 {
        font-size: 1.42rem;
        margin-bottom: 8px;
    }

    .gf-hero-text-block p {
        font-size: 0.78rem;
        max-width: 240px;
    }

    /* ── CTA row: HIDDEN by default on mobile (button-free clean banner) ── */
    .gf-hero-cta-row {
        display: none;
        bottom: 20px;
        left: 20px;
        right: 20px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .gf-hero-cta {
        flex: 1;
        min-width: 128px;
        padding: 11px 18px;
        font-size: 0.8rem;
    }

    .gf-hero-cta-outline {
        flex: 1;
        min-width: 128px;
        padding: 11px 14px;
        font-size: 0.8rem;
    }


    /* ── Mobile CTA modifier: hidden ── */
    .gf-hero--mob-cta-hidden .gf-hero-cta-row {
        display: none !important;
    }
    .gf-hero--mob-cta-hidden .gf-hero-bg-slider {
        bottom: 0 !important;
    }
    .gf-hero--mob-cta-hidden::before {
        display: none !important;
    }
    .gf-hero--mob-cta-hidden .gf-hero-dots {
        bottom: 16px !important;
    }

    /* ── Mobile CTA modifier: bottom-center ── */
    .gf-hero--mob-cta-center .gf-hero-cta-row {
        left: 0;
        right: 0;
        padding: 0 20px;
        justify-content: center;
        align-items: center;
    }

    /* ── Dots: at bottom of image (no CTA strip below) ── */
    .gf-hero-dots {
        bottom: 16px;
        gap: 8px;
    }

    .gf-hero-dot {
        width: 8px;
        height: 8px;
    }

    /* ── Category — horizontal scroll on mobile ── */
    .gf-cat-section {
        padding: 24px 12px 0 12px;
    }

    .gf-cat-header h2 {
        font-size: 1.2rem;
    }

    .gf-cat-row {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 14px;
        padding-bottom: 8px;
    }

    .gf-cat-row::-webkit-scrollbar {
        display: none;
    }

    .gf-cat-card {
        flex: 0 0 120px;
    }

    .gf-cat-card-img {
        aspect-ratio: 1 / 0.85;
    }

    .gf-cat-card-title {
        font-size: 0.78rem;
    }

    .gf-cat-card-img .gf-cat-placeholder {
        font-size: 2.2rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   DEVICE SEPARATION — strict: no cross-device image fallback
   ═══════════════════════════════════════════════════════════════ */
/* Desktop-only slide: hidden on all mobile/small-tablet screens */
@media (max-width: 767px) {
    .gf-hero-bg-slide--desktop-only {
        display: none !important;
    }
}
/* Mobile-only slide: hidden on desktop/large-tablet screens */
@media (min-width: 768px) {
    .gf-hero-bg-slide--mobile-only {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE CTA STRIP — opt-in via admin (default: hidden)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .gf-hero--mob-cta-show .gf-hero-bg-slider   { bottom: 90px !important; }
    .gf-hero--mob-cta-show::before              { display: block !important; }
    .gf-hero--mob-cta-show .gf-hero-cta-row     { display: flex !important; }
    .gf-hero--mob-cta-show .gf-hero-dots        { bottom: 98px !important; }
    /* centered variant */
    .gf-hero--mob-cta-show.gf-hero--mob-cta-center .gf-hero-cta-row {
        left: 0; right: 0; padding: 0 20px;
        justify-content: center; align-items: center;
    }
}
@media (max-width: 400px) {
    .gf-hero--mob-cta-show .gf-hero-bg-slider   { bottom: 96px !important; }
    .gf-hero--mob-cta-show::before              { bottom: 96px !important; }
    .gf-hero--mob-cta-show .gf-hero-dots        { bottom: 104px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL PHONES (≤ 480px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .gf-hero {
        min-height: 320px;  /* aspect-ratio:13/14 controls; this is just a floor */
    }

    .gf-hero-text-block h1 {
        font-size: 1.25rem;
    }

    .gf-hero-cta,
    .gf-hero-cta-outline {
        padding: 10px 14px;
        font-size: 0.76rem;
        min-width: 116px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALLEST PHONES (≤ 400px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
    .gf-hero {
        min-height: 320px;  /* aspect-ratio:13/14 controls; this is just a floor */
    }

    /* No CTA strip by default — slider + dots at natural bottom */
    .gf-hero .gf-hero-bg-slider {
        bottom: 0;
    }

    .gf-hero-dots {
        bottom: 16px;
    }

    .gf-hero-text-block {
        top: 18px;
        left: 16px;
        max-width: calc(100% - 48px);
        max-height: calc(100% - 142px);
    }

    .gf-hero-text-block h1 {
        font-size: 1.12rem;
    }

    .gf-hero-text-block p {
        font-size: 0.72rem;
        max-width: 190px;
    }

    /* Stack buttons vertically on very small screens */
    .gf-hero-cta-row {
        bottom: 18px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        gap: 8px;
    }

    .gf-hero-cta,
    .gf-hero-cta-outline {
        flex: none;
        width: 100%;
        min-width: unset;
        padding: 10px 16px;
        font-size: 0.76rem;
    }

    .gf-cat-card {
        flex: 0 0 100px;
    }

    .gf-cat-card-title {
        font-size: 0.7rem;
    }
}
