/* ==========================================================================
   Components — buttons, links, placeholders, product cards, forms
   ========================================================================== */

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0 2rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--t-med) var(--ease-out);
}
/* Fill wipes upward on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--t-med) var(--ease-out);
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: scaleY(1); }

.btn--outline { background: transparent; color: var(--ink); }
.btn--outline::before { background: var(--ink); }
.btn--outline:hover { color: var(--paper); }

.is-dark .btn { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.is-dark .btn::before { background: var(--ink); }
.is-dark .btn:hover { color: var(--paper); }

/* ---------- Text link with growing underline ---------- */

.link-line {
  display: inline-block;
  padding-bottom: 0.35rem;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1;
  background:
    linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size var(--t-med) var(--ease-out);
}
.link-line:hover { background-size: 35% 1px; }

/* ---------- Image placeholder ----------
   Neutral stand-in for final photography. Replace the inner content with
   <img> (or a WordPress featured image) without changing the frame. */

.ph {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--tint);
  color: var(--ink-50);
}
.ph--dark {
  background:
    radial-gradient(120% 80% at 70% 30%, var(--glow), transparent 60%),
    var(--ink);
  color: var(--paper-70);
}
.ph__icon {
  width: clamp(64px, 22%, 120px);
  height: auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 0.9;
  transition: transform var(--t-slow) var(--ease-out);
}
.ph__note {
  position: absolute;
  left: var(--s-2);
  bottom: var(--s-2);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ---------- Section heading ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.section-head .label { margin-bottom: var(--s-3); }

/* ---------- Product card ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5) clamp(0.75rem, 1.6vw, 1.5rem);
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.product-card { display: flex; flex-direction: column; }

.product-card__media {
  aspect-ratio: 4 / 5;
  margin-bottom: var(--s-3);
}
.product-card__media .ph { width: 100%; height: 100%; }

/* Hover: icon eases forward, quick-view label slides up */
.product-card__quick {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.95rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-align: center;
  transform: translateY(101%);
  transition: transform var(--t-med) var(--ease-out);
}
.product-card:hover .product-card__quick,
.product-card:focus-within .product-card__quick { transform: none; }
.product-card:hover .ph__icon { transform: scale(1.08); }

.product-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-2);
}
.product-card__name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.2rem);
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.product-card__name span {
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size var(--t-med) var(--ease-out);
}
.product-card:hover .product-card__name span { background-size: 100% 1px; }
.product-card__price {
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.product-card__cat {
  margin-top: 0.35rem;
  color: var(--ink-50);
  font-size: var(--fs-micro);
}

@media (hover: none) {
  .product-card__quick { display: none; }
}

/* ---------- Forms (visual only at this stage) ---------- */

.field { position: relative; display: block; }
.field + .field { margin-top: var(--s-4); }

.field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-70);
}
.field__input {
  width: 100%;
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: var(--fs-lead);
  font-weight: 300;
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field__input:focus { border-bottom-color: var(--ink); }
textarea.field__input { min-height: 140px; resize: vertical; line-height: 1.6; }

.is-dark .field__input { border-bottom-color: var(--paper-line); }
.is-dark .field__input:focus { border-bottom-color: var(--paper); }
.is-dark .field__input::placeholder { color: var(--paper-70); }

.form-note {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--ink-50);
}
.is-dark .form-note { color: var(--paper-70); }
.form-note[data-state="shown"] { color: var(--ink); }
.is-dark .form-note[data-state="shown"] { color: var(--paper); }

/* ---------- Filter bar (shop) ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-2);
  margin-bottom: var(--s-5);
  border-block: 1px solid var(--line);
}
.filter-bar__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem clamp(1rem, 2vw, 2rem);
}
.chip {
  position: relative;
  padding-block: 0.5rem;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--ink-50);
  transition: color var(--t-fast) var(--ease);
}
.chip:hover,
.chip[aria-pressed="true"] { color: var(--ink); }
.chip[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.2rem;
  height: 1px;
  background: currentColor;
}
@media (max-width: 600px) {
  /* Keep categories on one line; swipe sideways if needed */
  .filter-bar__cats {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filter-bar__cats::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
.filter-bar__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--ink-50);
}
.select {
  padding: 0.4rem 1.4rem 0.4rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  /* chevron drawn in currentColor so it works on black and white pages */
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) right 0.3rem center / 5px 5px no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) right 0 center / 5px 5px no-repeat;
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

/* ---------- Brand seal (rotating text ring) ---------- */

.seal { width: clamp(110px, 12vw, 150px); aspect-ratio: 1; }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal__ring { transform-origin: 50% 50%; animation: seal-spin 40s linear infinite; }
.seal text { font-family: var(--font-body); font-size: 7.4px; letter-spacing: 0.36em; text-transform: uppercase; fill: currentColor; }
.seal__mono { font-family: var(--font-display) !important; font-size: 22px !important; letter-spacing: 0 !important; }
@keyframes seal-spin { to { transform: rotate(360deg); } }
