/* ==========================================================================
   Reset, typography and shared utilities
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- layout helpers ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 56px; }
.section-sm { padding-block: 36px; }
.section-tight { padding-block: 28px; }

@media (max-width: 640px) {
  .section { padding-block: 36px; }
  .section-sm { padding-block: 24px; }
}

.stack > * + * { margin-top: var(--stack-gap, 16px); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--grey-2); }
.bg-cream { background: var(--cream); }
.bg-cream-light { background: var(--cream-light); }
.bg-beige { background: var(--beige); }
.bg-ink { background: var(--ink); color: var(--white); }

/* ---------- section heading ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head h2,
.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 500;
  text-transform: capitalize;
  color: var(--ink);
  letter-spacing: 0;
}

.section-head .eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.link-discover {
  flex: none;
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}

.link-discover:hover { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 640px) {
  .section-head { margin-bottom: 18px; }
  .link-discover { font-size: var(--fs-base); }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold-dark); }

.btn-ghost { background: var(--cream-light); color: var(--gold); }
.btn-ghost:hover { background: var(--gold-tint); }

.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-outline-light { background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.8); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); }

.btn-block { width: 100%; }
.btn-sm { height: 38px; padding-inline: 18px; font-size: var(--fs-base); }
.btn-lg { height: 54px; padding-inline: 36px; font-size: var(--fs-lg); }

.btn[disabled],
.btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* ---------- forms ---------- */

.field {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  transition: border-color var(--dur-fast) var(--ease);
}

.field:focus { border-color: var(--gold); outline: none; }

/* iOS zooms the whole page when a focused field is under 16px, which throws
   the checkout off-centre mid-typing — so phones get 16px exactly */
@media (max-width: 900px) {
  .field,
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="search"], input[type="number"], input[type="password"],
  select, textarea { font-size: 16px; }
}
.field::placeholder { color: var(--grey-3); }

textarea.field { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232b2826' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

.field-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--grey-2);
  margin-bottom: 8px;
}

/* ---------- breadcrumb ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px 6px;
  font-size: var(--fs-sm);
  color: var(--grey-2);
}

.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--grey-3); }
.breadcrumb [aria-current] { color: var(--ink); text-transform: capitalize; }

/* ---------- rating ---------- */

.rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--grey-2); }
.rating .star { color: var(--star); font-size: 13px; line-height: 1; }
.rating .score { color: var(--ink); font-weight: 500; }

/* ---------- badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.badge-best { background: var(--gold); color: var(--white); }

/* Best Seller is the one label that moves: a slow gold sweep with a beat of
   lift at the end, so it reads across a grid without becoming a carnival */
.badge-bestseller {
  position: relative;
  overflow: hidden;
  animation: badge-bestseller-beat 3.4s ease-in-out infinite;
}

.badge-bestseller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 55%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: badge-bestseller-sweep 3.4s ease-in-out infinite;
}

@keyframes badge-bestseller-beat {
  0%, 70%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(177, 137, 63, 0); }
  80%           { transform: scale(1.07); box-shadow: 0 0 0 4px rgba(177, 137, 63, 0.2); }
}

@keyframes badge-bestseller-sweep {
  0%, 50%    { left: -70%; }
  88%, 100%  { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-bestseller,
  .badge-bestseller::after { animation: none; }
}
.badge-sale { background: var(--sale); color: var(--white); }
.badge-new { background: var(--ink); color: var(--white); }
.badge-oos { background: rgba(43, 40, 38, 0.72); color: var(--white); }

/* ---------- rich text (policy / SEO blocks) ---------- */

.prose { max-width: 78ch; color: var(--grey-1); line-height: 1.85; }
.prose h2 { font-size: 26px; margin: 34px 0 12px; }
.prose h3 { font-size: var(--fs-xl); margin: 26px 0 10px; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 20px; margin-bottom: 1em; }
.prose ul li { margin-bottom: 6px; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- skeleton / empty ---------- */

.empty-state {
  padding: 72px 20px;
  text-align: center;
  color: var(--grey-2);
}

.empty-state h3 { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* section subheading (blueprint: New Arrivals, Best Sellers, Instagram) */
.section-head h2 .section-sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--grey-2);
  max-width: 60ch;
}
