/* ============================================================
   Components — buttons, header, footer, cards, forms, badges.
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .78em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-300);
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary { --btn-bg: var(--coral); --btn-fg: var(--accent-ink); }
.btn--primary:hover { --btn-bg: var(--coral-deep); box-shadow: var(--shadow-coral); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { --btn-bg: var(--surface); border-color: var(--ink); }

.btn--light { --btn-bg: var(--surface); --btn-fg: var(--ink); box-shadow: var(--shadow-sm); }

.btn--wa { --btn-bg: #25D366; --btn-fg: #06301A; }
.btn--wa:hover { --btn-bg: #1FBE5B; }

.btn--lg { padding: .95em 1.9em; font-size: var(--fs-400); }
.btn--sm { padding: .55em 1.1em; font-size: var(--fs-200); }
.btn--block { display: flex; width: 100%; }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* A plain text link with an animated arrow. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-300);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.link-arrow::after {
  content: "→";
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow:hover { color: var(--coral-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header.is-menu-open { z-index: 150; background: var(--paper); }

.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

/* Logo lockup: the real logo mark + the wordmark set in type.
   The mark alone is used because the artwork's own wordmark runs vertically
   and would be unreadable at header size. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand__mark {
  width: 42px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
  /* The source JPEG has an opaque #F7F7F7 background — lighter and cooler than
     the warm --paper, so it reads as a grey plate behind the mark. `darken`
     takes the per-channel minimum: background pixels collapse to exactly the
     page colour, while the coral and mauve artwork is already darker and comes
     through untouched. (`multiply` would darken the whole tile instead.) */
  mix-blend-mode: darken;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1;
}
.brand__name em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 86%, transparent 86%);
}

.site-nav {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: var(--sp-1);
}
@media (min-width: 1000px) { .site-nav { display: flex; } }

.site-nav a {
  padding: .5rem .8rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-300);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.site-nav a:hover { background: var(--mauve-tint); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}
@media (min-width: 1000px) { .header__actions { margin-left: var(--sp-3); } }
.header__actions .btn--ghost { display: none; }
@media (min-width: 640px) { .header__actions .btn--ghost { display: inline-flex; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  cursor: pointer;
}
@media (min-width: 1000px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 20px; height: 20px; }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: var(--mobile-nav-top, var(--header-h)) 0 auto;
  height: calc(100vh - var(--mobile-nav-top, var(--header-h)));
  height: calc(100dvh - var(--mobile-nav-top, var(--header-h)));
  z-index: 140;
  background: var(--paper);
  padding: var(--sp-5) var(--gutter) var(--sp-8);
  padding-bottom: calc(var(--sp-8) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.mobile-nav.is-open { opacity: 1; transform: none; visibility: visible; }
.mobile-nav a:not(.btn) {
  display: block;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-decoration: none;
}
.mobile-nav .btn { margin-top: var(--sp-5); }
@media (min-width: 1000px) { .mobile-nav { display: none; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-dark);
  color: #CFC7C4;
  padding-block: var(--sp-8) var(--sp-6);
  margin-top: var(--sp-9);
}
.site-footer a { color: #E8E2E0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer__grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.1fr; } }

.footer__logo {
  width: 132px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-sm);
}
.footer__brandline { max-width: 34ch; font-size: var(--fs-300); color: #A79E9B; }

.footer h4 {
  margin-bottom: var(--sp-3);
  font-family: var(--font-text);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: #8E8582;
}
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: var(--sp-2); font-size: var(--fs-300); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid #3A3434;
  font-size: var(--fs-300);
  color: #8E8582;
}

/* Colour dots lifted straight from the logo's accents. */
.brand-dots { display: inline-flex; gap: 6px; }
.brand-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.brand-dots i:nth-child(1) { background: var(--coral); }
.brand-dots i:nth-child(2) { background: var(--yellow); }
.brand-dots i:nth-child(3) { background: var(--lilac); }
.brand-dots i:nth-child(4) { background: var(--green); }

/* ---------- Product card ---------- */
.card-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px)  { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); } }
@media (min-width: 1040px) { .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--paper-3);
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
  transition: transform var(--dur-slow) var(--ease-out);
}
.product-card:hover .product-card__media img { transform: scale(1.045); }

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-2);
  padding: var(--sp-4);
}
.product-card__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.product-card__tagline {
  font-size: var(--fs-300);
  color: var(--ink-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
}
.price {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
}
.price small {
  font-family: var(--font-text);
  font-size: var(--fs-200);
  font-weight: 500;
  color: var(--ink-3);
  margin-right: .25em;
}

/* ---------- Badges & tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .28em .7em;
  border-radius: var(--r-pill);
  background: var(--mauve-tint);
  color: var(--ink-2);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: .02em;
}
.badge--coral  { background: var(--coral-tint);  color: var(--coral-deep); }
.badge--yellow { background: #FBF9DE;            color: var(--yellow-deep); }
.badge--lilac  { background: #F5EAF8;            color: var(--lilac-deep); }
.badge--green  { background: #EDF6E3;            color: var(--green-deep); }

.badge--float {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* ---------- Category / collection tile ---------- */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--tone-tint, var(--mauve-tint));
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* The blurred disc echoes the logo's circle without repeating the logo. */
.tile::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  right: -18%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tone, var(--mauve));
  opacity: .55;
  transition: transform var(--dur-slow) var(--ease-out);
}
.tile:hover::before { transform: scale(1.12) translate(-4%, 4%); }

.tile__name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.tile__desc {
  margin-top: var(--sp-2);
  font-size: var(--fs-300);
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile__count {
  margin-top: var(--sp-3);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tile--sm { min-height: 128px; padding: var(--sp-4); }
.tile--sm .tile__name { font-size: 1.0625rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--sp-4); }
.field label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-300);
  font-weight: 600;
}
.field .hint { font-size: var(--fs-200); color: var(--ink-3); font-weight: 400; }

.input, .textarea, .select {
  width: 100%;
  padding: .78em 1em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-400);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-tint);
}
.textarea { min-height: 130px; resize: vertical; }
.select { appearance: none; background-image: none; cursor: pointer; }

.field-row { display: grid; gap: var(--sp-4); }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.form-note {
  margin-top: var(--sp-3);
  font-size: var(--fs-300);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
}
.form-note--ok  { background: #EDF6E3; color: var(--green-deep); }
.form-note--err { background: var(--coral-tint); color: var(--coral-deep); }

/* ---------- Chips (filters, suggestions) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  padding: .45em 1em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-300);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Misc ---------- */
.divider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block: var(--sp-6);
}
.divider-dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }

.rule-note {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-300);
  color: var(--ink-3);
}

.empty-state {
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--ink-3);
}

/* Skeleton shimmer while the catalog loads. */
.skeleton {
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 37%, var(--paper-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite linear;
  min-height: 280px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
