/* =============================================================================
   VARIANT SWATCHES / PILL SELECTOR
   ============================================================================= */

.store-swatch-group {
  margin-bottom: var(--space-5);
}

.store-swatch-group__label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.store-swatch-group__name {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-black);
}

.store-swatch-group__selected {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
}

.store-swatch-group__selected:not(:empty)::before {
  content: ': ';
}

/* Hide the native <select> visually — WC JS still reads it */
.store-swatch-group__native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.store-swatch-group__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* =============================================================================
   ARCHIVE PAGE — FULL LAYOUT
   ============================================================================= */

/* ── Page shell ── */
.store-archive {
  padding-bottom: var(--section-gap);
}

/* ── Header: title + description ── */
.store-archive__header {
  padding: var(--space-7) 0 var(--space-4);
}

.store-archive__title {
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  color: var(--color-black);
  margin: 0 0 var(--space-3);
}

.store-archive__desc {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-gray);
  max-width: 52ch;
  margin: 0;
  line-height: var(--leading-body);
}

/* ── Sub-category chips ── */
.store-subcat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-bottom: var(--space-6);
}

.store-subcat-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-charcoal);
  text-decoration: none;
  background: var(--color-cream);
  padding: var(--space-2) var(--space-5);
  white-space: nowrap;
  min-height: 44px;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}

.store-subcat-chip:hover {
  background: var(--color-sand);
  color: var(--color-black);
}

.store-subcat-chip:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ── Sub-category carousel wrapper ── */
.store-subcat-carousel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

/* Chips sit naturally wide — override carousel track's card-sized gap */
.store-subcat-carousel .store-carousel-track {
  gap: var(--space-2);
}

/* No gutters — align flush with page content */
.store-subcat-carousel .store-carousel-track-wrap {
  padding-left: 0;
  padding-right: 0;
}

/* Arrow row — centered below the chip track, hidden until JS detects overflow */
.store-subcat-carousel__nav {
  display: none;
  justify-content: center;
  gap: var(--space-3);
}

.store-subcat-carousel.has-overflow .store-subcat-carousel__nav {
  display: flex;
}

/* Buttons are in normal flow — remove the inherited absolute positioning */
.store-subcat-carousel .store-carousel-btn {
  position: static;
  transform: none;
  display: flex;
  width: 32px;
  height: 32px;
}

/* ── Filter strip: toggle button + sort + count ── */
.store-archive__filter-strip {
  margin-bottom: var(--space-2);
}

.store-archive__filter-strip-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  min-height: 56px;
}

/* Filter toggle button */
.store-archive__filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1px solid var(--color-sand);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-charcoal);
  padding: var(--space-2) var(--space-4);
  min-height: 40px;
  transition: border-color var(--duration-fast) ease, color var(--duration-fast) ease;
  position: relative;
}

.store-archive__filter-toggle:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}

.store-archive__filter-toggle[aria-expanded="true"] {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.store-archive__filter-toggle:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Active filter count badge */
.store-archive__filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold);
  color: var(--color-white);
  font-size: 10px;
  font-weight: var(--weight-medium);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  line-height: 1;
  margin-left: var(--space-1);
}

/* Hide badge until active filters exist — prevents display:inline-flex overriding [hidden] */
.store-archive__filter-count[hidden] {
  display: none;
}

/* Sort select */
.store-archive__sort-wrap {
  margin-left: auto;
}

.store-archive__sort-select {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-charcoal);
  background: transparent;
  border: 1px solid var(--color-sand);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  min-height: 40px;
  appearance: none;
  padding-right: var(--space-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238C8C8C' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
}

.store-archive__sort-select:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-color: var(--color-black);
}

/* Result count */
.store-archive__count {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
  margin: 0;
  white-space: nowrap;
}

/* ── Layout: filter is now a drawer — grid is always single column ── */
.store-archive__layout {
  display: block;
}

/* ── Filter drawer — slides from the left on all screen sizes ── */

.store-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
}

.store-filter-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-default);
}

.store-filter-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: var(--color-white);
  transform: translateX(-100%);
  transition: transform var(--duration-normal) var(--ease-default);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 768px) {
  .store-filter-drawer__panel {
    width: min(360px, 90vw);
  }
}

.store-filter-drawer.is-open {
  pointer-events: auto;
}

.store-filter-drawer.is-open .store-filter-drawer__overlay {
  opacity: 1;
}

.store-filter-drawer.is-open .store-filter-drawer__panel {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .store-filter-drawer__overlay,
  .store-filter-drawer__panel {
    transition: none;
  }
}

/* The inner filter panel sits inside the drawer panel */
.store-filter-panel {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5) var(--space-4) max(var(--space-8), env(safe-area-inset-bottom));
}

.store-filter-panel[hidden] {
  display: none;
}

/* Panel header (title + close btn) */
.store-filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-sand);
}

.store-filter-panel__title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-black);
  margin: 0;
}

.store-filter-panel__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-black);
  padding: var(--space-2);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-filter-panel__close:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Individual filter group */
.store-filter-group {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-sand);
}

.store-filter-group__title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-black);
  margin: 0 0 var(--space-3);
}

/* Checkbox filter */
.store-filter-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  min-height: 44px;
}

.store-filter-checkbox__input {
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-sand);
  appearance: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  accent-color: var(--color-gold);
}

.store-filter-checkbox__input:checked {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.store-filter-checkbox__input:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/10px no-repeat;
}

.store-filter-checkbox__input:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.store-filter-checkbox__label {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-charcoal);
}

/* Price range inputs */
.store-filter-price__inputs {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.store-filter-price__field {
  display: flex;
  align-items: center;
  flex: 1;
  gap: var(--space-1);
}

.store-filter-price__currency {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
  pointer-events: none;
  flex-shrink: 0;
}

.store-filter-price__input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-black);
  background: none;
  border: none;
  outline: none;
  padding: 0;
  min-height: 32px;
  -moz-appearance: textfield;
}

.store-filter-price__input::-webkit-inner-spin-button,
.store-filter-price__input::-webkit-outer-spin-button {
  appearance: none;
}

.store-filter-price__sep {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-light-gray);
  flex-shrink: 0;
}

.store-filter-price__apply {
  display: block;
  width: fit-content;
  margin: var(--space-5) auto 0;
}

/* Colour chips */
.store-filter-color-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.store-filter-color-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-charcoal);
  text-decoration: none;
  background: var(--color-cream);
  padding: var(--space-1) var(--space-3);
  min-height: 32px;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
  white-space: nowrap;
}

.store-filter-color-chip:hover {
  background: var(--color-sand);
  color: var(--color-black);
}

.store-filter-color-chip.is-active {
  background: var(--color-black);
  color: var(--color-white);
}

.store-filter-color-chip:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Clear all button */
.store-filter-panel__clear {
  margin-top: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: var(--space-2) 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color var(--duration-fast) ease;
}

.store-filter-panel__clear:hover {
  color: var(--color-black);
}

/* ── Product grid ── */
.store-archive__grid-wrap {
  min-width: 0;
}

/* Ad tile in product grid */
.store-product-grid__ad-tile {
  grid-column: span 1;
  overflow: hidden;
  background: var(--color-cream);
}

@media (min-width: 768px) {
  .store-product-grid__ad-tile {
    grid-column: 1 / -1;
  }
}

.store-product-grid__ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: clamp(200px, 35vw, 420px);
}

/* Empty state */
.store-archive__empty {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-gray);
  padding: var(--space-10) 0;
  text-align: center;
}

/* ── Legacy filter pill classes retained for backward compat ── */
.store-filter-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-charcoal);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-sand);
  transition: border-color var(--duration-fast) ease, color var(--duration-fast) ease,
              background var(--duration-fast) ease;
  min-height: 2.75rem;
}

.store-filter-pill:hover {
  border-color: var(--color-charcoal);
  color: var(--color-black);
}

.store-filter-pill.is-active {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.store-filter-pill:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* =============================================================================
   PRODUCT TABS: ACCORDION TOGGLE (mobile) + TABS (desktop)
   ============================================================================= */

.store-product-tabs__accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--color-sand);
  padding: var(--space-4) 0;
  cursor: pointer;
  text-align: left;
}

.store-product-tabs__accordion-label {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-black);
}

.store-product-tabs__accordion-chevron {
  flex-shrink: 0;
  color: var(--color-charcoal);
  transition: transform var(--duration-fast) ease;
}

.store-product-tabs__panel.is-open .store-product-tabs__accordion-chevron {
  transform: rotate(180deg);
}

.store-product-tabs__accordion-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Content area — animated max-height handled by JS */
.store-product-tabs__content {
  overflow: hidden;
  padding: 0 0 var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--color-charcoal);
  line-height: var(--leading-body);
}

/* Desktop tab nav — shown at 768px+ */
.store-product-tabs__nav {
  display: flex;
  list-style: none;
  margin: 0 0 var(--space-7);
  padding: 0;
  border-bottom: 1px solid var(--color-sand);
}

.store-product-tabs__nav-item {
  margin: 0;
  padding: 0;
}

.store-product-tabs__nav-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-gray);
  cursor: pointer;
  min-height: 48px;
  margin-bottom: -1px;
  transition: color var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default);
}

.store-product-tabs__nav-btn.is-active,
.store-product-tabs__nav-btn:hover {
  color: var(--color-black);
  border-bottom-color: var(--color-gold);
}

.store-product-tabs__nav-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Desktop: hide accordion toggle, show tab nav */
@media (min-width: 768px) {
  .store-product-tabs__accordion-btn { display: none; }
  .store-product-tabs__panel[hidden] { display: none; }
  .store-product-tabs__content {
    max-height: none !important;
    padding: var(--space-6) 0;
  }
}

/* Mobile: hide tab nav */
@media (max-width: 767px) {
  .store-product-tabs__nav { display: none; }
}

/* =============================================================================
   NEWSLETTER FEEDBACK MESSAGE
   ============================================================================= */

.store-footer__newsletter-msg {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  padding: var(--space-2) 0;
  margin: var(--space-2) 0 0;
  line-height: var(--leading-body);
}

.store-footer__newsletter-msg.is-success { color: var(--color-success); }
.store-footer__newsletter-msg.is-error   { color: var(--color-error); }

/* =============================================================================
   ANNOUNCEMENT BAR
   ============================================================================= */

.store-announcement-bar {
  background: var(--color-black);
  overflow: hidden;
  width: 100%;
  flex-shrink: 0;
  height: 36px;
  display: flex;
  align-items: center;
}

.store-announcement-bar__track {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: 0 var(--space-6);
  white-space: nowrap;
  justify-content: center;
  width: 100%;
}

/* Marquee scroll only on mobile */
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .store-announcement-bar__track {
    justify-content: flex-start;
    animation: store-ticker 22s linear infinite;
  }
}

@keyframes store-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* On desktop: hide duplicate set used for seamless mobile loop */
@media (min-width: 768px) {
  .store-announcement-bar__item--dupe,
  .store-announcement-bar__sep--dupe {
    display: none;
  }
}

/* On reduced-motion: cancel animation, center, hide duplicates */
@media (prefers-reduced-motion: reduce) {
  .store-announcement-bar__track {
    animation: none;
    justify-content: center;
  }
  .store-announcement-bar__item--dupe,
  .store-announcement-bar__sep--dupe {
    display: none;
  }
}

.store-announcement-bar__item {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.store-announcement-bar__item a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: text-decoration-color var(--duration-fast) ease,
              color var(--duration-fast) ease;
}

.store-announcement-bar__item a:hover {
  color: var(--color-white);
  text-decoration-color: rgba(255, 255, 255, 0.9);
}

.store-announcement-bar__sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.625rem;
  flex-shrink: 0;
  user-select: none;
}

/* =============================================================================
   HEADER — ACCOUNT + WISHLIST BUTTONS (scoped duplicate for specificity)
   ============================================================================= */

.store-header__account-btn,
.store-header__wishlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-black);
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.store-header__account-btn:hover,
.store-header__wishlist-btn:hover {
  color: var(--color-gold);
}

.store-header__account-btn:focus-visible,
.store-header__wishlist-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* =============================================================================
   SECTION HEADING WITH SHOP-ALL LINK
   ============================================================================= */

.store-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.store-section__header .store-section__heading {
  margin-bottom: 0;
  text-align: left;
}

.store-section__shop-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-charcoal);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  padding: var(--space-2) 0;
  transition: color var(--duration-fast) ease;
}

.store-section__shop-all:hover {
  color: var(--color-gold);
}

.store-section__shop-all:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .store-section__shop-all:hover svg {
    transform: translateX(3px);
  }
  .store-section__shop-all svg {
    transition: transform var(--duration-fast) ease;
  }
}

/* =============================================================================
   WISHLIST HEART — active / filled state
   ============================================================================= */

/* When a product is in the wishlist, fill the heart with gold.
   Targets both the product card heart and any other [data-js="wishlist-toggle"]
   buttons that share the same SVG structure. */
[data-js="wishlist-toggle"].is-active {
  color: var(--color-gold);
}

[data-js="wishlist-toggle"].is-active svg path {
  fill: var(--color-gold);
  stroke: var(--color-gold);
}

/* Wishlisted hover — white filled heart on gold bg; pointer devices only */
@media (hover: hover) {
  .store-product-card__wishlist.is-active:hover svg path {
    fill: currentColor; /* currentColor = white (via :hover rule) */
    stroke: currentColor;
  }
}

/* Wishlisted press — white outline heart previews the about-to-be-unwishlisted state */
.store-product-card__wishlist.is-active:active svg path {
  fill: none;
  stroke: currentColor;
}

/* On desktop, active hearts are always visible (override opacity:0 in shop.css) */
@media (min-width: 1024px) {
  .store-product-card__wishlist.is-active {
    opacity: 1;
  }
}

/* Wishlist page — card removal animation */
@keyframes store-card-fade-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); }
}

.store-wishlist-card--removing {
  animation: store-card-fade-out var(--duration-normal, 200ms) ease forwards;
  pointer-events: none;
}

/* =============================================================================
   HOMEPAGE — CATEGORY GRID SECTION
   ============================================================================= */

.store-categories-section {
  background: var(--color-white);
}

.store-categories-section .store-section__header {
  margin-bottom: var(--space-4);
}

/* =============================================================================
   SIDE DRAWER — Ring Size Help
   (Reuses the same slide-in pattern as the cart drawer)
   ============================================================================= */

.store-side-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.store-side-drawer[hidden] {
  display: block; /* override browser `display:none` so CSS transition works */
}

.store-side-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-default);
}

.store-side-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: var(--color-white);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-default);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 768px) {
  .store-side-drawer__panel {
    width: min(460px, 90vw);
  }
}

.store-side-drawer.is-open {
  pointer-events: auto;
}

.store-side-drawer.is-open .store-side-drawer__overlay {
  opacity: 1;
}

.store-side-drawer.is-open .store-side-drawer__panel {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .store-side-drawer__overlay,
  .store-side-drawer__panel {
    transition: none;
  }
}

.store-side-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-sand);
  flex-shrink: 0;
}

.store-side-drawer__title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-black);
  margin: 0;
}

.store-side-drawer__close {
  background: none;
  border: none !important; /* Astra parent theme */
  box-shadow: none !important;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-black);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast) var(--ease-default);
}

.store-side-drawer__close:hover { color: var(--color-gold); }
.store-side-drawer__close:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.store-side-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.store-side-drawer__intro {
  font-size: var(--text-small);
  color: var(--color-charcoal);
  line-height: var(--leading-body);
  margin: 0;
}

.store-side-drawer__guide-link a {
  font-size: var(--text-small);
  color: var(--color-black);
  font-weight: var(--weight-medium);
}

.store-side-drawer__guide-link a:hover {
  color: var(--color-gold);
}

.store-side-drawer__divider {
  border: none;
  border-top: 1px solid var(--color-sand);
  margin: 0;
}

.store-side-drawer__section-title {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-black);
  margin: 0;
}

.store-side-drawer__section-desc {
  font-size: var(--text-small);
  color: var(--color-gray);
  line-height: var(--leading-body);
  margin: 0;
}

/* Ring sizer form */
.store-ring-sizer-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.store-ring-sizer-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.store-ring-sizer-form__field label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-black);
}

.store-ring-sizer-form__field input,
.store-ring-sizer-form__field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-black);
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  border-radius: 2px;
  transition: border-color var(--duration-fast) var(--ease-default);
  resize: vertical;
}

.store-ring-sizer-form__field input:focus,
.store-ring-sizer-form__field textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 0;
  border-color: var(--color-gold);
}

.store-ring-sizer-form__msg {
  font-size: var(--text-small);
  margin: 0;
  min-height: 1.4em;
}

/* "Don't know your size?" inline link on product page */
.store-ring-size-help {
  margin: 0 0 var(--space-2);
}

.store-ring-size-help__btn {
  background: none;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.store-ring-size-help__btn:hover {
  color: var(--color-gold);
  background: none !important; /* override Astra parent theme button:hover background */
}
.store-ring-size-help__btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =============================================================================
   ENGRAVING MODAL — Centered overlay dialog
   ============================================================================= */

.store-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: var(--space-4);
}

.store-modal-overlay[hidden] {
  display: flex; /* keep flex so transition works */
}

.store-modal-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.6);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-default);
}

.store-modal-overlay__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  max-height: calc(100svh - 2 * var(--space-4));
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(1.5rem);
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-default),
              opacity   var(--duration-normal) var(--ease-default);
}

.store-modal-overlay.is-open {
  pointer-events: auto;
}

.store-modal-overlay.is-open .store-modal-overlay__backdrop {
  opacity: 1;
}

.store-modal-overlay.is-open .store-modal-overlay__panel {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .store-modal-overlay__backdrop,
  .store-modal-overlay__panel {
    transition: none;
  }
}

.store-modal-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-sand);
  flex-shrink: 0;
}

.store-modal-overlay__title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-black);
  margin: 0;
}

.store-modal-overlay__close {
  background: none;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-black);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast) var(--ease-default);
}

.store-modal-overlay__close:hover { color: var(--color-gold); }
.store-modal-overlay__close:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.store-modal-overlay__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.store-modal-overlay__desc {
  font-size: var(--text-small);
  color: var(--color-gray);
  line-height: var(--leading-body);
  margin: 0;
}

.store-modal-overlay__footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-sand);
  flex-shrink: 0;
  justify-content: flex-end;
}

/* Engraving preview SVG area */
.store-engraving-preview {
  border: 1px solid var(--color-sand);
  padding: var(--space-4) var(--space-4) var(--space-2);
  text-align: center;
}

.store-engraving-preview__ring {
  width: 100%;
  height: auto;
  color: var(--color-charcoal);
}

.store-engraving-preview__note {
  font-size: var(--text-xs);
  color: var(--color-light-gray);
  margin: var(--space-2) 0 0;
}

/* Engraving input fields */
.store-engraving-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.store-engraving-fields__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.store-engraving-fields__group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-black);
}

.store-engraving-fields__counter {
  font-weight: var(--weight-regular);
  color: var(--color-gray);
}

.store-engraving-fields__group input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-black);
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  border-radius: 2px;
  transition: border-color var(--duration-fast) var(--ease-default);
}

.store-engraving-fields__group input:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 0;
  border-color: var(--color-gold);
}

/* Variation selection error — replaces WooCommerce's native browser alert */
.store-variation-error {
  margin: var(--space-3) 0;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-error);
  background: color-mix(in srgb, var(--color-error) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-error) 30%, transparent);
  border-radius: 2px;
}

.store-variation-error[hidden] { display: none; }

/* "Add engraving" button row on product page */
.store-engraving-row {
  margin-top: 0;
  margin-bottom: var(--space-4); /* space before Add to Cart button */
}

/* =============================================================================
   404 — PAGE NOT FOUND
   ============================================================================= */

body.error404 {
  background-color: var(--color-white) !important; /* override Astra parent theme error-page background */
}

.store-404-page {
  display: flex;
  justify-content: center;
  padding-top: clamp(3rem, 10vw, 7rem);
  padding-bottom: clamp(3rem, 10vw, 7rem);
}

.store-404__inner {
  text-align: center;
  max-width: 520px;
  width: 100%;
  padding: 0 var(--gutter);
}

.store-404__code {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: var(--weight-light);
  line-height: 1;
  color: var(--color-light-gray);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

.store-404__heading {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  color: var(--color-black);
  margin: 0 0 var(--space-4);
}

.store-404__body {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-gray);
  line-height: var(--leading-body);
  margin: 0 0 var(--space-7);
}

/* Search form spacing inside 404 */
.store-404__inner .store-search-form {
  margin-bottom: var(--space-6);
}

.store-404__cta {
  display: inline-flex;
}

/* =============================================================================
   SEARCH FORM
   ============================================================================= */

.store-search-form {
  width: 100%;
}

.store-search-form__field {
  position: relative;
  display: flex;
  align-items: stretch; /* button and input share the same height */
  border: 1px solid var(--color-sand);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color var(--duration-normal) var(--ease-default);
}

.store-search-form__field:focus-within {
  border-color: var(--color-black);
}

/* Visually hide the label — screen-readers still read it */
.store-search-form__label {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.store-search-form__input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 1rem; /* 16px — prevents iOS zoom */
  font-weight: var(--weight-light);
  color: var(--color-black);
  background: transparent;
  border: none !important; /* override Astra parent theme input border */
  outline: none;
  padding: var(--space-3) var(--space-4); /* horizontal padding for text breathing room */
  min-height: 48px;
}

.store-search-form__input::placeholder {
  color: var(--color-light-gray);
}

/* Remove the native search × clear button */
.store-search-form__input::-webkit-search-cancel-button,
.store-search-form__input::-webkit-search-decoration {
  display: none;
}

.store-search-form__submit {
  flex-shrink: 0;
  width: 52px; /* fixed width, height is determined by the input via align-items: stretch */
  background: var(--color-black);
  border: none !important; /* override Astra parent theme border on <button> */
  box-shadow: none !important; /* override Astra parent theme box-shadow */
  border-radius: 0; /* square edge flush with field border-radius via overflow: hidden */
  padding: 0;
  cursor: pointer;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  transition: background var(--duration-normal) var(--ease-default);
}

.store-search-form__submit:hover,
.store-search-form__submit:focus-visible {
  background: var(--color-gold);
  color: var(--color-white) !important; /* override Astra button:hover color */
}

/* =============================================================================
   SEARCH RESULTS — EMPTY STATE
   ============================================================================= */

.store-search__no-results {
  padding: var(--space-8) 0;
  text-align: center;
}

.store-search__empty-msg {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-gray);
  margin-bottom: var(--space-7);
}

.store-search__no-results .store-search-form {
  max-width: 480px;
  margin: 0 auto;
}
