/* ═══════════════════════════════════════════════════════
   GiftB360x — Global CSS
   Shared across all pages: shop, product, cart, checkout,
   thank-you, my-account.
   Scoped to .gb-page so Astra is never affected.
═══════════════════════════════════════════════════════ */

.gb-page {
    --gb-primary:    #1a1a1a;
    --gb-secondary:  #f5a623;
    --gb-accent:     #e63946;
    --gb-bg:         #ffffff;
    --gb-bg-soft:    #f7f7f7;
    --gb-bg-dark:    #1a1a1a;
    --gb-text:       #1a1a1a;
    --gb-text-muted: #6b7280;
    --gb-border:     #e5e7eb;
    --gb-success:    #16a34a;
    --gb-radius:     8px;
    --gb-radius-lg:  14px;
    --gb-shadow:     0 2px 12px rgba(0,0,0,0.07);
    --gb-shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
    --gb-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-family: var(--gb-font);
    color: var(--gb-text);
    background: var(--gb-bg);
    -webkit-font-smoothing: antialiased;
}

.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%; }
.gb-page ul { list-style: none; }
.gb-page input, .gb-page select, .gb-page textarea, .gb-page button { font-family: inherit; }

/* ── Container — single source of truth for max-width ── */
.gb-container { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.gb-container--narrow { max-width: 840px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

/* Sections that are themselves the container get no extra side padding */
section.gb-container, div.gb-container { padding-left: 24px; padding-right: 24px; }

/* ── Breadcrumb ──────────────────────────────────────── */
.gb-breadcrumb {
    padding: 14px 0;
    font-size: 12px;
    color: var(--gb-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.gb-breadcrumb a { color: var(--gb-text-muted); transition: color .15s; }
.gb-breadcrumb a:hover { color: var(--gb-primary); }
.gb-breadcrumb__sep { opacity: .4; }

/* ── Buttons ─────────────────────────────────────────── */
.gb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--gb-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .18s;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: .3px;
}
.gb-btn:hover { opacity: .88; transform: translateY(-1px); }
.gb-btn:active { transform: translateY(0); }
.gb-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.gb-btn--primary   { background: var(--gb-primary); color: #fff; border-color: var(--gb-primary); }
.gb-btn--secondary { background: var(--gb-bg-soft); color: var(--gb-text); border-color: var(--gb-border); }
.gb-btn--outline   { background: transparent; color: var(--gb-primary); border-color: var(--gb-primary); }
.gb-btn--white     { background: #fff; color: var(--gb-primary); border-color: #fff; }
.gb-btn--full      { width: 100%; }
.gb-btn--sm        { padding: 8px 16px; font-size: 13px; }
.gb-btn--lg        { padding: 16px 36px; font-size: 16px; }

/* ── Product card (shared across shop + related) ─────── */
.gb-product-card {
    border-radius: var(--gb-radius);
    overflow: hidden;
    background: var(--gb-bg);
    border: 1px solid var(--gb-border);
    transition: box-shadow .2s, transform .2s;
    position: relative;
}
.gb-product-card:hover {
    box-shadow: var(--gb-shadow-lg);
    transform: translateY(-3px);
}
.gb-product-card__img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gb-bg-soft);
    display: block;
}
.gb-product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.gb-product-card:hover .gb-product-card__img img { transform: scale(1.06); }
.gb-product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gb-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .6px;
    z-index: 1;
}
.gb-product-card__badge--new { background: var(--gb-success); }
.gb-product-card__info { padding: 12px 14px 16px; }
.gb-product-card__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--gb-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gb-product-card__price {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.gb-product-card__price-sale {
    font-size: 15px;
    font-weight: 700;
    color: var(--gb-accent);
}
.gb-product-card__price-regular {
    font-size: 12px;
    color: var(--gb-text-muted);
    text-decoration: line-through;
}
.gb-product-card__price-only {
    font-size: 15px;
    font-weight: 700;
    color: var(--gb-primary);
}
.gb-product-card__discount {
    font-size: 11px;
    font-weight: 700;
    color: var(--gb-success);
    background: #dcfce7;
    padding: 2px 7px;
    border-radius: 4px;
}

/* ── Section headers ─────────────────────────────────── */
.gb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.gb-section-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.3px;
}
.gb-link-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--gb-primary);
    border-bottom: 1.5px solid currentColor;
    padding-bottom: 1px;
}

/* ── Spinner / Loading ───────────────────────────────── */
.gb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.gb-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gb-border);
    border-top-color: var(--gb-primary);
    border-radius: 50%;
    animation: gb-spin .7s linear infinite;
}
@keyframes gb-spin { to { transform: rotate(360deg); } }

/* ── Toast notification ──────────────────────────────── */
.gb-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gb-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    animation: gb-toast-in .25s ease;
    white-space: nowrap;
    box-shadow: var(--gb-shadow-lg);
}
@keyframes gb-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(12px); } }

/* ── Quantity stepper ────────────────────────────────── */
.gb-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--gb-border);
    border-radius: var(--gb-radius);
    overflow: hidden;
    background: var(--gb-bg);
}
.gb-qty__btn {
    width: 38px;
    height: 42px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gb-text);
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gb-qty__btn:hover { background: var(--gb-bg-soft); }
.gb-qty__input {
    width: 48px;
    height: 42px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--gb-border);
    border-right: 1.5px solid var(--gb-border);
    font-size: 14px;
    font-weight: 600;
    outline: none;
}
.gb-qty__input::-webkit-inner-spin-button,
.gb-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Form fields ─────────────────────────────────────── */
.gb-field { margin-bottom: 16px; }
.gb-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gb-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.gb-field input,
.gb-field select,
.gb-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gb-border);
    border-radius: var(--gb-radius);
    font-size: 14px;
    color: var(--gb-text);
    background: var(--gb-bg);
    transition: border-color .15s;
    outline: none;
    -webkit-appearance: none;
}
.gb-field input:focus,
.gb-field select:focus,
.gb-field textarea:focus { border-color: var(--gb-primary); }
.gb-field textarea { resize: vertical; min-height: 90px; }

/* ── Announcement bar ────────────────────────────────── */
.gb-announcement {
    background: var(--gb-primary);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .2px;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════
   MOBILE BASE (applied everywhere ≤ 768px)
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Only override horizontal padding — vertical is set per-section in home.css */
    .gb-container { padding-left: 16px; padding-right: 16px; }
    .gb-section-title { font-size: 17px; }
    .gb-btn { padding: 12px 20px; font-size: 14px; }
    .gb-btn--lg { padding: 14px 24px; font-size: 15px; }
}

/* ═══════════════════════════════════════════════════════
   CUSTOM HEADER
   Replaces Astra header on all storefront pages
═══════════════════════════════════════════════════════ */

.gb-announcement {
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .2px;
    line-height: 1.4;
    position: relative;
    z-index: 999; /* below header (1000) so it never floats over it */
}

.gb-store-closed-banner {
    background: #dc2626;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1002;
}

.gb-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    transition: box-shadow .25s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.gb-header.is-sticky {
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
/* Admin bar offset */
.admin-bar .gb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .gb-header { top: 46px; } }

.gb-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */
.gb-header__logo {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.gb-header__logo img {
    max-height: 36px;
    width: auto;
    display: block;
}
.gb-header__brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #1a1a1a;
}

/* Desktop nav */
.gb-header__nav {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
    padding-left: 32px;
}
.gb-header__nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: .2px;
    transition: color .15s;
    white-space: nowrap;
    position: relative;
}
.gb-header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0; right: 0;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform .2s ease;
}
.gb-header__nav-link:hover { color: #1a1a1a; }
.gb-header__nav-link:hover::after { transform: scaleX(1); }

/* Actions (right side) */
.gb-header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.gb-header__icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #1a1a1a;
    transition: background .15s;
    text-decoration: none;
    position: relative;
}
.gb-header__icon-btn:hover { background: #f3f4f6; }
.gb-header__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #1a1a1a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hamburger button */
.gb-header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background .15s;
    flex-shrink: 0;
}
.gb-header__hamburger:hover { background: #f3f4f6; }
.gb-header__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: all .25s ease;
}

/* Search bar (slide-down) */
.gb-header__search-bar {
    border-top: 1px solid #e5e7eb;
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease, padding .25s ease;
}
.gb-header__search-bar.is-open {
    max-height: 72px;
}
.gb-header__search-form {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.gb-header__search-form svg { color: #9ca3af; flex-shrink: 0; }
.gb-header__search-form input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a1a;
    background: none;
}
.gb-header__search-form input::placeholder { color: #9ca3af; }
.gb-header__search-form button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #9ca3af;
    padding: 4px;
    transition: color .15s;
}
.gb-header__search-form button:hover { color: #1a1a1a; }

/* No spacer needed — header is position:sticky (in normal flow) */

/* Mobile menu overlay */
.gb-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.gb-menu-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* Mobile slide-out drawer */
.gb-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #fff;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.gb-mobile-menu.is-open {
    transform: translateX(0);
}
.gb-mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.gb-mobile-menu__logo {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 800;
    font-size: 17px;
}
.gb-mobile-menu__logo img { max-height: 32px; }
.gb-mobile-menu__close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px 8px;
    line-height: 1;
}
.gb-mobile-menu__body {
    flex: 1;
    padding: 12px 0;
}
.gb-mobile-menu__link {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}
.gb-mobile-menu__link:hover { background: #f9fafb; }
.gb-mobile-menu__footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}
.gb-mobile-menu__account {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   BOTTOM STICKY NAVIGATION
═══════════════════════════════════════════════════════ */

.gb-bottom-nav {
    display: none; /* shown only on mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 990;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.gb-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    text-decoration: none;
    color: #6b7280;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2px;
    padding: 4px 8px;
    transition: color .15s;
    min-width: 0;
}
.gb-bottom-nav__item:hover,
.gb-bottom-nav__item.is-active { color: #1a1a1a; }
.gb-bottom-nav__item svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   IMAGE CONSISTENCY — all store images fixed aspect ratio
═══════════════════════════════════════════════════════ */

/* Product images: always square, cropped */
.gb-product-card__img-wrap,
.gb-product-card__img {
    aspect-ratio: 1 !important;
    overflow: hidden;
}
.gb-product-card__img-wrap img,
.gb-product-card__img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* Category cards: portrait 3/4 */
.gb-cat-card {
    aspect-ratio: 3/4;
    overflow: hidden;
}
.gb-cat-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Promo banners: 4/3 */
.gb-promo-card {
    aspect-ratio: 4/3;
    overflow: hidden;
}
.gb-promo-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Deal banner image */
.gb-deal__image {
    overflow: hidden;
}
.gb-deal__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE HEADER
═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .gb-header__nav { display: none; }
    .gb-header__hamburger { display: flex; }

    /* Mobile: hamburger left, logo center, actions right */
    .gb-header__inner { justify-content: space-between; }
    .gb-header__logo { position: absolute; left: 50%; transform: translateX(-50%); }
    .gb-header__actions { margin-left: 0; }

    /* Bottom nav visible on mobile */
    .gb-bottom-nav { display: flex; }

    /* Extra bottom padding so content isn't behind bottom nav */
    .gb-page, .woocommerce-page .gb-page { padding-bottom: 72px; }
}
