/* Gifts3D base design system 闁?palette & breakpoints from reference storefront */

:root {
  --g3d-accent: #b88746;
  --g3d-accent-hover: #241c17;
  --g3d-ink: #241c17;
  --g3d-cream: #f7f1e7;
  --g3d-line: #d8c3a5;
  --g3d-muted: #6f6258;
  --g3d-surface: #ffffff;
  --g3d-bg: #fffdf9;
  --g3d-radius: 3px;
  --g3d-font-body: "g3d-body", "Segoe UI", system-ui, -apple-system, sans-serif;
  --g3d-font-display: "g3d-display", Georgia, serif;
  --g3d-header-h: 64px;
  --g3d-page: 1200px;
  --g3d-gap: 24px;
  --g3d-shadow: 0 10px 30px rgba(36, 28, 23, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--g3d-font-body);
  color: var(--g3d-ink);
  background: var(--g3d-bg);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul.list-unstyled, .list-unstyled { list-style: none; margin: 0; padding: 0; }

.page-width { max-width: var(--g3d-page); margin-inline: auto; padding-inline: 20px; }
.g3d-header__inner.page-width { max-width: none; }
.visually-hidden { position: absolute !important; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }

h1, h2, h3, h4 { font-family: var(--g3d-font-display); line-height: 1.2; margin: 0 0 .5em; }
.g3d-h1 { font-size: clamp(28px, 4vw, 44px); }
.g3d-h2 { font-size: clamp(24px, 3vw, 34px); text-align: center; margin-bottom: 8px; }
.g3d-h3 { font-size: 20px; }
.g3d-sub { text-align: center; color: var(--g3d-muted); margin: 0 0 24px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--g3d-accent); color: #fff; border: 1px solid var(--g3d-accent);
  border-radius: var(--g3d-radius); padding: 12px 28px; font-size: 15px; font-weight: 600;
  letter-spacing: .02em; transition: background .18s, color .18s, border-color .18s;
}
.button:hover { background: var(--g3d-accent-hover); border-color: var(--g3d-accent-hover); color: var(--g3d-cream); }
.button--full-width { width: 100%; }

/* ============ Announcement bar ============ */
.g3d-announcement { background: var(--g3d-ink); color: var(--g3d-cream); font-size: 13px; letter-spacing: .04em; position: relative; }
.g3d-announcement .swiper-wrapper { height: 29px; align-items: center; }
.g3d-announcement .swiper-wrapper { height: 29px; align-items: center; }
.g3d-announcement__slide { text-align: center; display: flex; justify-content: center; }
.g3d-announcement .swiper-button-prev, .g3d-announcement .swiper-button-next {
  width: 28px; height: 28px; color: var(--g3d-cream); --swiper-navigation-size: 14px;
}
.g3d-announcement .swiper-button-prev::after, .g3d-announcement .swiper-button-next::after { font-size: 12px; }

/* ============ Header ============ */
.g3d-header {
  position: sticky; top: 0; z-index: 100; background: var(--g3d-surface);
  border-bottom: 1px solid var(--g3d-line); box-shadow: 0 2px 10px rgba(36,28,23,.06);
}
.g3d-header__inner { display: flex; align-items: center; gap: 20px; height: var(--g3d-header-h); max-width: none; padding-inline: 15px; }
.g3d-header__logo { flex: 0 0 auto; }
.g3d-header__logo img { max-height: 44px; width: auto; }
.g3d-logo-fallback { display: inline-flex; align-items: center; gap: 10px; font-family: var(--g3d-font-display); font-size: 26px; font-weight: 700; color: var(--g3d-ink); }
.g3d-logo-mark svg { width: 34px; height: 34px; fill: none; stroke: var(--g3d-accent); }

.g3d-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.g3d-nav__list { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; max-width: 100%; }
.g3d-nav__list > li { position: relative; }
.g3d-nav__list > li > a {
  display: block; padding: 10px 11px; font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--g3d-ink); border-bottom: 2px solid transparent; white-space: nowrap;
}
.g3d-nav__list > li > a:hover { color: var(--g3d-accent); }
.g3d-nav__list > li.current-menu-item > a { color: var(--g3d-accent); border-bottom-color: var(--g3d-accent); }
.g3d-nav__list ul.sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--g3d-surface);
  border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius); box-shadow: var(--g3d-shadow);
  padding: 10px 0; list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.g3d-nav__list > li:hover > ul.sub-menu, .g3d-nav__list > li:focus-within > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.g3d-nav__list ul.sub-menu a { display: block; padding: 8px 18px; font-size: 14px; }
.g3d-nav__list ul.sub-menu a:hover { background: var(--g3d-cream); color: var(--g3d-accent); }

.g3d-header__actions { display: flex; align-items: center; gap: 6px; }
.g3d-header__icon { position: relative; display: inline-flex; padding: 8px; color: var(--g3d-ink); border-radius: var(--g3d-radius); }
.g3d-header__icon svg { width: 22px; height: 22px; }
.g3d-header__icon:hover { color: var(--g3d-accent); }
.g3d-cart-count {
  position: absolute; top: 2px; right: 0; background: var(--g3d-accent); color: #fff;
  border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.g3d-cart-count[data-cart-count="0"] { display: none; }

.g3d-lang-switcher, .g3d-currency-switcher { position: relative; }
.g3d-lang-switcher summary, .g3d-currency-switcher summary {
  list-style: none; cursor: pointer; padding: 6px 10px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius); letter-spacing: .04em;
}
.g3d-lang-switcher summary::-webkit-details-marker, .g3d-currency-switcher summary::-webkit-details-marker { display: none; }
.g3d-lang-switcher ul, .g3d-currency-switcher ul {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; margin: 0; padding: 6px 0;
  background: var(--g3d-surface); border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius);
  box-shadow: var(--g3d-shadow); list-style: none; min-width: 130px;
}
.g3d-lang-switcher li a, .g3d-currency-switcher li a { display: block; padding: 7px 14px; font-size: 13.5px; }
.g3d-lang-switcher li a:hover, .g3d-currency-switcher li a:hover, .g3d-lang-switcher li a.is-active, .g3d-currency-switcher li a.is-active { background: var(--g3d-cream); color: var(--g3d-accent); }

.g3d-burger { display: none; background: none; border: 0; padding: 10px; }
.g3d-burger span { display: block; width: 22px; height: 2px; background: var(--g3d-ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ============ Mobile drawer ============ */
.g3d-mobile-menu { position: fixed; inset: 0; z-index: 200; }
.g3d-mobile-menu__scrim { position: absolute; inset: 0; background: rgba(36,28,23,.5); }
.g3d-mobile-menu__panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(360px, 86vw); background: var(--g3d-surface);
  padding: 24px; overflow-y: auto; animation: g3d-slide-in .22s ease;
}
@keyframes g3d-slide-in { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.g3d-mobile-menu__close { background: none; border: 0; font-size: 30px; line-height: 1; float: right; color: var(--g3d-ink); }
.g3d-mobile-menu__list { list-style: none; margin: 40px 0 0; padding: 0; }
.g3d-mobile-menu__list li { border-bottom: 1px solid var(--g3d-line); }
.g3d-mobile-menu__list a { display: block; padding: 13px 2px; font-size: 16px; font-weight: 600; }
.g3d-mobile-menu__list ul { list-style: none; padding-left: 14px; }
.g3d-mobile-menu__foot { margin-top: 22px; font-size: 14px; color: var(--g3d-muted); }

/* ============ Product cards ============ */
.g3d-grid.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--g3d-gap); list-style: none; margin: 0; padding: 0; }
li.type-product { position: relative; }
.g3d-card__media { position: relative; overflow: hidden; border-radius: var(--g3d-radius); background: var(--g3d-cream); }
.g3d-card__media a { display: block; }
.g3d-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .35s ease; }
li.type-product:hover .g3d-card__media img { transform: scale(1.04); }
.g3d-badge { position: absolute; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 2px; }
.g3d-badge--sale { top: 10px; left: 10px; background: var(--g3d-accent); color: #fff; }
.g3d-card__body { padding: 12px 2px 0; text-align: center; }
.g3d-card__body .woocommerce-loop-product__title { font-family: var(--g3d-font-body); font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.g3d-card__body .price { color: var(--g3d-ink); font-weight: 700; font-size: 16px; display: block; margin-bottom: 4px; }
.g3d-card__body .price del { color: var(--g3d-muted); font-weight: 400; margin-right: 6px; }
.g3d-card__body .price ins { text-decoration: none; color: var(--g3d-accent); }
.star-rating { color: #e0b580; font-size: 13px; letter-spacing: 2px; margin: 2px auto 4px; display: inline-block; }

/* ============ CPS selector ============ */
.cps { margin-top: 18px; border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius); padding: 18px; }
.cps__heading-row h2 { font-size: 15px; font-family: var(--g3d-font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; color: var(--g3d-muted); }
.cps__shapes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scrollbar-width: thin; }
.cps__shape { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px; border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius); min-width: 92px; font-size: 12px; transition: border-color .15s; }
.cps__shape:hover, .cps__shape.is-active { border-color: var(--g3d-accent); }
.cps__shape.is-active { box-shadow: inset 0 0 0 1px var(--g3d-accent); }
.cps__shape-icon svg { width: 40px; height: 40px; fill: none; stroke: var(--g3d-ink); stroke-width: 1.2; }
.cps__shape.is-active .cps__shape-icon svg { stroke: var(--g3d-accent); }
.cps__shape strong { font-size: 11.5px; text-align: center; }
.cps__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cps__option {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start; background: var(--g3d-surface);
  border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius); padding: 12px 14px; text-align: left;
  transition: border-color .15s;
}
.cps__option:hover { border-color: var(--g3d-accent); }
.cps__option.is-selected { border-color: var(--g3d-accent); box-shadow: inset 0 0 0 1px var(--g3d-accent); }
.cps__option strong { font-size: 14px; }
.cps__option small { color: var(--g3d-muted); font-size: 12px; }
.cps__option-price b { color: var(--g3d-accent); font-size: 15px; }
.cps__option-price s { color: var(--g3d-muted); font-size: 13px; margin-right: 6px; }
.cps__continue { margin-top: 16px; }

/* ============ Trust badges ============ */
.ag-trust-badges ul { list-style: none; display: flex; justify-content: space-between; gap: 6px; margin: 18px 0 0; padding: 14px 4px 0; border-top: 1px solid var(--g3d-line); }
.ag-trust-badges__details { position: relative; }
.ag-trust-badges__trigger { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 11px; color: var(--g3d-muted); }
.ag-trust-badges__trigger::-webkit-details-marker { display: none; }
.ag-trust-badges__icon svg { width: 34px; height: 34px; fill: none; stroke: var(--g3d-accent); stroke-width: 1; }
.ag-trust-badges__facet { fill: rgba(184,135,70,.1); }
.ag-trust-badges__popover {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--g3d-ink); color: var(--g3d-cream); padding: 10px 14px; border-radius: var(--g3d-radius);
  font-size: 12px; width: 210px; display: flex; flex-direction: column; gap: 2px; z-index: 50;
}
.ag-trust-badges__popover strong { font-size: 12.5px; }

/* ============ Shipping details ============ */
.g3d-shipping-details { margin-top: 14px; }
.ag-shipping-details__summary { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; padding: 10px 0; border-top: 1px solid var(--g3d-line); list-style: none; }
.ag-shipping-details__summary::-webkit-details-marker { display: none; }
.ag-shipping-details__summary svg { width: 26px; height: 26px; fill: none; stroke: var(--g3d-accent); stroke-width: 1.3; }
.ag-shipping-details__table { display: flex; flex-direction: column; font-size: 14px; }
.ag-shipping-details__table-head, .ag-shipping-details__row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--g3d-line); }
.ag-shipping-details__table-head { font-size: 12.5px; color: var(--g3d-muted); text-transform: uppercase; letter-spacing: .04em; }
.ag-shipping-details__return-heading { font-size: 14px; margin: 12px 0 4px; }
.ag-shipping-details__returns p { font-size: 13.5px; color: var(--g3d-muted); }

/* ============ Footer ============ */
.g3d-footer { background: var(--g3d-ink); color: var(--g3d-cream); margin-top: 64px; }
.g3d-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-top: 72px; padding-bottom: 120px; max-width: var(--g3d-page); margin-inline: auto; }
.g3d-footer a { color: var(--g3d-cream); opacity: .85; }
.g3d-footer a:hover { opacity: 1; color: var(--g3d-accent); }
.g3d-footer__logo img { max-height: 40px; filter: brightness(0) invert(1); }
.g3d-footer__tagline { font-size: 14px; opacity: .7; margin: 12px 0 16px; }
.g3d-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.g3d-footer h3 { font-family: var(--g3d-font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--g3d-accent); margin-bottom: 12px; }
.g3d-footer__social { display: flex; gap: 10px; }
.g3d-footer__social a { display: inline-flex; padding: 8px; border: 1px solid rgba(247,241,231,.25); border-radius: 50%; }
.g3d-footer__social svg { width: 16px; height: 16px; }
.g3d-footer__payments { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.g3d-footer__payments svg { width: 46px; height: 29px; border-radius: 3px; }
.g3d-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 34px; border-top: 1px solid rgba(247,241,231,.15); font-size: 13px; opacity: .7; max-width: var(--g3d-page); margin-inline: auto; }
.g3d-backtotop { background: none; border: 1px solid rgba(247,241,231,.3); color: var(--g3d-cream); border-radius: 50%; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.g3d-backtotop svg { width: 16px; height: 16px; }

/* ============ Mobile bottom nav ============ */
.g3d-mobile-bottom { display: none; }

/* ============ Prose / misc ============ */
.g3d-prose { max-width: 760px; }
.g3d-prose h2 { text-align: left; }
.g3d-page { padding: 40px 20px 60px; }
.g3d-post { margin-bottom: 32px; }
.g3d-cart-personal { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 400; }
.g3d-cart-personal img { width: 44px; height: 55px; object-fit: cover; border-radius: 2px; }

/* ============ Newsletter ============ */
.g3d-newsletter { background: var(--g3d-cream); padding: 56px 0; text-align: center; }
.g3d-newsletter h2 { font-size: clamp(22px, 3vw, 30px); }
.g3d-newsletter__form { display: flex; gap: 10px; justify-content: center; max-width: 460px; margin: 18px auto 0; }
.g3d-newsletter__form input[type="email"] { flex: 1; padding: 12px 16px; border: 1px solid var(--g3d-line); border-radius: var(--g3d-radius); font-size: 15px; background: var(--g3d-surface); }

.g3d-tab-panel[hidden] { display: none !important; }
.g3d-slider { overflow: hidden; }
.g3d-slider .swiper-slide { height: auto; }
.g3d-slider .swiper-slide a { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.g3d-slider .swiper-slide img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--g3d-radius); }

/* ============ Breakpoints (reference: 1429/1199/991/767/575) ============ */
@media (max-width: 1429px) { :root { --g3d-page: 1140px; } }
@media (max-width: 1199px) { :root { --g3d-page: 960px; --g3d-gap: 18px; } .g3d-grid.products { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px) {
  .g3d-nav { display: none; }
  .g3d-burger { display: block; }
  .g3d-grid.products { grid-template-columns: repeat(3, 1fr); }
  .g3d-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 767px) {
  :root { --g3d-header-h: 56px; }
  .g3d-grid.products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .g3d-lang-switcher { display: none; }
  .g3d-mobile-bottom {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--g3d-surface); border-top: 1px solid var(--g3d-line); z-index: 90; padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }
  .g3d-mobile-bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--g3d-ink); }
  .g3d-mobile-bottom svg { width: 22px; height: 22px; }
  body { padding-bottom: 58px; }
  .g3d-footer__grid { grid-template-columns: 1fr; }
  .g3d-footer .title-footer + .g3d-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
  .g3d-footer .g3d-footer__nav { margin-top: 8px; }
  .g3d-footer details[open] .g3d-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
}
@media (max-width: 575px) {
  .g3d-newsletter__form { flex-direction: column; }
  .cps__options { grid-template-columns: 1fr 1fr; }
}
