/* ═══════════════════════════════════════════════════════
   GiftB360x Homepage — tigc.in design language
   Scoped to .gb-page — does NOT leak into Astra theme
═══════════════════════════════════════════════════════ */

.gb-page {
    --gb-black:    #111111;
    --gb-white:    #ffffff;
    --gb-red:      #e63329;
    --gb-red-d:    #c42820;
    --gb-gray-50:  #f8f8f8;
    --gb-gray-100: #f0f0f0;
    --gb-gray-200: #e0e0e0;
    --gb-gray-400: #999999;
    --gb-gray-600: #555555;
    --gb-font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-family: var(--gb-font);
    color: var(--gb-black);
    background: var(--gb-white);
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.5;
}
.gb-page *, .gb-page *::before, .gb-page *::after { box-sizing: border-box; margin: 0; padding: 0; }
.gb-page a { color: inherit; text-decoration: none; }
.gb-page img { display: block; max-width: 100%; }

/* ── Shared layout ── */
.gb-container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.gb-section-inner { max-width: 1280px; margin: 0 auto; padding: 48px 20px; }

.gb-section-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 24px;
}
.gb-section-title {
    font-size: 0.85rem; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--gb-black);
}
.gb-link-all {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--gb-gray-600);
    border-bottom: 1px solid var(--gb-gray-400); padding-bottom: 1px;
    transition: color 0.15s;
}
.gb-link-all:hover { color: var(--gb-black); border-color: var(--gb-black); }

/* ── Buttons ── */
.gb-btn-black {
    background: var(--gb-black); color: var(--gb-white); border: 2px solid var(--gb-black);
    padding: 11px 28px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; border-radius: 2px; transition: all 0.18s;
    display: inline-block; font-family: var(--gb-font); cursor: pointer;
}
.gb-btn-black:hover { background: var(--gb-white); color: var(--gb-black); }

.gb-btn-red {
    background: var(--gb-red); color: var(--gb-white); border: 2px solid var(--gb-red);
    padding: 11px 28px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; border-radius: 2px; transition: all 0.18s;
    display: inline-block; font-family: var(--gb-font); cursor: pointer;
}
.gb-btn-red:hover { background: var(--gb-red-d); border-color: var(--gb-red-d); }

/* ══════════════════════════════════════════════════════
   1. ANNOUNCEMENT BAR (marquee)
   — rendered by class-gift-hooks.php render_store_header()
   — override global.css static-bar styles here
══════════════════════════════════════════════════════ */
.gb-announcement {
    background: var(--gb-black) !important; color: var(--gb-white) !important;
    height: 36px !important; overflow: hidden !important;
    display: flex !important; align-items: center !important;
    padding: 0 !important; text-align: left !important;
}
.gb-announcement.is-hidden { display: none !important; }
.gb-marquee-track { display: flex; animation: gb-marquee 28s linear infinite; white-space: nowrap; }
.gb-marquee-track span { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; padding: 0 40px; flex-shrink: 0; }
@keyframes gb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ══════════════════════════════════════════════════════
   2. CATEGORY QUICK-NAV (icon strip below header)
   — shows exactly 4 items on screen, rest scroll
══════════════════════════════════════════════════════ */
.gb-cat-nav {
    background: var(--gb-white); border-bottom: 1px solid var(--gb-gray-200);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gb-cat-nav::-webkit-scrollbar { display: none; }
.gb-cat-nav__track {
    display: flex; gap: 0; padding: 10px 0;
    width: max-content; min-width: 100%;
}
.gb-cat-nav__item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 4px 10px 6px; cursor: pointer; flex-shrink: 0;
    text-decoration: none; color: var(--gb-black);
    /* On desktop: let items size naturally */
    min-width: 72px;
}
.gb-cat-nav__icon {
    width: 54px; height: 54px; background: var(--gb-gray-50);
    border: 1.5px solid var(--gb-gray-200); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: border-color 0.15s;
}
.gb-cat-nav__item:hover .gb-cat-nav__icon { border-color: var(--gb-black); }
.gb-cat-nav__icon img { width: 100%; height: 100%; object-fit: cover; }
.gb-cat-nav__emoji { font-size: 1.4rem; line-height: 1; }
.gb-cat-nav__label {
    font-size: 0.58rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--gb-gray-600); text-align: center;
    line-height: 1.2; width: 62px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════
   3. HERO — split layout (text left, portrait right)
══════════════════════════════════════════════════════ */
.gb-hero { position: relative; background: var(--gb-gray-50); overflow: hidden; }
.gb-hero__slide {
    display: none; align-items: center;
    min-height: 480px;   /* desktop: tall enough for split layout */
    padding: 60px 20px 80px; max-width: 1280px; margin: 0 auto; gap: 48px;
}
.gb-hero__slide.is-active { display: flex; }
.gb-hero__text { flex: 1; }
.gb-hero__eyebrow {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--gb-red);
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.gb-hero__eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--gb-red); flex-shrink: 0; }
.gb-hero__headline {
    font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1;
    letter-spacing: -0.03em; color: var(--gb-black);
    margin-bottom: 16px; white-space: pre-line;
}
.gb-hero__sub { font-size: 1rem; color: var(--gb-gray-600); margin-bottom: 28px; }
.gb-hero__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.gb-hero__image {
    flex: 1; aspect-ratio: 3/4; max-width: 360px;
    background: var(--gb-gray-100); border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem; overflow: hidden;
}
.gb-hero__image img { width: 100%; height: 100%; object-fit: cover; }
.gb-hero__dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
}
.gb-hero__dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--gb-gray-400);
    cursor: pointer; transition: all 0.2s; border: none; padding: 0; font-size: 0;
}
.gb-hero__dot.is-active { background: var(--gb-black); width: 20px; border-radius: 3px; }

/* ══════════════════════════════════════════════════════
   4. TRUST BADGES — horizontal row with dividers (max 3)
══════════════════════════════════════════════════════ */
.gb-badges {
    border-top: 1px solid var(--gb-gray-200);
    border-bottom: 1px solid var(--gb-gray-200);
    background: var(--gb-white);
}
.gb-badges__inner {
    max-width: 1280px; margin: 0 auto; padding: 16px 20px;
    display: flex; justify-content: center; align-items: stretch;
}
.gb-badge {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 32px; border-right: 1px solid var(--gb-gray-200);
    flex: 1; justify-content: center; max-width: 340px;
}
.gb-badge:last-child { border-right: none; }
.gb-badge__icon { display: flex; flex-shrink: 0; }
.gb-badge__icon svg { width: 22px; height: 22px; stroke: var(--gb-black); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gb-badge__text { font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.3; }

/* ══════════════════════════════════════════════════════
   5. PRODUCTS GRID (New Arrivals + Bestsellers)
   — override global.css aspect-ratio: 1 !important conflict
══════════════════════════════════════════════════════ */
.gb-products { background: var(--gb-white); }
.gb-products__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gb-product-card { cursor: pointer; border: none !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; transform: none !important; }
.gb-product-card:hover { transform: none !important; box-shadow: none !important; }
.gb-product-card__img-wrap {
    aspect-ratio: 3/4 !important; background: var(--gb-gray-50);
    overflow: hidden !important; position: relative; margin-bottom: 10px;
    display: block;
}
.gb-product-card__img-wrap img { width: 100% !important; height: 100% !important; object-fit: cover !important; transition: opacity 0.2s; }
.gb-product-card:hover .gb-product-card__img-wrap img { opacity: 0.85; }
.gb-product-card__placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 3.5rem; background: var(--gb-gray-50);
}
.gb-product-card__badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--gb-red); color: white;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; padding: 3px 8px;
}
.gb-product-card__name { font-size: 0.85rem; font-weight: 600; color: var(--gb-black); margin-bottom: 6px; line-height: 1.3; }
.gb-product-card__name a { color: inherit; text-decoration: none; }
.gb-product-card__price { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* WC price HTML targets */
.gb-product-card__price .price { display: flex; align-items: center; gap: 6px; }
.gb-product-card__price .woocommerce-Price-amount { font-size: 0.9rem; font-weight: 700; color: var(--gb-black); }
.gb-product-card__price del .woocommerce-Price-amount { font-size: 0.78rem; font-weight: 400; color: var(--gb-gray-400); }
.gb-product-card__price ins { text-decoration: none; }
.gb-product-card__price ins .woocommerce-Price-amount { color: var(--gb-black); }
.gb-product-card__off { font-size: 0.72rem; font-weight: 700; color: var(--gb-red); }

/* ══════════════════════════════════════════════════════
   6. SHOP BY COLLECTION — 8-col square grid
   — override global.css .gb-cat-card { aspect-ratio: 3/4 } conflict
══════════════════════════════════════════════════════ */
.gb-categories { background: var(--gb-gray-50); border-top: 1px solid var(--gb-gray-200); border-bottom: 1px solid var(--gb-gray-200); }
.gb-categories__grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.gb-cat-card { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 8px; cursor: pointer; text-decoration: none; aspect-ratio: auto !important; overflow: visible !important; }
.gb-cat-card__img {
    width: 100%; aspect-ratio: 1; background: var(--gb-white);
    border: 1.5px solid var(--gb-gray-200); border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; overflow: hidden; transition: border-color 0.2s;
}
.gb-cat-card:hover .gb-cat-card__img { border-color: var(--gb-black); }
.gb-cat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.gb-cat-card__label {
    font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--gb-gray-600); text-align: center;
    line-height: 1.3; transition: color 0.2s;
}
.gb-cat-card:hover .gb-cat-card__label { color: var(--gb-black); }

/* ══════════════════════════════════════════════════════
   7. PROMO BANNERS (Deals by price — 4-col tiles)
══════════════════════════════════════════════════════ */
.gb-promos { background: var(--gb-gray-50); border-top: 1px solid var(--gb-gray-200); border-bottom: 1px solid var(--gb-gray-200); }
.gb-promos__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gb-promo-card {
    aspect-ratio: 4/3; background: var(--gb-gray-100);
    position: relative; overflow: hidden; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; border: 1.5px solid var(--gb-gray-200); transition: border-color 0.2s;
    text-decoration: none;
}
.gb-promo-card:hover { border-color: var(--gb-black); }
.gb-promo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.gb-promo-card__placeholder { position: absolute; inset: 0; background: var(--gb-gray-100); }
.gb-promo-card__emoji { position: relative; z-index: 1; font-size: 2.5rem; }
.gb-promo-card__label {
    position: relative; z-index: 1; font-size: 0.8rem; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--gb-black);
}

/* ══════════════════════════════════════════════════════
   8. DEAL BANNER — full-width dark with red badge
══════════════════════════════════════════════════════ */
.gb-deal { background: var(--gb-black); }
.gb-deal.is-hidden { display: none; }
.gb-deal__inner {
    max-width: 1280px; margin: 0 auto; padding: 48px 20px;
    display: flex; align-items: center; gap: 48px;
}
.gb-deal__content { flex: 1; }
.gb-deal__eyebrow {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--gb-red); margin-bottom: 12px; display: block;
}
.gb-deal__content h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em;
    color: var(--gb-white); margin-bottom: 10px; line-height: 1.15;
}
.gb-deal__content p { font-size: 0.88rem; color: #888; margin-bottom: 24px; }
.gb-deal__badge {
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--gb-red); color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.gb-deal__badge-pct { font-size: 2.2rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.gb-deal__badge-text { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .gb-categories__grid { grid-template-columns: repeat(4, 1fr); }
    .gb-products__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .gb-hero__image { display: none; }
    /* KEY FIX: remove min-height + change alignment so hero is content-height only.
       With min-height + align-items:center, text was centered in 500px → 170px empty gray above text. */
    .gb-hero__slide {
        min-height: 0 !important;
        align-items: flex-start !important;
        padding: 36px 16px 48px !important;
    }
    .gb-hero__headline { font-size: 2.2rem; }
    .gb-products__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .gb-promos__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gb-categories__grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .gb-deal__inner { flex-direction: column; gap: 24px; text-align: center; padding: 36px 16px; }
    .gb-deal__badge { width: 96px; height: 96px; }
    .gb-section-inner { padding: 36px 16px; }

    /* Trust badges: stack vertically on mobile, left-aligned */
    .gb-badges__inner { flex-direction: column; padding: 0; }
    .gb-badge {
        border-right: none; border-bottom: 1px solid var(--gb-gray-200);
        padding: 14px 20px; max-width: none; justify-content: flex-start;
    }
    .gb-badge:last-child { border-bottom: none; }

    /* Quick-cat: exactly 4 visible — each item takes 25% of viewport */
    .gb-cat-nav__item { min-width: calc(25vw - 4px); }
    .gb-cat-nav__icon { width: 52px; height: 52px; }
}

@media (max-width: 480px) {
    .gb-hero__headline { font-size: 1.9rem; }
    .gb-categories__grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .gb-cat-card__label { font-size: 0.6rem; }
    .gb-cat-card__img { font-size: 1.4rem; }
    .gb-section-inner { padding: 32px 14px; }
    .gb-products__grid { gap: 10px; }
    .gb-product-card__name { font-size: 0.8rem; }
    .gb-cat-nav__item { min-width: calc(25vw - 2px); }
    .gb-cat-nav__icon { width: 48px; height: 48px; }
    .gb-cat-nav__label { width: 56px; font-size: 0.55rem; }
}
