/* =============================================================================
   DESIGN TOKENS — CSS CUSTOM PROPERTIES
   ============================================================================= */

:root {
  /* ── Colors: Core ── */
  --color-white:        #FFFFFF;
  --color-off-white:    #FAF9F7;
  --color-cream:        #F5F2EE;
  --color-sand:         #E8E2D9;

  /* ── Colors: Text ── */
  --color-black:        #1A1A1A;
  --color-charcoal:     #3D3D3D;
  --color-gray:         #5C5C5C;
  --color-light-gray:   #C4C4C4;

  /* ── Colors: Accent ── */
  --color-gold:         #B8935A;
  --color-gold-light:   #D4AF7A;
  --color-gold-dark:    #9A7840;

  /* ── Colors: Feedback ── */
  --color-success:      #4A7C59;
  --color-error:        #C0392B;

  /* ── Colors: Semantic status (order badges) ── */
  --color-background-success: rgba(74, 124, 89, 0.10);
  --color-text-success:       #4A7C59;
  --color-background-info:    rgba(61, 90, 158, 0.10);
  --color-text-info:          #3d5a9e;
  --color-background-warning: rgba(138, 104, 0, 0.10);
  --color-text-warning:       #8a6800;
  --color-background-danger:  rgba(192, 57, 43, 0.10);
  --color-text-danger:        #C0392B;

  /* ── Typography: Font Stacks ── */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Jost', 'Inter', system-ui, sans-serif;

  /* ── Typography: Fluid Sizes ── */
  --text-hero:   clamp(2.5rem, 6vw, 5rem);
  --text-h1:     clamp(2rem, 4vw, 3.5rem);
  --text-h2:     clamp(1.5rem, 3vw, 2.5rem);
  --text-h3:     clamp(1.25rem, 2vw, 1.75rem);
  --text-body:   1rem;           /* 16px base */
  --text-small:  0.9375rem;      /* 15px — product names, body copy */
  --text-xs:     0.8125rem;      /* 13px — nav links, labels, badges */

  /* ── Typography: Weights ── */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;

  /* ── Typography: Line Heights ── */
  --leading-tight:  1.15;
  --leading-body:   1.7;
  --leading-loose:  2;

  /* ── Typography: Letter Spacing ── */
  --tracking-wide:  0.08em;
  --tracking-wider: 0.15em;

  /* ── Spacing Scale ── */
  --space-1:  0.25rem;   /* 4px  */
  --space-2:  0.5rem;    /* 8px  */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.5rem;    /* 24px */
  --space-6:  2rem;      /* 32px */
  --space-7:  3rem;      /* 48px */
  --space-8:  4rem;      /* 64px */
  --space-9:  6rem;      /* 96px */
  --space-10: 8rem;      /* 128px */
  --space-11: 10rem;     /* 160px */

  /* ── Layout ── */
  --container-max:  1440px;
  --container-wide: 1280px;
  --container-text: 760px;
  --gutter:         clamp(1rem, 4vw, 3rem);
  --section-gap:    clamp(3rem, 8vw, 7rem);

  /* ── Layout: Header heights (used by negative-margin hero trick) ── */
  --header-height:  56px; /* mobile */

  /* ── Motion ── */
  --duration-fast:   200ms;
  --duration-normal: 350ms;
  --ease-default:    ease;
}

/* =============================================================================
   BASE RESET & GLOBAL STYLES
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background-color: var(--color-off-white);
  /*
   * overflow-x: clip instead of hidden — clip does NOT create a scroll container,
   * so position:sticky on the header continues to work correctly.
   */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-off-white);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-charcoal);
  overflow-x: clip; /* same reason — must not break sticky */
}

/* Headings — always serif, light weight */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  color: var(--color-black);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: clamp(1rem, 1.5vw, 1.25rem); }
h5 { font-size: var(--text-body); }
h6 { font-size: var(--text-small); }

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-black);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--color-gold);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* =============================================================================
   FORM INPUTS — BOTTOM BORDER ONLY
   ============================================================================= */

input,
select,
textarea {
  border: none;
  border-bottom: 1px solid var(--color-sand);
  border-radius: 0;
  padding: 0.75rem 0;
  font-family: var(--font-sans);
  font-size: 1rem; /* minimum 16px — prevents iOS auto-zoom */
  font-weight: var(--weight-regular);
  color: var(--color-black);
  background: transparent;
  width: 100%;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-default);
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-bottom-color: var(--color-black);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-light-gray);
}

label {
  display: block;
  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-gray);
  margin-bottom: var(--space-1);
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

/*
 * Astra / WooCommerce inject:
 *   border-radius: 4px; box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
 * onto every button/input selector. Reset both globally here so nothing bleeds
 * through to our design-system components or WC buttons.
 */
button,
.ast-button,
.button,
input[type="button"],
input[type="reset"],
input[type="submit"],
a:where(.wp-block-button__link) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.store-btn-primary,
.store-btn-secondary,
.store-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  min-height: 48px;
  padding: 0.875rem 2rem;
  border-radius: 2px;
  transition: background var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.store-btn-primary {
  background: var(--color-gold);
  color: var(--color-white);
  border: 1px solid var(--color-gold);
}

.store-btn-primary:hover,
.store-btn-primary:focus-visible {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  color: var(--color-white);
}

.store-btn-secondary {
  background: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-black);
}

.store-btn-secondary:hover,
.store-btn-secondary:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
}

.store-btn-ghost {
  background: transparent;
  border: none;
  color: var(--color-charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: var(--text-small);
  padding: 0.875rem 0;
  min-height: 44px;
}

.store-btn-ghost:hover,
.store-btn-ghost:focus-visible {
  color: var(--color-gold);
}

/* Full-width button modifier */
.store-btn--full {
  width: 100%;
}

/* Focus styles — never outline: none without replacement */
.store-btn-primary:focus-visible,
.store-btn-secondary:focus-visible,
.store-btn-ghost:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.store-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.store-container--wide {
  max-width: var(--container-wide);
}

.store-container--text {
  max-width: var(--container-text);
}

.store-section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

/* Screen reader only */
.store-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Safe area for notched phones — applied to fixed bottom elements */
.store-safe-bottom {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* =============================================================================
   BADGES
   ============================================================================= */

.store-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.625rem; /* 10px */
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 0;
  line-height: 1.6;
}

.store-badge--sale {
  background: var(--color-black);
  color: var(--color-white);
}

.store-badge--new {
  background: var(--color-gold);
  color: var(--color-white);
}

/* =============================================================================
   DIVIDERS
   ============================================================================= */

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