/* ==========================================================================
   Design system
   Editorial luxury. Instrument Serif headings, Plus Jakarta Sans body, warm
   off-white canvas, near-black text, one oxblood accent. Slow, quiet motion.
   Mobile first: base styles are for phones, min-width queries add space.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens (the only place colors are defined)
   -------------------------------------------------------------------------- */
:root {
  --bg: #FAF7F2;
  --bg-alt: #F2EDE4;
  --text: #151515;
  --text-muted: #5E5A55;
  --accent: #6B1F2A;
  --accent-hover: #521720;
  --border: #D9D2C6;
  --white: #FFFFFF;
  /* Near-black at partial strength: backdrops behind drawers and search, and the hero text scrim. */
  --scrim: rgba(21, 21, 21, 0.4);
  --scrim-strong: rgba(21, 21, 21, 0.55);

  --font-heading: "Instrument Serif", "Times New Roman", Times, serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;

  --container: 1400px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 2rem + 7vw, 9rem);
  --header-h: 64px;
  --announce-h: 44px;

  /* Pages with a sticky bottom bar (product page on mobile) raise this so the WhatsApp button clears it. */
  --sticky-bar-offset: 0px;
}

@media (min-width: 900px) {
  :root {
    --header-h: 76px;
  }
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

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

p {
  max-width: 65ch;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
.display {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}

h1,
.display--xl {
  font-size: clamp(2.75rem, 1.5rem + 5.4vw, 5.75rem);
  line-height: 1;
}

h2,
.display--lg {
  font-size: clamp(2.125rem, 1.5rem + 3vw, 3.75rem);
}

h3,
.display--md {
  font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem);
  line-height: 1.12;
}

h4,
.display--sm {
  font-size: 1.375rem;
  line-height: 1.2;
}

h1 em,
h2 em,
h3 em,
.display em {
  font-style: italic;
}

.label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.text-muted {
  color: var(--text-muted);
}

.measure {
  max-width: 65ch;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background: var(--bg-alt);
}

.section--flush-top {
  padding-top: 0;
}

.section__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 1rem + 3vw, 4rem);
}

@media (min-width: 900px) {
  .section__head {
    grid-template-columns: 6fr 4fr;
    align-items: end;
    gap: 3rem;
  }
}

/* Asymmetric split. 60 / 40 on desktop, stacked on phones. */
.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 6fr 4fr;
    gap: clamp(2.5rem, 5vw, 6rem);
    align-items: center;
  }

  .split--reverse {
    grid-template-columns: 4fr 6fr;
  }

  .split--reverse > .split__media {
    order: 2;
  }

  .split--end {
    align-items: end;
  }

  /* A 4:5 photo at 60% width can outgrow the screen, so cap it. The photo crops with object-fit. */
  .split > .media--portrait {
    width: 100%;
    max-height: min(80vh, 760px);
  }
}

.split__body {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.hairline {
  border: 0;
  border-top: 1px solid var(--border);
}

/* Media blocks: fixed aspect ratio so nothing shifts while images load. */
.media {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}

.media--portrait {
  aspect-ratio: 4 / 5;
}

.media--landscape {
  aspect-ratio: 3 / 2;
}

.media--wide {
  aspect-ratio: 16 / 9;
}

.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Neutral stand-in until real photography exists. Remove before launch. */
.section--alt .media--placeholder {
  background: var(--border);
}

/* Grids */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 0.75rem;
}

@media (min-width: 768px) {
  .product-grid {
    gap: 2.5rem 1.25rem;
  }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3rem 1.5rem;
  }
}

/* Phones: a swipeable row with the next tile peeking in. Tablet and up: three columns. */
.category-grid {
  display: flex;
  gap: 1rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.category-grid::-webkit-scrollbar {
  display: none;
}

.category-grid > li {
  flex: 0 0 78%;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .category-grid {
    display: grid;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2.5rem);
    align-items: start;
  }

  /* Offset the middle tile so the row does not read as a uniform strip. */
  .category-grid > :nth-child(2) {
    margin-top: clamp(2rem, 6vw, 6rem);
  }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 48px;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 300ms var(--ease),
    border-color 300ms var(--ease),
    color 300ms var(--ease),
    transform 150ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--secondary {
  border-color: var(--text);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--text);
  color: var(--bg);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  /* The underline is a 1px background so it can sweep across on hover. */
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 100% 1px no-repeat;
  transition: color 300ms var(--ease);
}

.text-link:hover {
  color: var(--accent);
  animation: underline-sweep 700ms var(--ease);
}

@keyframes underline-sweep {
  0% { background-position: 100% calc(100% - 10px); background-size: 100% 1px; }
  45% { background-position: 100% calc(100% - 10px); background-size: 0 1px; }
  46% { background-position: 0 calc(100% - 10px); background-size: 0 1px; }
  100% { background-position: 0 calc(100% - 10px); background-size: 100% 1px; }
}

/* --------------------------------------------------------------------------
   6. Forms
   -------------------------------------------------------------------------- */
.form {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field__label {
  font-size: 0.875rem;
  font-weight: 500;
}

.field__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 1rem;
  transition: border-color 200ms var(--ease);
}

.field__textarea {
  min-height: 7rem;
  resize: vertical;
}

.field__input:hover,
.field__select:hover,
.field__textarea:hover {
  border-color: var(--text);
}

.field__input:focus-visible,
.field__select:focus-visible,
.field__textarea:focus-visible {
  border-color: var(--text);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.field__error,
.field-validation-error {
  font-size: 0.875rem;
  color: var(--accent);
}

.field--error .field__input,
.field--error .field__select,
.field--error .field__textarea,
.input-validation-error {
  border-color: var(--accent);
}

/* Size selector: square buttons, filled when selected. */
.size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  padding: 0;
  border: 0;
}

.size-selector__option {
  position: relative;
}

.size-selector__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.size-selector__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 0.875rem;
  border: 1px solid var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 250ms var(--ease),
    border-color 250ms var(--ease),
    color 250ms var(--ease);
}

.size-selector__label:hover {
  border-color: var(--text);
}

.size-selector__input:checked + .size-selector__label {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.size-selector__input:focus-visible + .size-selector__label {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.size-selector__input:disabled + .size-selector__label {
  border-color: var(--border);
  color: var(--text-muted);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   7. Small components: price, tag, notice, breadcrumbs
   -------------------------------------------------------------------------- */
.price {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.price__was {
  color: var(--text-muted);
  font-weight: 400;
  text-decoration: line-through;
}

.price__now--sale {
  color: var(--accent);
}

/* Rectangular label, never a pill. */
.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--text);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag--muted {
  border-color: var(--border);
  color: var(--text-muted);
}

.notice {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.75rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   8. Product card
   -------------------------------------------------------------------------- */
.product-card {
  display: block;
}

.product-card__link {
  display: grid;
  gap: 0.75rem;
  text-decoration: none;
}

.product-card__media > .product-card__img {
  transition:
    opacity 500ms var(--ease),
    transform 900ms var(--ease);
}

.product-card__img--secondary {
  opacity: 0;
}

.product-card__body {
  display: grid;
  gap: 0.25rem;
}

.product-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .product-card__name {
    font-size: 1.625rem;
  }
}

/* Hover: the second photo (another angle) fades in. Cards with only one photo zoom in slowly instead. */
@media (hover: hover) {
  .product-card:hover .product-card__media:not(:has(.product-card__img--secondary)) > .product-card__img,
  .product-card:focus-within .product-card__media:not(:has(.product-card__img--secondary)) > .product-card__img {
    transform: scale(1.05);
  }

  .product-card:hover .product-card__img--secondary,
  .product-card:focus-within .product-card__img--secondary {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   9. Announcement bar, site header, drawers and search
   -------------------------------------------------------------------------- */

/* Announcement bar: one message at a time, soft fade, with arrows and a pause button. */
.announcement {
  background: var(--text);
  color: var(--bg);
}

.announcement__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--announce-h);
}

.announcement__list {
  display: grid;
  flex: 0 1 36rem;
  min-width: 0;
  text-align: center;
}

.announcement__item {
  grid-area: 1 / 1;
  align-self: center;
  padding-block: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  /* The outgoing message fades out while the next fades in, in the same spot. */
  transition:
    opacity 600ms var(--ease),
    visibility 0s linear 600ms;
}

.announcement__item.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

@media (min-width: 900px) {
  .announcement__item {
    font-size: 0.75rem;
  }
}

/* Site header: Menu left, wordmark centred, account, search and cart right. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition:
    background-color 350ms var(--ease),
    border-color 350ms var(--ease);
}

/* Home: transparent over the hero photo until the page scrolls (JS adds .is-solid). */
.site-header--overlay:not(.is-solid):not(.is-search-open) {
  background: transparent;
  border-bottom-color: transparent;
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
}

.site-header__start {
  display: flex;
  align-items: center;
  justify-self: start;
}

.site-header__brand {
  justify-self: center;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-self: end;
}

/* Small phones have room for two icons; the account link lives in the menu there.
   Scoped to the actions group so it outranks the general .icon-btn display rule. */
.site-header__actions .site-header__account {
  display: none;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 250ms var(--ease);
}

.menu-button:hover {
  color: var(--accent);
}

.menu-button__label {
  display: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: color 250ms var(--ease);
}

.icon-btn:hover {
  color: var(--accent);
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--small {
  width: 16px;
  height: 16px;
}

@media (min-width: 600px) {
  .site-header__actions .site-header__account {
    display: inline-grid;
  }

  .menu-button__label {
    display: inline;
  }
}

@media (min-width: 900px) {
  .wordmark {
    font-size: 2.125rem;
  }
}

/* Shared backdrop behind drawers and the search bar. */
.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--scrim);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 400ms var(--ease),
    visibility 0s linear 400ms;
}

.page-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Under the header for search, so the search bar stays bright. */
.page-backdrop--under-header {
  z-index: 39;
}

/* Side drawers: menu from the left, cart from the right. */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  visibility: hidden;
  transition:
    transform 450ms var(--ease),
    visibility 0s linear 450ms;
}

.drawer--left {
  left: 0;
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
}

.drawer--right {
  right: 0;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
}

/* Visibility switches on instantly (no transition) so focus can move into the drawer straight away. */
.drawer.is-open {
  visibility: visible;
  transform: none;
  transition: transform 450ms var(--ease);
}

.drawer__top {
  display: flex;
  flex: none;
  align-items: center;
  min-height: var(--header-h);
  padding-inline: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer__top--title {
  justify-content: space-between;
  padding-left: 1.5rem;
}

.drawer__title {
  font-size: 1.75rem;
}

.drawer__body {
  display: grid;
  align-content: start;
  gap: 2rem;
  padding: 1rem 1.5rem 2.5rem;
  transition: opacity 250ms var(--ease);
}

.drawer__body.is-loading {
  opacity: 0.5;
}

@media (min-width: 600px) {
  .drawer__body {
    padding-inline: 2rem;
  }
}

.drawer-nav li {
  border-bottom: 1px solid var(--border);
}

.drawer-nav__link {
  display: flex;
  align-items: center;
  min-height: 64px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 250ms var(--ease);
}

.drawer-nav__link:hover,
.drawer-nav__link[aria-current="page"] {
  color: var(--accent);
}

.drawer-links {
  display: grid;
}

.drawer-links__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 250ms var(--ease);
}

.drawer-links__link:hover,
.drawer-links__link[aria-current="page"] {
  color: var(--text);
}

html.is-drawer-open {
  overflow: hidden;
}

/* Search bar that slides down from under the navbar. */
.search-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition:
    clip-path 450ms var(--ease),
    visibility 0s linear 450ms;
}

.search-panel.is-open {
  clip-path: inset(0);
  visibility: visible;
  transition: clip-path 450ms var(--ease);
}

.search-panel__form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 76px;
}

.search-panel__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  font-size: 1.0625rem;
}

.search-panel__input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-panel__input:focus-visible {
  outline-offset: 4px;
}

/* Mini cart inside the right drawer. */
.mini-cart {
  display: grid;
  gap: 1.5rem;
}

.mini-cart--empty {
  justify-items: start;
  padding-top: 1rem;
}

.mini-cart__line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}

.mini-cart__text {
  display: grid;
  gap: 0.25rem;
}

.mini-cart__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-decoration: none;
}

.mini-cart__detail {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.mini-cart__total {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.mini-cart__foot {
  display: grid;
  gap: 0.875rem;
}

.mini-cart__subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.mini-cart__subtotal dd {
  margin: 0;
}

/* --------------------------------------------------------------------------
   10. Site footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  padding-top: clamp(3rem, 2rem + 4vw, 6rem);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}

.site-footer__brand {
  grid-column: 1 / -1;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.site-footer__wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
}

.site-footer__heading {
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.65;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.site-footer__link:hover {
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 3rem;
  padding-block: 1.5rem 5.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }

  .site-footer__brand {
    grid-column: auto;
    padding-right: 2rem;
  }

  .site-footer__bottom {
    padding-bottom: 2rem;
  }
}

/* --------------------------------------------------------------------------
   11. Floating WhatsApp button
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + var(--sticky-bar-offset));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: background-color 300ms var(--ease), transform 150ms var(--ease);
}

.whatsapp-float:hover {
  background: var(--accent);
}

.whatsapp-float:active {
  transform: scale(0.98);
}

@media (min-width: 900px) {
  .whatsapp-float {
    right: 2rem;
    bottom: 2rem;
  }
}

/* --------------------------------------------------------------------------
   12. Page building blocks
   -------------------------------------------------------------------------- */
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.section--compact {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

/* A line or two of text under a section heading, written in the admin. */
.section__intro {
  max-width: 65ch;
  margin-top: 1rem;
  color: var(--text-muted);
}

.section--listing {
  padding-top: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.section__aside {
  justify-self: start;
}

@media (min-width: 900px) {
  .section__aside {
    justify-self: end;
  }
}

.listing-head {
  display: grid;
  gap: 0.75rem;
  margin-block: 1.5rem 2rem;
}

@media (min-width: 900px) {
  .listing-head {
    grid-template-columns: 6fr 4fr;
    align-items: end;
    gap: 3rem;
    margin-block: 2rem 3rem;
  }
}

.status-message {
  padding-top: 1rem;
}

.empty-state {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  padding-block: 2rem 4rem;
}

/* Reset for buttons that should look like a text link. */
button.text-link {
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

/* Full-bleed hero: photo fills the first screen, one centred headline and button near the bottom.
   A dark scrim behind the text keeps it readable on any photo. */
.hero-full {
  position: relative;
  display: grid;
  align-items: end;
  height: calc(100svh - var(--announce-h));
  min-height: 34rem;
  max-height: 64rem;
  overflow: hidden;
  background: var(--bg-alt);
  color: var(--white);
}

/* The navbar sits on top of the photo. */
.has-overlay-header .hero-full {
  margin-top: calc(var(--header-h) * -1);
}

.hero-full__slides,
.hero-full__slide,
.hero-full__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Slides are stacked; the active one fades in over the others. */
.hero-full__slide {
  opacity: 0;
  transition: opacity 1000ms var(--ease);
}

.hero-full__slide.is-active {
  opacity: 1;
}

/* The photos are landscape. On a tall phone screen the crop is centred on the model, who stands right of centre. */
.hero-full__img {
  object-fit: cover;
  object-position: 56% 30%;
}

.hero-full::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Held at full strength through the text area so pale outfits (sage, ivory) stay readable. */
  background: linear-gradient(to top, var(--scrim-strong) 0%, var(--scrim-strong) 22%, transparent 65%);
  pointer-events: none;
}

.hero-full__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
  text-align: center;
}

.hero-full__title {
  max-width: 16ch;
  color: var(--white);
  font-size: clamp(2.5rem, 1.5rem + 3.8vw, 4.75rem);
  line-height: 1.02;
}

/* Without a photo there is nothing to darken, so the text goes back to near-black. */
.hero-full--no-image::after {
  display: none;
}

.hero-full--no-image .hero-full__title {
  color: var(--text);
}

@media (min-width: 900px) {
  /* A wide screen shows nearly the whole photo; keep the face comfortably inside it. */
  .hero-full__img {
    object-position: center 25%;
  }
}

/* Category tiles */
.category-tile {
  display: grid;
  gap: 0.75rem;
  text-decoration: none;
}

.category-tile .media > img {
  transition:
    opacity 700ms var(--ease),
    transform 900ms var(--ease);
}

.category-tile__name {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.category-tile__text {
  max-width: 40ch;
  color: var(--text-muted);
}

@media (hover: hover) {
  .category-tile:hover .media > img,
  .category-tile:focus-visible .media > img {
    transform: scale(1.05);
  }
}

/* Product card flags (Sale, Sold out) sit on the image. */
.product-card__flag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  background: var(--bg);
}

/* Cart count on the header bag */
.cart-link {
  position: relative;
}

.cart-link__count {
  position: absolute;
  top: 3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
}

/* Quiet entrance after something was just added. A single scale-in, never a bounce or loop. */
.cart-link__count--fresh {
  animation: badge-in 450ms var(--ease);
}

@keyframes badge-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   13. Listing: category tabs, filters, pagination, search
   -------------------------------------------------------------------------- */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.category-tabs__link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: -1px;
  border-bottom: 1px solid transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 300ms var(--ease), color 300ms var(--ease);
}

.category-tabs__link:hover {
  border-color: var(--text);
}

.category-tabs__link[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
}

.listing-bar {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.listing-bar__count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.filters {
  border-block: 1px solid var(--border);
}

.filters__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.filters__toggle::-webkit-details-marker {
  display: none;
}

.filters__toggle::after {
  content: "+";
  margin-left: auto;
  font-size: 1.25rem;
  font-weight: 400;
}

.filters[open] > .filters__toggle::after {
  content: "\2212";
}

.filters__count {
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: none;
}

.filters__form {
  display: grid;
  gap: 1.75rem;
  padding-block: 0.5rem 1.75rem;
}

@media (min-width: 900px) {
  .filters__form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 2rem;
  }

  .filters__actions {
    grid-column: 1 / -1;
  }
}

.filters__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.filters__legend {
  margin-bottom: 0.75rem;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.filters__price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.filters__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.check-list {
  display: grid;
}

.check-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
}

.check-list__input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--text);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pagination__status {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.search-form {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.search-form__row {
  display: flex;
  gap: 0.5rem;
}

.search-form__row .field__input {
  flex: 1;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   14. Product page
   -------------------------------------------------------------------------- */
.product {
  display: grid;
  gap: 2rem;
  margin-top: 1rem;
}

/* Phones: a swipeable strip that runs edge to edge. Desktop: photos stacked in a column. */
.gallery {
  position: relative;
  min-width: 0;
}

.gallery__track {
  display: flex;
  margin-inline: calc(var(--gutter) * -1);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.gallery__counter {
  position: absolute;
  right: 0;
  bottom: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg);
  font-size: 0.8125rem;
  font-weight: 500;
}

.product__info {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.product__category {
  text-decoration: none;
}

.product__title {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
}

.product__price {
  font-size: 1.125rem;
}

.product__form {
  display: grid;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.product__sizes {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.product__sizes .filters__legend {
  margin-bottom: 0;
}

.product__size-guide {
  justify-self: start;
}

.product__quantity {
  max-width: 8rem;
}

@media (min-width: 900px) {
  .product {
    grid-template-columns: 7fr 5fr;
    gap: clamp(2.5rem, 5vw, 6rem);
    align-items: start;
  }

  .gallery__track {
    display: grid;
    gap: 1rem;
    margin-inline: 0;
    overflow: visible;
  }

  .gallery__counter {
    display: none;
  }

  .product__info {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.accordion {
  border-top: 1px solid var(--border);
}

.accordion__item {
  border-bottom: 1px solid var(--border);
}

.accordion__summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.accordion__summary::-webkit-details-marker {
  display: none;
}

.accordion__summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.25rem;
  font-weight: 400;
}

.accordion__item[open] > .accordion__summary::after {
  content: "\2212";
}

.accordion__body {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  color: var(--text-muted);
}

/* Sticky price and Add to cart on phones. Hidden on desktop where the form stays in view. */
.sticky-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.sticky-bar__text {
  display: grid;
  min-width: 0;
}

.sticky-bar__name {
  overflow: hidden;
  font-size: 0.875rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.sticky-bar__price {
  font-weight: 600;
}

.has-sticky-bar {
  --sticky-bar-offset: 76px;
  padding-bottom: 76px;
}

@media (min-width: 900px) {
  .sticky-bar {
    display: none;
  }

  .has-sticky-bar {
    --sticky-bar-offset: 0px;
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   15. Cart, checkout and confirmation
   -------------------------------------------------------------------------- */
.checkout-layout {
  display: grid;
  gap: 2.5rem;
}

.checkout-layout__aside {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  align-content: start;
}

.checkout-layout__aside > .btn--block {
  justify-self: stretch;
}

@media (min-width: 900px) {
  .checkout-layout {
    grid-template-columns: 7fr 4fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }

  .checkout-layout__aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.cart-lines {
  border-top: 1px solid var(--border);
}

.cart-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cart-line__media {
  grid-row: span 2;
}

.cart-line__body {
  display: grid;
  gap: 0.25rem;
  align-content: start;
}

.cart-line__name {
  font-size: 1.375rem;
  line-height: 1.15;
}

.cart-line__name a {
  text-decoration: none;
}

.cart-line__detail,
.cart-line__price {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cart-line__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.75rem;
}

.cart-line__qty {
  display: flex;
  gap: 0.5rem;
}

.cart-line__qty .field__input {
  width: 4.5rem;
}

.cart-line__total {
  grid-column: 2;
  font-weight: 600;
}

@media (min-width: 768px) {
  .cart-line {
    grid-template-columns: 120px minmax(0, 1fr) auto;
  }

  .cart-line__media {
    grid-row: auto;
  }

  .cart-line__total {
    grid-column: auto;
  }
}

.order-summary {
  display: grid;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.order-summary__title {
  font-size: 1.75rem;
}

.order-summary__lines {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.order-summary__line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
}

.order-summary__name {
  display: block;
}

.order-summary__detail {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.order-summary__totals {
  display: grid;
  gap: 0.5rem;
}

.order-summary__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.order-summary__totals dd {
  margin: 0;
}

.order-summary__total {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

.order-summary__payment {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.checkout-form__consent a {
  color: var(--text);
}

.error-summary {
  padding: 1.25rem;
  border: 1px solid var(--accent);
  background: var(--white);
}

.error-summary:focus-visible {
  outline-offset: 4px;
}

.error-summary__title {
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.error-summary__list {
  display: grid;
  gap: 0.25rem;
}

.error-summary__list a {
  color: var(--accent);
}

.confirmation {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.confirmation__details {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  padding-block: 1.25rem;
  border-block: 1px solid var(--border);
}

.confirmation__details > div {
  display: grid;
  gap: 0.125rem;
}

@media (min-width: 600px) {
  .confirmation__details > div {
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
  }
}

.confirmation__details dt {
  color: var(--text-muted);
}

.confirmation__details dd {
  margin: 0;
}

/* Sign in, sign up and account: one quiet centred column. */
.auth {
  padding-block: clamp(3rem, 2rem + 5vw, 7rem);
}

.auth__panel {
  display: grid;
  gap: 1.5rem;
  max-width: 28rem;
  margin-inline: auto;
}

.auth__title {
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  text-align: center;
}

.auth__lead {
  margin-top: -0.75rem;
  margin-inline: auto;
  color: var(--text-muted);
  text-align: center;
}

.auth__switch {
  margin-inline: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  width: 100%;
  text-align: center;
}

.auth__actions {
  display: grid;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   16. Interaction details
   -------------------------------------------------------------------------- */

/* Smooth open and close for accordions and the filter panel, where the browser supports it.
   Browsers without ::details-content ignore these rules and open instantly. */
:root {
  interpolate-size: allow-keywords;
}

.accordion__item::details-content,
.filters::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 450ms var(--ease), content-visibility 450ms allow-discrete;
}

.accordion__item[open]::details-content,
.filters[open]::details-content {
  block-size: auto;
}

/* Busy state while a form is being sent. Also stops a second tap placing a second order. */
.btn[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
  pointer-events: none;
}

/* Images fade in once loaded instead of popping in over the placeholder colour. */
.media > img {
  transition: opacity 700ms var(--ease);
}

.media > img.is-loading {
  opacity: 0;
}

/* Desktop product photos: hover to magnify the fabric, following the pointer. */
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .gallery .media {
    cursor: zoom-in;
  }

  .gallery .media > img {
    transition: transform 400ms var(--ease), opacity 700ms var(--ease);
  }

  .gallery .media.is-zoomed > img {
    transform: scale(1.8);
  }
}

/* One-off status message slides in softly. */
.status-message .notice {
  animation: notice-in 500ms var(--ease);
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Soft cross-fade between pages in browsers that support cross-document view transitions. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 280ms;
  animation-timing-function: var(--ease);
}

/* --------------------------------------------------------------------------
   17. Reveal motion (JS adds .is-visible via IntersectionObserver)
   Only hidden when scripting is available, so content never depends on JS.
   -------------------------------------------------------------------------- */
@media (scripting: enabled) {
  /* Safety net: if the script never runs (blocked, failed to load), everything appears after 2.5s.
     reveal.js adds .motion-ready to <html> once it is watching, which switches the fallback off. */
  [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 800ms var(--ease),
      transform 800ms var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
    animation: reveal-fallback 1ms linear 2500ms forwards;
  }

  .motion-ready [data-reveal] {
    animation: none;
  }

  [data-reveal="image"] {
    transform: none;
    clip-path: inset(0 0 8% 0);
    transition:
      opacity 1100ms var(--ease),
      clip-path 1100ms var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }

  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    clip-path: inset(0);
  }
}

@keyframes reveal-fallback {
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Transitions off entirely (not shortened): a shortened transition on every element makes inherited
     properties like visibility lag a frame, which stops focus moving into drawers and search. */
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal],
  .product-card:hover {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
