/* =============================================================================
   GEMSHOPINDIA — THEME STYLESHEET
   Modern vanilla CSS + custom properties. No framework dependency.
   Table of contents:
     1. Design Tokens (CSS variables)
     2. Reset & Base
     3. Layout & Utility
     4. Buttons & Badges
     5. Top Announcement Bar
     6. Header / Search / Mega Menu
     7. Mobile Nav
     8. Hero
     9. Trust Strip
    10. Category Grid
    11. Tabs & Product Grid / Card
    12. Calculator CTA
    13. Reviews
    14. Footer
    15. Cart Drawer
    16. Responsive
============================================================================= */

/* -------------------------------- 1. TOKENS ------------------------------ */
:root {
	--gsi-primary: #0E1B2E;        /* Deep Royal Navy */
	--gsi-primary-maroon: #4A0E17; /* Alt brand: Deep Temple Maroon */
	--gsi-accent: #D4AF37;         /* Antique Gold */
	--gsi-accent-muted: #C5A059;   /* Metallic muted gold */
	--gsi-bg: #FAFAF8;             /* Pristine Pearl Off-White */
	--gsi-text: #1F2937;           /* Dark Slate */
	--gsi-text-muted: #8C733E;     /* Muted Gold */
	--gsi-white: #FFFFFF;
	--gsi-border: #E7E2D8;
	--gsi-success: #1F7A4D;
	--gsi-danger: #B3261E;

	--gsi-font-heading: 'Playfair Display', 'Cinzel', Georgia, serif;
	--gsi-font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	--gsi-radius-sm: 6px;
	--gsi-radius-md: 12px;
	--gsi-radius-lg: 20px;
	--gsi-shadow-sm: 0 1px 3px rgba(14, 27, 46, 0.08);
	--gsi-shadow-md: 0 8px 24px rgba(14, 27, 46, 0.12);
	--gsi-shadow-lg: 0 20px 48px rgba(14, 27, 46, 0.18);
	--gsi-container: 1280px;
	--gsi-header-h: 76px;
	--gsi-topbar-h: 40px;
	--gsi-transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* -------------------------------- 2. RESET ------------------------------- */
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: var(--gsi-font-body);
	color: var(--gsi-text);
	background: var(--gsi-bg);
	line-height: 1.6;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--gsi-font-heading); font-weight: 600; line-height: 1.25; color: var(--gsi-primary); }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap; border: 0; padding: 0;
}
.gsi-skip-link {
	position: absolute; left: -999px; top: 0; background: var(--gsi-primary); color: #fff;
	padding: 12px 20px; z-index: 10000; border-radius: 0 0 var(--gsi-radius-sm) 0;
}
.gsi-skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gsi-accent); outline-offset: 2px; }

/* ----------------------------- 3. LAYOUT/UTILITY -------------------------- */
.gsi-container { max-width: var(--gsi-container); margin-inline: auto; padding-inline: 20px; }
.gsi-section { padding-block: 56px; }
.gsi-section__title {
	font-size: clamp(1.6rem, 2.4vw, 2.2rem);
	text-align: center;
	margin-bottom: 32px;
	position: relative;
}
.gsi-section__title::after {
	content: ""; display: block; width: 64px; height: 3px; background: var(--gsi-accent);
	margin: 14px auto 0;
}
.gsi-eyebrow {
	display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
	color: var(--gsi-accent); font-weight: 700; margin-bottom: 14px;
}
.gsi-empty-state { text-align: center; color: var(--gsi-text-muted); padding: 24px; }

/* ----------------------------- 4. BUTTONS/BADGES -------------------------- */
.gsi-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 24px; border-radius: var(--gsi-radius-sm); font-weight: 600;
	font-size: .95rem; transition: all var(--gsi-transition); white-space: nowrap;
}
.gsi-btn--lg { padding: 16px 32px; font-size: 1rem; }
.gsi-btn--sm { padding: 8px 14px; font-size: .8rem; }
.gsi-btn--gold { background: var(--gsi-accent); color: var(--gsi-primary); }
.gsi-btn--gold:hover { background: var(--gsi-accent-muted); transform: translateY(-1px); }
.gsi-btn--outline { border: 1.5px solid var(--gsi-primary); color: var(--gsi-primary); }
.gsi-btn--outline:hover { background: var(--gsi-primary); color: #fff; }
.gsi-btn--outline-light { border: 1.5px solid rgba(255,255,255,.6); color: #fff; }
.gsi-btn--outline-light:hover { background: rgba(255,255,255,.12); }

.gsi-badge {
	display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px;
}
.gsi-badge--sale { background: var(--gsi-danger); color: #fff; }
.gsi-badge--certified { background: var(--gsi-primary); color: var(--gsi-accent); }
.gsi-badge--energized { background: #f3ead1; color: var(--gsi-text-muted); }
.gsi-verified-badge { font-size: .68rem; color: var(--gsi-success); font-weight: 700; margin-left: 6px; }

.gsi-icon-badge {
	position: absolute; top: -6px; right: -8px; background: var(--gsi-accent); color: var(--gsi-primary);
	font-size: .65rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px;
	display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ----------------------------- 5. TOPBAR ---------------------------------- */
.gsi-topbar { background: var(--gsi-primary); color: #fff; font-size: .82rem; }
.gsi-topbar__inner { display: flex; align-items: center; justify-content: space-between; height: var(--gsi-topbar-h); }
.gsi-topbar__msg { text-align: center; flex: 1; }
.gsi-topbar__right { display: flex; align-items: center; gap: 16px; }
.gsi-topbar__phone { color: var(--gsi-accent); font-weight: 600; }
.gsi-topbar__close { color: #fff; opacity: .7; }
.gsi-topbar__close:hover { opacity: 1; }

/* ----------------------------- 6. HEADER ---------------------------------- */
.gsi-header {
	background: var(--gsi-bg); border-bottom: 1px solid var(--gsi-border);
	position: sticky; top: 0; z-index: 500; transition: box-shadow var(--gsi-transition);
}
.gsi-header.is-stuck { box-shadow: var(--gsi-shadow-sm); }
.gsi-header__inner { display: flex; align-items: center; gap: 24px; height: var(--gsi-header-h); }
.gsi-header__burger { display: none; flex-direction: column; gap: 5px; width: 24px; }
.gsi-header__burger span { height: 2px; background: var(--gsi-primary); border-radius: 2px; }

.gsi-header__brand { display: flex; flex-direction: column; margin-right: 12px; flex-shrink: 0; }
.gsi-header__sitename { font-family: var(--gsi-font-heading); font-size: 1.5rem; color: var(--gsi-primary); font-weight: 700; }
.gsi-header__tagline { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--gsi-text-muted); }

.gsi-header__search { position: relative; flex: 1; max-width: 520px; }
.gsi-search-form { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--gsi-border); border-radius: 999px; padding: 4px 6px 4px 18px; }
.gsi-search-form__input { flex: 1; border: none; background: transparent; outline: none; padding: 8px 0; }
.gsi-search-form__btn { width: 36px; height: 36px; background: var(--gsi-primary); color: var(--gsi-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.gsi-live-results {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff;
	border-radius: var(--gsi-radius-md); box-shadow: var(--gsi-shadow-lg); max-height: 420px; overflow-y: auto; z-index: 600;
}
.gsi-live-results__item { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--gsi-border); }
.gsi-live-results__item img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--gsi-radius-sm); }
.gsi-live-results__item:hover { background: #faf7ef; }
.gsi-live-results__title { font-size: .88rem; font-weight: 600; }
.gsi-live-results__price { font-size: .78rem; color: var(--gsi-text-muted); }
.gsi-live-results__empty, .gsi-live-results__loading { padding: 16px; text-align: center; color: var(--gsi-text-muted); font-size: .85rem; }

.gsi-header__actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.gsi-icon-link { position: relative; display: inline-flex; color: var(--gsi-primary); }

.gsi-currency-switch { position: relative; }
.gsi-currency-switch__btn { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--gsi-primary); }
.gsi-currency-switch__menu {
	position: absolute; top: calc(100% + 10px); right: 0; background: #fff; border-radius: var(--gsi-radius-sm);
	box-shadow: var(--gsi-shadow-md); min-width: 110px; overflow: hidden; z-index: 600;
}
.gsi-currency-switch__menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: .85rem; }
.gsi-currency-switch__menu button:hover { background: #faf7ef; }

/* Mega menu nav
   NOTE: .gsi-nav is the explicit positioning context (position: relative)
   for the full-width mega panel below. Previously the panel relied on the
   sticky header (.gsi-header { position: sticky }) to act as its containing
   block — browsers are inconsistent about whether a sticky element actually
   establishes a containing block for absolutely-positioned descendants, so
   the panel could escape upward/downward and render over the hero section
   instead of directly under the nav bar. Anchoring to .gsi-nav explicitly
   removes that ambiguity across all browsers. */
.gsi-nav { background: var(--gsi-primary); position: relative; z-index: 20; }
.gsi-menu { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; width: 100%; }
.gsi-menu-item--top { position: relative; }
/* Any top-level item with real children gets the dropdown treatment
   automatically (no manual "mega-menu" CSS class needed in wp-admin — see
   the docblock in inc/mega-menu-walker.php for the bug this replaced).
   It must stay position:static so it does NOT become the containing block
   for its full-width .gsi-mega-panel — otherwise the panel shrinks to the
   trigger link's own (tiny) width instead of spanning the full nav,
   anchored to .gsi-nav { position: relative } above. Declared after the
   generic rule above so the cascade (equal specificity, source order)
   resolves in its favour for elements carrying both classes. */
.gsi-menu-item--top.gsi-has-children { position: static; }
.gsi-menu-link--top {
	display: flex; align-items: center; gap: 6px; padding: 14px 18px; color: #fff; font-weight: 600; font-size: .9rem;
	letter-spacing: .02em; white-space: nowrap; transition: color var(--gsi-transition);
}
.gsi-menu-item--top:hover > .gsi-menu-link--top, .gsi-menu-link--top:hover { color: var(--gsi-accent); }
.gsi-caret { flex-shrink: 0; transition: transform var(--gsi-transition); }
.gsi-menu-item--top:hover .gsi-caret { transform: rotate(180deg); }

.gsi-mega-panel {
	position: absolute; left: 0; right: 0; top: 100%; background: #fff;
	box-shadow: var(--gsi-shadow-lg); border-top: 2px solid var(--gsi-accent); z-index: 550;
	opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px);
	transition: opacity var(--gsi-transition), transform var(--gsi-transition), visibility var(--gsi-transition);
	max-height: 80vh; overflow-y: auto;
}
.gsi-menu-item--top.gsi-has-children:hover > .gsi-mega-panel,
.gsi-menu-item--top.gsi-has-children.is-open > .gsi-mega-panel {
	opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.gsi-mega-panel__inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding: 32px 20px; }
.gsi-mega-col__title { font-weight: 700; color: var(--gsi-primary); display: block; margin-bottom: 10px; font-size: .9rem; }
.gsi-mega-col__links { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gsi-mega-col__links a { font-size: .85rem; color: var(--gsi-text); }
.gsi-mega-col__links a:hover { color: var(--gsi-accent-muted); }
.gsi-menu-setup-hint { color: rgba(255,255,255,.5); font-size: .75rem; padding: 6px 0 10px; }

/* ----------------------------- 7. MOBILE NAV ------------------------------ */
.gsi-mobile-nav {
	position: fixed; top: 0; left: -320px; width: 300px; height: 100%; background: var(--gsi-primary);
	color: #fff; z-index: 1000; transition: left var(--gsi-transition); overflow-y: auto;
}
.gsi-mobile-nav.is-open { left: 0; }
.gsi-mobile-nav__header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,.12); font-family: var(--gsi-font-heading); font-size: 1.2rem; }
.gsi-mobile-nav__header button { color: #fff; font-size: 1.6rem; line-height: 1; }
.gsi-mobile-nav__menu a { display: block; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .95rem; }
.gsi-overlay { position: fixed; inset: 0; background: rgba(14,27,46,.5); z-index: 900; }

/* ----------------------------- 8. HERO ------------------------------------ */
.gsi-hero { background: var(--gsi-primary); color: #fff; overflow: hidden; }
.gsi-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding-block: 64px; }
.gsi-hero__title { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); margin-block: 18px; }
.gsi-hero__subtitle { color: rgba(255,255,255,.78); max-width: 46ch; margin-bottom: 28px; font-size: 1.05rem; }
.gsi-hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }
.gsi-hero__media { aspect-ratio: 16/9; border-radius: var(--gsi-radius-lg); overflow: hidden; box-shadow: var(--gsi-shadow-lg); }
.gsi-hero__img { width: 100%; height: 100%; object-fit: cover; }

/* ----------------------------- 9. TRUST STRIP ----------------------------- */
.gsi-trust-strip { background: #fff; border-block: 1px solid var(--gsi-border); }
.gsi-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.gsi-trust-item { text-align: center; padding: 16px; min-width: 0; }
.gsi-trust-item__icon {
	display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
	border-radius: 50%; background: #f3ead1; margin-bottom: 14px; color: var(--gsi-primary);
}
.gsi-trust-item__icon::before { content: "✦"; font-size: 1.4rem; color: var(--gsi-accent-muted); }
.gsi-trust-item h3 { font-size: .95rem; margin-bottom: 4px; }
.gsi-trust-item p { font-size: .8rem; color: var(--gsi-text-muted); }

/* ----------------------------- 10. CATEGORY GRID -------------------------- */
.gsi-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.gsi-category-card {
	position: relative; display: flex; flex-direction: column; min-width: 0; width: 100%;
	border: 1.5px solid var(--gsi-border);
	border-radius: var(--gsi-radius-md); overflow: hidden; transition: all var(--gsi-transition); background: #fff;
}
.gsi-category-card:hover { border-color: var(--gsi-accent); box-shadow: var(--gsi-shadow-md); transform: translateY(-4px); }
.gsi-category-card__media { aspect-ratio: 4/5; background: #f3ead1; display: block; overflow: hidden; }
.gsi-category-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.gsi-category-card:hover .gsi-category-card__media img { transform: scale(1.06); }
.gsi-category-card__placeholder { width: 100%; height: 100%; display: block; background: linear-gradient(135deg, #f3ead1, #e8dcc0); }
.gsi-category-card__label { text-align: center; padding: 14px; font-weight: 600; color: var(--gsi-primary); }

/* ----------------------------- 11. TABS + PRODUCT GRID -------------------- */
.gsi-tabs__nav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.gsi-tabs__btn { padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: .85rem; border: 1.5px solid var(--gsi-border); color: var(--gsi-text-muted); }
.gsi-tabs__btn.is-active { background: var(--gsi-primary); color: var(--gsi-accent); border-color: var(--gsi-primary); }
.gsi-tabs__panel { display: none; }
.gsi-tabs__panel.is-active { display: block; }

.gsi-product-grid, ul.products {
	display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none !important;
	margin: 0 !important; padding: 0 !important;
}
.gsi-product-grid--carousel { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gsi-product-card, ul.products li.product {
	position: relative; min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box;
	background: #fff; border: 1px solid var(--gsi-border); border-radius: var(--gsi-radius-md);
	overflow: hidden; transition: all var(--gsi-transition); display: flex; flex-direction: column;
}
ul.products li.product:hover { box-shadow: var(--gsi-shadow-md); border-color: var(--gsi-accent); transform: translateY(-3px); }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; min-width: 0; }
ul.products li.product img { aspect-ratio: 1/1; object-fit: cover; width: 100%; max-width: 100%; height: auto; }
.gsi-card__badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-direction: column; gap: 6px; max-width: calc(100% - 24px); }
ul.products li.product .woocommerce-loop-product__title {
	padding: 14px 14px 2px; font-size: .95rem; font-family: var(--gsi-font-body); font-weight: 600; color: var(--gsi-text);
	overflow-wrap: break-word; word-break: break-word; min-width: 0;
}
.gsi-card__subtitle { padding: 0 14px; font-size: .78rem; color: var(--gsi-text-muted); overflow-wrap: break-word; }
ul.products li.product .price { padding: 6px 14px 14px; font-weight: 700; color: var(--gsi-primary); white-space: normal; overflow-wrap: break-word; }
ul.products li.product .price del { color: var(--gsi-text-muted); font-weight: 400; opacity: .7; }
ul.products li.product .price ins { text-decoration: none; color: var(--gsi-danger); }
ul.products li.product .button {
	display: block; width: auto; margin: 0 14px 14px; padding: 10px; border-radius: var(--gsi-radius-sm); background: var(--gsi-primary);
	color: #fff; text-align: center; font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden;
	text-overflow: ellipsis; transition: background var(--gsi-transition); box-sizing: border-box;
}
ul.products li.product .button:hover { background: var(--gsi-accent); color: var(--gsi-primary); }
.gsi-wishlist-btn {
	position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
	background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; color: var(--gsi-primary);
	box-shadow: var(--gsi-shadow-sm); transition: all var(--gsi-transition);
}
.gsi-wishlist-btn:hover, .gsi-wishlist-btn.is-active { color: var(--gsi-danger); }

/* ----------------------------- 12. CALCULATOR CTA ------------------------- */
.gsi-calculator-cta { background: linear-gradient(135deg, var(--gsi-primary), #182c47); color: #fff; }
.gsi-calculator-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.gsi-calculator-cta__text h2 { color: #fff; margin-bottom: 8px; }
.gsi-calculator-cta__text p { color: rgba(255,255,255,.75); max-width: 50ch; }
.gsi-calculator-cta__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ----------------------------- 13. REVIEWS -------------------------------- */
.gsi-reviews__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gsi-review-card { background: #fff; border: 1px solid var(--gsi-border); border-radius: var(--gsi-radius-md); padding: 24px; min-width: 0; overflow-wrap: break-word; }
.gsi-review-card__stars { color: var(--gsi-accent); letter-spacing: 2px; margin-bottom: 12px; }
.gsi-review-card__text { font-size: .92rem; margin-bottom: 14px; }
.gsi-review-card__author { font-size: .82rem; font-weight: 700; color: var(--gsi-primary); }

/* ----------------------------- 14. FOOTER --------------------------------- */
.gsi-footer { background: var(--gsi-primary); color: rgba(255,255,255,.82); padding-top: 56px; }
.gsi-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; padding-bottom: 40px; }
.gsi-footer .gsi-widget__title { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.gsi-footer__links li { margin-bottom: 10px; font-size: .88rem; }
.gsi-footer__links a:hover { color: var(--gsi-accent); }
.gsi-footer__social { display: flex; gap: 12px; margin-top: 18px; }
.gsi-footer__social a { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.gsi-newsletter-form { display: flex; gap: 8px; margin-top: 8px; }
.gsi-newsletter-form input { flex: 1; padding: 10px 14px; border-radius: var(--gsi-radius-sm); border: none; }
.gsi-footer__payments { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.gsi-footer__payments-label { font-size: .8rem; opacity: .7; margin-right: 6px; }
.gsi-pay-badge { font-size: .74rem; font-weight: 700; background: rgba(255,255,255,.08); padding: 5px 10px; border-radius: 5px; }
.gsi-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-block: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; flex-wrap: wrap; gap: 10px; }
.gsi-footer__legal { display: flex; gap: 16px; }

.gsi-back-to-top {
	position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
	background: var(--gsi-primary); color: var(--gsi-accent); display: flex; align-items: center; justify-content: center;
	box-shadow: var(--gsi-shadow-md); z-index: 400;
}

/* ----------------------------- 15. CART DRAWER ---------------------------- */
/* BUG FIX: this used to hide off-screen with a hardcoded `right: -420px`,
   matched to the drawer's own 400px desktop width. The mobile/tablet
   override further down sets `width: 100%` without ever touching that
   hide-offset, so at any viewport where the drawer became wider than 420px
   (e.g. a 700px-wide device) it was ALWAYS partially on-screen by default —
   exactly the "cart shows on half the page by default" bug. Fixed by
   hiding with `transform: translateX(100%)` instead: that always means
   "100% of THIS element's own current width", so it fully hides the drawer
   correctly no matter what width is in effect at any breakpoint. */
.gsi-cart-drawer {
	position: fixed; top: 0; right: 0; width: 400px; max-width: 94vw; height: 100%; background: #fff;
	z-index: 1100; box-shadow: var(--gsi-shadow-lg); transition: transform var(--gsi-transition);
	display: flex; flex-direction: column;
	transform: translateX(100%); pointer-events: none;
}
.gsi-cart-drawer.is-open { transform: translateX(0); pointer-events: auto; }
.gsi-cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--gsi-border); }
.gsi-cart-drawer__header h2 { font-size: 1.1rem; }
.gsi-cart-drawer__header button { font-size: 1.6rem; line-height: 1; color: var(--gsi-text-muted); }
.gsi-cart-drawer__body { flex: 1; overflow-y: auto; padding: 0 20px; }
.gsi-cart-drawer__buttons { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--gsi-border); }
.gsi-cart-drawer__empty { text-align: center; padding: 60px 20px; color: var(--gsi-text-muted); }
.gsi-cart-drawer__empty svg { margin: 0 auto 16px; color: var(--gsi-border); }

.gsi-ship-bar { padding: 14px 20px; border-bottom: 1px solid var(--gsi-border); }
.gsi-ship-bar__msg { font-size: .82rem; margin-bottom: 8px; }
.gsi-ship-bar__msg--success { color: var(--gsi-success); font-weight: 600; }
.gsi-ship-bar__track { height: 6px; border-radius: 999px; background: var(--gsi-border); overflow: hidden; }
.gsi-ship-bar__fill { height: 100%; background: linear-gradient(90deg, var(--gsi-accent), var(--gsi-accent-muted)); transition: width 400ms ease; }

.gsi-cart-items { padding: 14px 0; }
.gsi-cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gsi-border); align-items: start; }
.gsi-cart-item__thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--gsi-radius-sm); }
.gsi-cart-item__name { font-weight: 600; font-size: .88rem; display: block; margin-bottom: 2px; }
.gsi-cart-item__variant { font-size: .76rem; color: var(--gsi-text-muted); }
.gsi-cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.gsi-cart-item__price { font-weight: 700; font-size: .85rem; color: var(--gsi-primary); }
.gsi-cart-item__remove { color: var(--gsi-text-muted); }
.gsi-cart-item__remove:hover { color: var(--gsi-danger); }

.gsi-qty-stepper { display: flex; align-items: center; border: 1px solid var(--gsi-border); border-radius: 999px; overflow: hidden; }
.gsi-qty-stepper__btn { width: 26px; height: 26px; font-size: .9rem; }
.gsi-qty-stepper__input { width: 32px; text-align: center; border: none; -moz-appearance: textfield; }
.gsi-qty-stepper__input::-webkit-outer-spin-button, .gsi-qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; }

.gsi-cart-upsell { padding: 16px 0; border-top: 1px dashed var(--gsi-border); }
.gsi-cart-upsell h3 { font-size: .88rem; margin-bottom: 12px; }
.gsi-cart-upsell__track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.gsi-cart-upsell__item { flex: 0 0 110px; text-align: center; font-size: .74rem; }
.gsi-cart-upsell__item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--gsi-radius-sm); margin: 0 auto 6px; }
.gsi-cart-upsell__item strong { display: block; color: var(--gsi-primary); margin: 2px 0 6px; }

.gsi-cart-coupon { padding: 12px 0; border-top: 1px dashed var(--gsi-border); }
.gsi-cart-coupon__toggle { font-size: .82rem; font-weight: 600; color: var(--gsi-primary); text-decoration: underline; }
.gsi-cart-coupon__form { display: flex; gap: 8px; margin-top: 10px; }
.gsi-cart-coupon__form input { flex: 1; padding: 8px 12px; border: 1px solid var(--gsi-border); border-radius: var(--gsi-radius-sm); }

.gsi-cart-subtotal { display: flex; justify-content: space-between; padding: 14px 0; font-size: 1rem; border-top: 1px solid var(--gsi-border); }
.gsi-cart-note { font-size: .74rem; color: var(--gsi-text-muted); margin-bottom: 8px; }

/* ----------------------------- 16. RESPONSIVE ----------------------------- */
/*
 * Three-tier breakpoint system:
 *   Desktop: > 1024px  — 4-col grids, full inline nav
 *   Tablet:  768–1024px — 2-col grids, STILL the full inline nav (not hamburger).
 *            This tier matters a lot in practice: 768px / 820px / 834px / 912px / 1024px
 *            are the exact CSS widths of real iPads and most Android tablets in portrait
 *            AND landscape. Verified via headless-browser audit that the full header
 *            (logo + search + account/wishlist/cart icons) and the mega-menu nav both
 *            fit here with healthy spacing and zero overlap/overflow down to 768px —
 *            so there is no layout reason to demote these widths to the phone UI.
 *   Mobile:  < 768px   — 1-col grid, hamburger nav, stacked/reflowed header.
 *
 * NOTE: an earlier version of this file used max-width:782px (borrowed from the
 * WordPress wp-admin mobile breakpoint convention) as the single mobile/desktop
 * cutoff. That is the WRONG number for a storefront front-end: it silently pulled
 * the extremely common 768px tablet-portrait width into "mobile" mode, so real
 * tablets got single-column, full-bleed, phone-style stacked product/category cards
 * and a hamburger menu instead of a proper 2-column tablet layout — this was the
 * root cause of the reported "card bug in tablet view". Do not reintroduce 782px
 * here; if you need to tweak the mobile cutoff, keep it at 768px or lower so the
 * 768–1024px tablet band keeps its own tier above.
 */
@media (max-width: 1024px) {
	.gsi-trust-grid, .gsi-category-grid, .gsi-product-grid, ul.products, .gsi-reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gsi-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gsi-hero__grid { grid-template-columns: 1fr; text-align: center; }
	.gsi-hero__cta { justify-content: center; }
}
@media (max-width: 767px) {
	.gsi-header__burger { display: flex; }
	.gsi-header__tagline, .gsi-currency-switch { display: none; }
	.gsi-nav { display: none; }
	.gsi-header__search { order: 4; flex-basis: 100%; max-width: none; margin-top: 10px; }
	.gsi-header__inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
	.gsi-topbar__phone { display: none; }
	/* Product and category cards: 2-per-row on mobile (not a single stacked
	   column) per explicit request — a tighter gap and slightly smaller
	   card type keep things legible down to ~360px wide phones. Trust
	   badges and review testimonials stay 1-column since that content is
	   longer-form prose/icon+paragraph and gets cramped at half width. */
	.gsi-category-grid, .gsi-product-grid, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.gsi-trust-grid, .gsi-reviews__grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
	.gsi-footer__grid { grid-template-columns: minmax(0, 1fr); }
	.gsi-cart-drawer { width: 100%; max-width: 100vw; }
}
@media (max-width: 400px) {
	/* Extra-narrow phones (<=400px): the 2-col grid above is still kept
	   (explicit requirement), just with a touch tighter spacing/type so
	   price + button don't wrap awkwardly inside a ~165px-wide card. */
	.gsi-category-grid, .gsi-product-grid, ul.products { gap: 8px; }
	ul.products .price { font-size: .95rem; }
	ul.products .button { padding: 8px 10px; font-size: .78rem; }
}
/* Extra breathing room at the narrow end of the tablet band (768–899px): the
 * category/product card title + price + button stack can feel tight at 2 columns
 * right above the mobile cutoff, so nudge grid gaps down slightly instead of
 * letting cards get cramped against each other. Pure fit/finish, not a layout fix. */
@media (min-width: 768px) and (max-width: 899px) {
	.gsi-category-grid, .gsi-product-grid, ul.products { gap: 16px; }
}
