/* Glassica — UI polish patch
 * Fixes for elements converted from <button>/<div> to <a> during multi-page wiring.
 * Loaded AFTER storefront.css + pages.css so wins on specificity.
 */

/* ─── Anchor resets ─── */
.gx-root a { color: inherit; text-decoration: none; }

/* ─── Buttons-as-links: keep the original chrome ─── */
a.gx-btn-primary, a.gx-checkout, a.gx-add-big, a.gx-buy-now {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; box-sizing: border-box;
}
a.gx-btn-primary { gap: 6px; }
a.gx-checkout { width: 100%; text-align: center; gap: 4px; }
a.gx-add-big { text-align: center; }

/* ─── Header icon-btn (now <a>) ─── */
a.gx-icon-btn { text-decoration: none; }
a.gx-icon-btn:hover { color: var(--saffron-dk); }

/* ─── Promo cards (now <a>) ─── */
a.gx-promo { text-decoration: none; color: inherit; display: flex; flex-direction: column; }

/* ─── Category pills (now <a>) ─── */
a.gx-pill { text-decoration: none; color: inherit; }

/* ─── Card image link ─── */
a.gx-card-img { display: block; text-decoration: none; }
a.gx-card-name { text-decoration: none; display: -webkit-box; }

/* ─── Card VIEW button (now <button> opening QuickView) ─── */
.gx-card-btns .gx-view { display: inline-flex; align-items: center; justify-content: center; }

/* ─── Hero side categories — make whole row clickable ─── */
.gx-side li { padding: 0; display: block; }
.gx-side li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 16px; color: var(--cocoa); text-decoration: none;
  font-size: 13px; transition: all 0.15s; border-left: 3px solid transparent;
  margin-left: -3px;
}
.gx-side li:hover { background: transparent; }
.gx-side li a:hover { background: var(--bone); border-left-color: var(--saffron); }
.gx-side li.act a { background: var(--bone); font-weight: 600; border-left-color: var(--saffron); }
.gx-side li.sale a { color: var(--danger); font-weight: 600; }

/* ─── Footer links ─── */
.gx-footer li { cursor: default; padding: 5px 0; }
.gx-footer li:has(a) { padding: 0; }
.gx-footer li a { display: inline-block; padding: 5px 0; color: var(--bone-soft); text-decoration: none; transition: color 0.15s; }
.gx-footer li a:hover { color: var(--saffron); }
.gx-footer li:hover { color: inherit; opacity: 0.82; }

/* ─── Catnav anchor padding (links converted) ─── */
.gx-catnav a { text-decoration: none; }

/* ─── Crumb links ─── */
.gx-crumb-row a { text-decoration: none; }
.gx-crumb-row a:hover { color: var(--saffron-dk); }

/* ─── Card hover: ensure quick-btn doesn't break image link ─── */
.gx-card-img-wrap { position: relative; overflow: hidden; }
.gx-card-img-wrap .gx-card-img { display: block; height: 100%; }

/* ─── Empty-cart "Continue shopping" link ─── */
.gx-empty a.gx-btn-primary { padding: 12px 22px; }

/* ─── Trust bar alignment polish ─── */
.gx-trust-row > div { display: flex; flex-direction: column; gap: 2px; }

/* ─── Hero CTA spacing ─── */
.gx-hero-copy .gx-btn-primary { margin-top: 4px; }

/* ─── Section section sub label fix ─── */
.gx-sec-sub { font-size: 12px; color: var(--cocoa-soft); }

/* ─── How it works ─── */
.gx-how { padding: 28px 0; background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.gx-how .gx-sec-head { padding: 0 16px; margin-bottom: 14px; }
.gx-how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0 16px; }
.gx-how-step { background: var(--bone); border-radius: 8px; padding: 22px 20px; position: relative; }
.gx-how-n { width: 36px; height: 36px; border-radius: 50%; background: var(--saffron); color: var(--cocoa); font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.gx-how-step h4 { font-family: 'Cormorant Garamond', serif; font-size: 18px; color: var(--cocoa); margin: 0 0 6px; font-weight: 600; }
.gx-how-step p { font-size: 13px; color: var(--cocoa-soft); line-height: 1.6; margin: 0; }

/* ─── Flash sale countdown alignment ─── */
.gx-flash > .gx-container > .gx-flash-head { background: linear-gradient(95deg, var(--cocoa-ink), var(--cocoa)); border-radius: 8px 8px 0 0; padding: 14px 20px; margin: 0 16px; color: var(--bone); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.gx-flash > .gx-container > div:not(.gx-grid):not(.gx-flash-head) { background: transparent; padding: 0; margin: 0; color: inherit; display: block; }

/* ─── Newsletter responsive ─── */
.gx-newsletter form { gap: 8px; }

/* ─── Modal: ensure quick-view discount badge readable ─── */
.gx-modal-img .gx-disc { z-index: 3; }

/* ─── Pdp cta wish button alignment ─── */
.gx-pdp-cta .gx-add-big, .gx-pdp-cta .gx-buy-now { padding: 14px 18px; font-size: 13px; }

/* ─── Form & checkout polish ─── */
.gx-co-card h2 .step { flex-shrink: 0; }

/* ─── Shop toolbar wrap on small ─── */
.gx-shop-toolbar .sort select { min-width: 160px; }

/* ─── Filter sidebar list cleanup ─── */
.gx-filter-blk li { padding: 6px 0; line-height: 1.3; }
.gx-filter-blk li label { font-size: 13px; }

/* ─── Quick-view pill should sit above link ─── */
.gx-quick-btn { z-index: 4; }

/* ─── Logo: prevent inheriting underline on hover ─── */
a.gx-logo:hover { text-decoration: none; }

/* ─── Order summary item img ─── */
.gx-summary-item .img img { display: block; }

/* ─── Confirmation page link ─── */
a.gx-view { text-decoration: none; }

/* ─── Util bar links: explicit color (override anchor reset) ─── */
.gx-util-links a { color: var(--bone-soft); }
.gx-util-links a:hover { color: var(--saffron); }

/* ─── Catnav hot/end ─── */
.gx-catnav .gx-hot { color: var(--danger); }
.gx-catnav .gx-hot:hover { color: var(--danger); opacity: 0.8; }
.gx-catnav .gx-end { color: var(--cocoa); font-weight: 600; }

/* ─── Mobile polish ─── */
@media (max-width: 768px) {
  .gx-header-row { grid-template-columns: auto 1fr auto; gap: 8px; padding: 10px 12px; }
  .gx-search { display: none; } /* desktop search hidden on mobile, mobile-search shows */
  .gx-logo img { height: 40px; }
  .gx-head-r { gap: 6px; }
  .gx-icon-btn { padding: 4px; }
  .gx-icon-btn b { display: none; }
  .gx-cart-btn { padding: 6px 10px; }
  .gx-cart-btn div { display: none; }
  .gx-cart-btn .gx-cart-ico { font-size: 20px; }

  .gx-util-row { padding: 6px 12px; font-size: 11px; }
  .gx-util-l { display: none; }

  .gx-hero-grid { grid-template-columns: 1fr; padding: 0 12px; gap: 12px; }
  .gx-hero-main { min-height: 320px; }
  .gx-hero-main h1 { font-size: 28px; }
  .gx-hero-inner { padding: 22px; grid-template-columns: 1fr; }
  .gx-hero-img { display: none; }
  .gx-side { display: none; }
  .gx-promos { flex-direction: row; }
  .gx-promo { flex: 1; }
  .gx-promo-img { aspect-ratio: 1/1; }

  .gx-trust-row { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
  .gx-trust-row > div { padding: 8px 4px; }

  .gx-pills { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px; }
  .gx-pill { padding: 10px 6px; }
  .gx-pill-img { width: 56px; height: 56px; }

  .gx-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gx-section .gx-grid, .gx-section .gx-sec-head { padding: 0 12px; }
  .gx-flash .gx-grid { padding: 14px 12px; margin: 0 12px; }
  .gx-flash > .gx-container > .gx-flash-head { margin: 0 12px; padding: 12px 14px; flex-direction: column; align-items: flex-start; }
  .gx-flash-title h2 { font-size: 18px; }
  .gx-flash-cd { width: 100%; }

  .gx-sec-head { padding: 0 12px; }
  .gx-sec-head h2 { font-size: 22px; }

  .gx-card-body { padding: 10px; }
  .gx-card-name { font-size: 12px; min-height: 32px; line-height: 1.3; }
  .gx-card-price b { font-size: 15px; }
  .gx-card-price s { font-size: 11px; }
  .gx-card-coll { font-size: 9px; }
  .gx-card-btns { flex-direction: column; gap: 5px; }
  .gx-card-btns .gx-view, .gx-card-btns .gx-add { width: 100%; flex: none; padding: 8px 10px; font-size: 11px; }

  .gx-how-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
  .gx-how-step { padding: 16px 14px; }
  .gx-how-step h4 { font-size: 16px; }
  .gx-how-step p { font-size: 12px; }

  .gx-why { padding: 18px 12px; }
  .gx-why-grid { grid-template-columns: 1fr; padding: 18px; gap: 20px; }
  .gx-why-text h2 { font-size: 26px; }
  .gx-why-stats { gap: 16px; flex-wrap: wrap; }
  .gx-why-stats b { font-size: 20px; }

  .gx-newsletter { padding: 22px 0; }
  .gx-news-row { grid-template-columns: 1fr; padding: 0 12px; gap: 14px; }
  .gx-news-row h3 { font-size: 22px; }
  .gx-news-row form { flex-direction: column; }

  .gx-footer { padding: 28px 0 80px; }
  .gx-footer-top { grid-template-columns: 1fr 1fr; gap: 20px; padding: 0 12px 20px; }
  .gx-foot-brand { grid-column: 1 / -1; }
  .gx-foot-bottom { padding: 14px 12px 0; font-size: 10px; }

  /* PDP */
  .gx-pdp-grid { grid-template-columns: 1fr; gap: 18px; padding: 0 12px; }
  .gx-pdp-gallery { grid-template-columns: 1fr; }
  .gx-pdp-thumbs { flex-direction: row; order: 2; gap: 6px; overflow-x: auto; }
  .gx-pdp-thumb { flex: 0 0 60px; width: 60px; }
  .gx-pdp-body h1 { font-size: 22px; }
  .gx-pdp-price { padding: 12px; }
  .gx-pdp-price b { font-size: 24px; }
  .gx-pdp-cta { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gx-pdp-cta .gx-wish { grid-column: 1 / -1; width: 100%; padding: 12px; }
  .gx-pdp-meta { font-size: 11px; gap: 10px; }
  .gx-pdp-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 0; }
  .gx-pdp-lbl { min-width: 0; }
  .gx-tabs { padding: 0 12px; margin-top: 24px; }
  .gx-tabs-bar button { padding: 8px 12px; font-size: 12px; }
  .gx-tab-panel { padding: 18px 16px; }
  .gx-tab-panel h3 { font-size: 18px; }
  .gx-reviews-head { grid-template-columns: 1fr; gap: 16px; }
  .gx-rev-score b { font-size: 38px; }

  /* Shop */
  .gx-shop-grid { grid-template-columns: 1fr; padding: 0 12px; }
  .gx-shop-head { padding: 0 12px 12px; }
  .gx-shop-head h1 { font-size: 24px; }
  .gx-shop-toolbar { padding: 8px 10px; gap: 8px; }
  .gx-shop-toolbar .sort { font-size: 11px; gap: 4px; margin-left: 0; }
  .gx-shop-toolbar .sort select { min-width: 0; padding: 6px 8px; }
  .gx-shop-toolbar .count { font-size: 12px; flex: 1; }
  .gx-filter-mobile { display: inline-flex; align-items: center; gap: 4px; }
  .gx-filters { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 86vw; z-index: 110; transform: translateX(-110%); transition: transform 0.3s; border-radius: 0; overflow-y: auto; box-shadow: 16px 0 60px -20px rgba(60,30,8,0.3); }
  .gx-filters.open { transform: none; }
  .gx-pagination button { min-width: 32px; height: 32px; font-size: 12px; padding: 0 8px; }

  /* Checkout */
  .gx-checkout-grid { grid-template-columns: 1fr; padding: 0 12px; }
  .gx-checkout-head { padding: 0 12px 12px; }
  .gx-checkout-head h1 { font-size: 24px; }
  .gx-co-card { padding: 18px 16px; }
  .gx-co-card h2 { font-size: 18px; }
  .gx-form-grid { grid-template-columns: 1fr; }
  .gx-pays { grid-template-columns: 1fr; }
  .gx-summary { padding: 16px 18px; }
  .gx-summary .row.total b { font-size: 18px; }

  /* Modal */
  .gx-modal { width: 96vw; max-height: 94vh; }
  .gx-modal-grid { grid-template-columns: 1fr; max-height: 94vh; overflow: auto; }
  .gx-modal-img { aspect-ratio: 4/3; }
  .gx-modal-body { padding: 18px 18px 24px; }
  .gx-modal-body h2 { font-size: 22px; }
  .gx-modal-price b { font-size: 22px; }
}

@media (max-width: 480px) {
  .gx-pills { grid-template-columns: repeat(2, 1fr); }
  .gx-how-grid { grid-template-columns: 1fr; }
  .gx-promos { flex-direction: column; }
  .gx-util-links a { margin-left: 8px; font-size: 10px; }
  .gx-util-links a:nth-child(n+4) { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   Floating cart button (FAB) — 2026 style
   Circular by default; expands on hover to reveal the cart total.
   Hidden until the cart holds at least one item.
   ───────────────────────────────────────────────────────────── */
.gx-cart-fab {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 95;
  display: flex;
  align-items: center;
  height: 62px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--saffron) 0%, var(--saffron-dk) 100%);
  color: var(--cocoa-ink);
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 4px 12px -2px rgba(60, 30, 8, 0.28),
    0 16px 34px -10px rgba(60, 30, 8, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  /* hidden state — tucked away below the viewport edge */
  transform: translateY(150%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease,
    box-shadow 0.25s ease;
}

/* visible only once the cart has items */
.gx-cart-fab.has-items {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
  animation: gx-fab-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gx-cart-fab:hover {
  box-shadow:
    0 6px 16px -2px rgba(60, 30, 8, 0.32),
    0 24px 48px -12px rgba(60, 30, 8, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.gx-cart-fab:active { transform: translateY(0) scale(0.96); }
.gx-cart-fab:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; }

/* icon disc */
.gx-cart-fab-ico {
  position: relative;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gx-cart-fab-ico svg { width: 25px; height: 25px; display: block; }

/* count badge */
.gx-cart-fab-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cocoa-ink);
  color: var(--bone);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  border: 2px solid var(--saffron);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* total — collapsed to 0 width, expands on hover/focus */
.gx-cart-fab-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.2;
  transition:
    max-width 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.36s ease;
}
.gx-cart-fab:hover .gx-cart-fab-meta,
.gx-cart-fab:focus-visible .gx-cart-fab-meta {
  max-width: 180px;
  padding-right: 24px;
}
.gx-cart-fab-meta small {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.72;
}
.gx-cart-fab-meta b { font-size: 15px; font-weight: 700; }
.gx-cart-fab-meta b .woocommerce-Price-amount { font-weight: 700; }

@keyframes gx-fab-pop {
  0%   { transform: translateY(0) scale(1); }
  35%  { transform: translateY(0) scale(1.16); }
  62%  { transform: translateY(0) scale(0.94); }
  100% { transform: translateY(0) scale(1); }
}

/* mobile already carries a cart entry in the sticky bottom nav */
@media (max-width: 768px) {
  .gx-cart-fab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gx-cart-fab,
  .gx-cart-fab.has-items { transition: opacity 0.2s ease; animation: none; }
}

/* ─── Print/large screens cleanup ─── */
@media (min-width: 1280px) {
  .gx-container { padding: 0 24px; }
}

/* ─── Homepage hero carousel ─── */
.gx-hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.5s ease; }
.gx-hero-slide.act { position: relative; opacity: 1; visibility: visible; min-height: 380px; }
.gx-hero-slide > .gx-hero-inner { height: 100%; }
@media (max-width: 640px) {
  .gx-hero-slide.act { min-height: 320px; }
}
