:root {
  /* Color palette */
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6b6b66;
  --rule: #e8e6e0;
  --accent: #c2553a;
  --accent-soft: #f3e6e1;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 4px 12px rgba(17, 17, 17, 0.04);

  /* Layout */
  --max: 1200px;
  --radius: 4px;

  /* Spacing scale — rem-based, doubling roughly */
  --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 */

  /* Touch target minimums — Apple HIG / Material */
  --touch-min: 44px;

  /* Breakpoint reference (documentation only — media queries use raw values).
     --bp-sm: 480px   phone large
     --bp-md: 760px   tablet / sidebar split point
     --bp-lg: 1024px  laptop
     --bp-xl: 1440px  desktop */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

/* ---------- LAYOUT ---------- */

.site-header,
main,
.site-footer { max-width: var(--max); margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }

main { padding-top: 3rem; padding-bottom: 4rem; }

/* ---------- HEADER ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 0.25rem; }

/* Nav layout: brand on the far left, then a single right-aligned flex row
   containing the primary group (Shop/About/Commissions), a visual divider,
   and the utility group (search/cart/account). */
.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
  font-size: 0.93rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-primary,
.nav-utility {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-primary { gap: 1.75rem; }
.nav-utility {
  gap: 1.25rem;
  /* Subtle vertical divider between the two groups */
  padding-left: 1.5rem;
  border-left: 1px solid var(--rule);
}
@media (max-width: 899px) {
  /* On narrow screens the divider line looks lonely when groups wrap. */
  .nav-utility { padding-left: 0; border-left: 0; }
}

.site-nav li { display: flex; align-items: center; }
.site-nav a, .nav-account > summary {
  color: var(--ink);
  padding: 0.45rem 0;
  text-decoration: none;
}
.site-nav a:hover, .nav-account > summary:hover { color: var(--accent); }

/* Search */
.nav-search-item .search { display: flex; margin: 0; }
.nav-search-item input[type=search] {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: var(--radius);
  font: inherit;
  width: 9rem;
  outline: none;
  transition: border-color 0.15s, width 0.2s;
}
.nav-search-item input[type=search]:focus { border-color: var(--ink); width: 14rem; }

/* Sign-in pill */
.nav-signin {
  padding: 0.45rem 1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-signin:hover { background: var(--ink); color: var(--bg); }

/* Account dropdown (CSS-only via <details>) */
.nav-account-wrap { position: relative; }
.nav-account > summary {
  list-style: none;
  user-select: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-account > summary::-webkit-details-marker { display: none; }
.nav-caret { font-size: 0.7em; transition: transform 0.15s; }
.nav-account[open] > summary { color: var(--accent); }
.nav-account[open] .nav-caret { transform: rotate(180deg); }

.nav-account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 13rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem 0;
  z-index: 80;
}
.nav-account-menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}
.nav-account-menu a:hover { background: var(--accent-soft); color: var(--ink); }
.nav-account-menu hr {
  border: 0; border-top: 1px solid var(--rule);
  margin: 0.35rem 0;
}
.nav-account-name {
  padding: 0.5rem 1rem 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ---------- MOBILE NAV: hamburger + slide-in drawer (CSS-only, 150ms) ---------- */

.nav-toggle, .nav-toggle-label, .nav-backdrop { display: none; }

@media (max-width: 699px) {
  .site-header {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 1rem;
    flex-wrap: nowrap;
  }
  /* Hide the absolute-positioned checkbox visually but keep it tabbable */
  .nav-toggle {
    position: absolute; opacity: 0; pointer-events: none;
    width: 0; height: 0; margin: 0; padding: 0;
  }
  /* Hamburger button — a 44x44 tap area with a 3-bar icon */
  .nav-toggle-label {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--touch-min); height: var(--touch-min);
    cursor: pointer;
    color: var(--ink);
    border-radius: var(--radius);
    transition: background 0.15s;
  }
  .nav-toggle-label:hover { background: var(--accent-soft); }
  .nav-toggle:focus-visible + .nav-toggle-label {
    outline: 2px solid var(--ink); outline-offset: 2px;
  }
  .hamburger,
  .hamburger::before,
  .hamburger::after {
    content: ""; display: block;
    width: 22px; height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.15s, opacity 0.15s;
  }
  .hamburger { position: relative; }
  .hamburger::before { position: absolute; top: -7px; left: 0; }
  .hamburger::after  { position: absolute; top:  7px; left: 0; }
  /* Morph hamburger -> X when drawer is open */
  .nav-toggle:checked + .nav-toggle-label .hamburger { background: transparent; }
  .nav-toggle:checked + .nav-toggle-label .hamburger::before {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked + .nav-toggle-label .hamburger::after {
    transform: translateY(-7px) rotate(-45deg);
  }
  /* Drawer panel slides in from the right */
  .site-nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(80vw, 320px);
    background: var(--surface);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
    padding: 4rem 1.5rem 2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 1.05rem;
    z-index: 50;
    transform: translateX(100%);
    transition: transform 150ms ease-out;
    overflow-y: auto;
    justify-content: flex-start;
  }
  .nav-toggle:checked ~ .site-nav { transform: translateX(0); }
  .nav-primary, .nav-utility {
    flex-direction: column; align-items: stretch; gap: 0;
    width: 100%; border-left: 0; padding-left: 0;
  }
  .nav-utility { margin-top: 1rem; border-top: 1px solid var(--rule); }
  .site-nav li { display: block; }
  .site-nav a, .nav-account > summary {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--rule);
    width: 100%;
  }
  .nav-search-item .search { width: 100%; margin: 0.75rem 0; }
  .nav-search-item input[type=search] { width: 100%; }
  .nav-search-item input[type=search]:focus { width: 100%; }
  /* Account dropdown turns into an inline expandable section */
  .nav-account-menu {
    position: static;
    box-shadow: none;
    border: 0;
    background: var(--accent-soft);
    border-radius: var(--radius);
    margin: 0.25rem 0 0.75rem;
  }
  .nav-signin { display: inline-flex; margin-top: 1rem; align-self: flex-start; }
  /* Translucent backdrop behind the drawer; click to close. */
  .nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease-out;
    z-index: 40;
  }
  .nav-toggle:checked ~ .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  /* Prevent body scroll while drawer is open */
  body:has(.nav-toggle:checked) { overflow: hidden; }
}

/* ---------- FLASHES ---------- */

.flashes { list-style: none; margin-bottom: 1.5rem; }
.flash {
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
}
.flash-error { border-left-color: var(--accent); }
.flash-info { border-left-color: var(--ink); }

/* ---------- TYPOGRAPHY (fluid via clamp) ---------- */

h1, h2, h3 { letter-spacing: -0.015em; font-weight: 600; }
/* h1 scales from ~1.6rem on a 320px phone to ~2.5rem on a 1440px desktop. */
h1 { font-size: clamp(1.6rem, 2.8vw + 0.9rem, 2.5rem); line-height: 1.15; }
h2 { font-size: clamp(1rem, 0.6vw + 0.9rem, 1.15rem); }

p { color: inherit; }

/* ---------- GALLERY (catalog list/category/search) ---------- */

.gallery-intro { margin-bottom: 3rem; max-width: 36rem; }
.gallery-intro h1 { margin-bottom: 0.5rem; font-size: clamp(1.7rem, 3vw + 0.9rem, 2.4rem); }
.gallery-intro p { color: var(--muted); font-size: 1.05rem; }
.gallery-intro .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.75rem; }

.gallery {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem 2rem;
}

.gallery-item a { display: block; }
.gallery-item .thumb,
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, transform 0.2s;
}
.gallery-item a:hover .thumb,
.gallery-item a:hover img { border-color: var(--ink); transform: translateY(-2px); }

.thumb-placeholder {
  font-size: 4rem;
  font-weight: 200;
  color: var(--accent);
  opacity: 0.5;
  letter-spacing: -0.04em;
}

.gallery-item h2 { margin: 1rem 0 0.25rem; font-weight: 500; font-size: 1rem; }
.gallery-item .price { color: var(--accent); font-size: 0.95rem; font-weight: 500; }
.gallery-item .category { font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.08em; }

.empty-state { color: var(--muted); padding: 3rem 0; text-align: center; }

/* ---------- PRODUCT DETAIL ---------- */

.work {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 760px) { .work { grid-template-columns: 1fr; } }

.work .thumb,
.work img {
  aspect-ratio: 4 / 5;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
}
/* On phones, cap the image height so title + Add to cart stay above the fold. */
@media (max-width: 600px) {
  .work .thumb,
  .work img,
  .work picture { max-height: 70vh; aspect-ratio: auto; height: auto; }
  .work img { object-fit: contain; }
}

.work-meta .category { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.work-meta h1 { font-size: clamp(1.5rem, 2.5vw + 0.7rem, 2.2rem); margin-bottom: 0.5rem; }
.work-meta .price { font-size: 1.4rem; color: var(--accent); font-weight: 500; margin-bottom: 1.5rem; }
.work-meta p.description { color: var(--ink); margin-bottom: 2rem; line-height: 1.7; }

/* ---------- FORMS / BUTTONS ---------- */

form label { display: block; margin: 1rem 0; font-size: 0.95rem; }
form label span.field-label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }

form input[type=text], form input[type=email], form input[type=password],
form input[type=number], form textarea, form select {
  display: block;
  width: 100%;
  max-width: 28rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: var(--radius);
  font: inherit;
  outline: none;
  transition: border-color 0.15s;
}
form input:focus, form textarea:focus, form select:focus { border-color: var(--ink); }

form button, button[type=submit] {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
form button:hover, button[type=submit]:hover { background: var(--accent); }

.form-row { display: flex; gap: 0.5rem; align-items: center; }
.form-row button { background: transparent; color: var(--muted); padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.form-row button:hover { background: transparent; color: var(--accent); }

/* ---------- AUTH (OAuth login) ---------- */

.auth-card {
  max-width: 26rem;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.auth-card p { color: var(--muted); margin-bottom: 2rem; }
.auth-providers { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.auth-providers a {
  display: block;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.auth-providers a:hover { background: var(--ink); color: var(--bg); }

/* ---------- TABLES (cart, orders, admin) ---------- */

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.8rem 0.6rem; text-align: left; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
th { font-weight: 500; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
tfoot td { font-weight: 600; border-bottom: 0; padding-top: 1rem; }

/* ---------- BACKBONE GENERIC LISTS ---------- */

ul.products, ul.orders, ul.addresses, ul.wishlist {
  list-style: none;
}
ul.products li, ul.orders li, ul.addresses li, ul.wishlist li {
  padding: 1rem 0; border-bottom: 1px solid var(--rule);
}

/* ---------- BADGES ---------- */

.badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.72rem;
  border: 1px solid var(--rule);
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.badge-paid { border-color: #2c7a4b; color: #2c7a4b; }
.badge-pending { border-color: #b8860b; color: #b8860b; }
.badge-cancelled { border-color: var(--accent); color: var(--accent); }

/* ---------- FOOTER ---------- */

.site-footer {
  margin-top: 6rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

form.inline { display: inline; }

/* ---------- CART ---------- */

.cart-intro { margin-bottom: 2.5rem; }
.cart-intro .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.cart-intro h1 { font-size: 2.2rem; }

.empty-cart { padding: 4rem 0; text-align: center; color: var(--muted); }
.empty-cart p { margin: 0.5rem 0; }
.link-cta { color: var(--accent); font-weight: 500; }
.link-cta:hover { text-decoration: underline; }

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

.cart-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 560px) {
  /* Phone layout: thumb top-left, meta beside, qty + subtotal + remove
     wrap to a second row spanning both columns. */
  .cart-line {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem 1rem;
    padding: 1.25rem 0;
  }
  .cart-thumb { width: 72px; }
  .cart-meta { min-width: 0; }
  .cart-meta h2 { font-size: 1rem; }
  .cart-meta .unit { font-size: 0.85rem; }
  /* The end column slides under both top cells and breathes. */
  .cart-line-end {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--rule);
  }
  .cart-line-end .subtotal { font-size: 1.05rem; }
  /* Qty controls already render inside .cart-meta — keep them tappable. */
  .qty-controls { margin-top: 0.4rem; }
}

.cart-thumb {
  display: block;
  width: 96px;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-thumb .thumb-placeholder { font-size: 2.2rem; }

.cart-meta .category { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.cart-meta h2 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.25rem; }
.cart-meta h2 a { color: var(--ink); }
.cart-meta h2 a:hover { color: var(--accent); }
.cart-meta .unit { font-size: 0.9rem; color: var(--muted); }

.cart-line-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cart-line-end .subtotal { font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.cart-line-end form.secondary button { padding: 0.35rem 0.8rem; font-size: 0.85rem; }

.cart-summary { margin-top: 2.5rem; max-width: 26rem; margin-left: auto; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); margin-bottom: 1.5rem; }
.cart-total span { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.cart-total strong { font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.cart-checkout button { width: 100%; padding: 1rem 1.5rem; font-size: 1rem; }
.cart-fineprint { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 1rem; }

.cart-continue { text-align: center; margin-bottom: 0.75rem; font-size: 0.9rem; }
.cart-continue a { color: var(--muted); }
.cart-continue a:hover { color: var(--accent); }

.qty-controls { display: inline-flex; align-items: center; gap: 0; margin-top: 0.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.qty-form { display: inline-flex; margin: 0; }
.qty-form button {
  width: 2rem; height: 2rem; padding: 0;
  background: transparent; color: var(--ink); font-size: 1.1rem; font-weight: 600;
  border: 0; border-radius: 0;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.qty-form button:hover { background: var(--accent-soft); color: var(--accent); }
.qty-value { min-width: 2rem; text-align: center; font-variant-numeric: tabular-nums; font-size: 0.95rem; padding: 0 0.25rem; user-select: none; }

/* ---------- PRICE FILTER ---------- */

.price-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.price-range { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.price-input { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.9rem; color: var(--muted); }
.price-input span { white-space: nowrap; }
.price-input input {
  width: 5.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.price-range button {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.price-range button:hover { background: var(--accent); }

.price-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.price-chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 99px;
  color: var(--muted);
  background: var(--bg);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.price-chip:hover { border-color: var(--ink); color: var(--ink); }
.price-chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.price-chip.is-active:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.price-clear { font-size: 0.85rem; color: var(--accent); padding: 0.35rem 0.5rem; }
.price-clear:hover { text-decoration: underline; }

/* ---------- GALLERY LAYOUT (sidebar + main) ---------- */

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
@media (min-width: 760px) {
  .gallery-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
}
.gallery-side { min-width: 0; }

/* Filter drawer — collapses behind a <summary> tap on mobile,
   becomes always-open on tablet+ where the sidebar has room. */
.filters-drawer { display: contents; }
.filters-drawer-summary {
  display: none;
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.06em;
  user-select: none;
  margin-bottom: 1rem;
}
.filters-drawer-summary::-webkit-details-marker { display: none; }
.filters-drawer-summary::after {
  content: "▾";
  float: right;
  transition: transform 150ms ease-out;
  color: var(--muted);
}
.filters-drawer[open] > .filters-drawer-summary::after { transform: rotate(180deg); }

@media (max-width: 759px) {
  /* On mobile the <details> behavior actually controls visibility.
     Default closed; user taps to expand. */
  .filters-drawer { display: block; }
  .filters-drawer-summary { display: block; }
  .filters-drawer:not([open]) > .filters-bar { display: none; }
  .filters-bar { position: static; }
}
.gallery-main { min-width: 0; }

/* ---------- FILTERS SIDEBAR (price + rating + sort) ---------- */

.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  position: sticky;
  top: 1rem;
  /* Independent scroll: pin to viewport top, cap height, scroll internally
     when contents exceed available space. Without this, a tall filter list
     scrolls with the page like everything else. */
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
/* WebKit-specific scrollbar styling to match the rest of the site. */
.filters-bar::-webkit-scrollbar { width: 6px; }
.filters-bar::-webkit-scrollbar-track { background: transparent; }
.filters-bar::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 3px;
}
.filters-bar::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Each section is a vertical block with its label on top. */
.filter-row, .sort-row {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 0.5rem; margin: 0;
}
.filter-label, .sort-label {
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  display: block; margin-bottom: 0.25rem;
}

.filter-row .price-input { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.filter-row .price-input input { width: 100%; max-width: none; }
.filter-row > button, .sort-row > button {
  padding: 0.5rem 1rem; font-size: 0.85rem;
  background: var(--ink); color: var(--bg); border: 0;
  border-radius: var(--radius); cursor: pointer;
  align-self: flex-start;
}
.filter-row > button:hover, .sort-row > button:hover { background: var(--accent); }

.sort-row select {
  width: 100%;
  padding: 0.5rem 0.75rem; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg); font: inherit; cursor: pointer;
}

/* Price presets stack vertically as full-width chips below the inputs. */
.price-presets {
  display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem;
}
.price-presets .price-chip {
  display: block; text-align: center;
  padding: 0.4rem 0.65rem;
}

/* Rating chips stack too. */
.rating-presets {
  display: flex; flex-direction: column; align-items: stretch;
  flex-wrap: nowrap; gap: 0.35rem;
}
.rating-presets > .filter-label { margin-bottom: 0.25rem; }
.rating-presets .rating-chip {
  justify-content: flex-start;
  width: 100%;
}

/* Mobile: collapse sticky behavior so it sits inline at the top. */
@media (max-width: 759px) {
  .filters-bar { position: static; }
}

.rating-chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.3rem 0.65rem; font-size: 0.78rem;
  border: 1px solid var(--rule); border-radius: 99px;
  color: var(--muted); background: var(--bg);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.rating-chip .chip-stars { display: inline-flex; gap: 0.05em; line-height: 1; }
.rating-chip .star { color: var(--rule); font-size: 1em; }
.rating-chip .star.filled { color: #d6a02c; }
.rating-chip:hover { border-color: var(--ink); color: var(--ink); }
.rating-chip:hover .star { color: var(--rule); }
.rating-chip:hover .star.filled { color: #d6a02c; }
.rating-chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rating-chip.is-active .star { color: rgba(255, 255, 255, 0.25); }
.rating-chip.is-active .star.filled { color: #f3c349; }
.rating-chip .chip-text { margin-left: 0.1em; }

.filters-clear { font-size: 0.85rem; color: var(--accent); padding: 0.35rem 0.5rem; }
.filters-clear:hover { text-decoration: underline; }

/* ---------- STARS ---------- */

.stars { display: inline-flex; gap: 0.05em; line-height: 1; vertical-align: middle; }
.stars .star { color: var(--rule); font-size: 0.95em; }
.stars .star.filled { color: #d6a02c; }
.stars-large .star { font-size: 1.15rem; }
.rating-count { font-size: 0.78rem; color: var(--muted); margin-left: 0.4em; }
.rating-count.rating-none { font-style: italic; }
.rating-summary { font-size: 0.92rem; color: var(--muted); margin-left: 0.5em; }
.rating-summary-line { display: flex; align-items: center; gap: 0.4em; margin: -1rem 0 1.2rem; }

.gallery-item .rating-inline { margin: 0.2rem 0; font-size: 0.82rem; }

/* ---------- REVIEWS ---------- */

.reviews { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.reviews-heading { font-size: 1.6rem; margin-bottom: 1.5rem; }

.review-form {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.review-form-heading { font-size: 1rem; font-weight: 500; margin: 0; }
.review-form button[type=submit] { align-self: flex-start; padding: 0.6rem 1.2rem; }
.review-body-label { margin: 0; }
.review-body-label textarea { width: 100%; max-width: none; font-family: inherit; }

/* Reversed-radio star picker: hover/check fills current + earlier siblings via CSS-only flip. */
.rating-input {
  display: inline-flex; flex-direction: row-reverse; justify-content: flex-end;
  border: 0; padding: 0; margin: 0; gap: 0.1em;
}
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label {
  cursor: pointer; font-size: 1.6rem; color: var(--rule); line-height: 1;
  padding: 0.2rem; user-select: none;
}
.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: #d6a02c; }
.rating-input input:focus-visible ~ label:first-of-type { outline: 2px solid var(--ink); outline-offset: 2px; }

.review-signin { color: var(--muted); margin-bottom: 2rem; }
.review-signin a { color: var(--accent); }
.review-signin a:hover { text-decoration: underline; }

.reviews-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.review-card { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.review-head { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; flex-wrap: wrap; }
.review-author { color: var(--ink); font-weight: 500; }
.review-date { font-variant-numeric: tabular-nums; }
.review-body { color: var(--ink); line-height: 1.6; margin: 0; }

/* ---------- CHECKOUT ---------- */

.checkout-card,
.thanks-card {
  max-width: 36rem;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.checkout-card .crumb,
.thanks-card .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.checkout-card h1,
.thanks-card h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
.checkout-card .lede,
.thanks-card .lede { color: var(--muted); margin-bottom: 1.75rem; }

.checkout-lines { list-style: none; margin: 0 0 1rem; }
.checkout-lines li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.checkout-lines .li-qty { color: var(--muted); }
.checkout-lines .li-amount { font-weight: 500; text-align: right; min-width: 5rem; }

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1.75rem;
}
.checkout-total span { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.checkout-total strong { font-size: 1.5rem; font-weight: 600; }

.checkout-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.checkout-actions form button { width: 100%; padding: 0.9rem 1.5rem; font-size: 1rem; }

.checkout-note {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- THANK YOU ---------- */

.thanks-card { text-align: left; }
.order-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.order-meta div { display: flex; flex-direction: column; gap: 0.25rem; }
.order-meta dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.order-meta dd { font-size: 0.95rem; font-weight: 500; }
.order-meta code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95rem; }

.order-items-heading { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; font-weight: 500; }

.thanks-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

/* ---------- ACCOUNT ---------- */

.account-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 760px) {
  .account-shell { grid-template-columns: 1fr; gap: 1.5rem; }
}

.account-side .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.account-side h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.25rem; }
.account-side .account-email { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; word-break: break-all; }

.account-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.account-nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.95rem;
  border-left: 2px solid transparent;
}
.account-nav a:hover { background: var(--accent-soft); color: var(--ink); }
.account-nav a[aria-current="page"] {
  background: var(--surface);
  border-left-color: var(--accent);
  font-weight: 500;
}
.account-nav a.signout { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--rule); color: var(--muted); border-radius: 0; }
.account-nav a.signout:hover { background: transparent; color: var(--accent); }

.account-main .section-h { font-size: 1.4rem; font-weight: 600; margin-bottom: 1.25rem; }
.account-main code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95em; }

.profile-dl { display: grid; gap: 1rem; max-width: 28rem; }
.profile-dl div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.profile-dl dt { color: var(--muted); font-size: 0.85rem; }
.profile-dl dd { font-size: 0.95rem; }
.account-cta { margin-top: 2rem; }

.order-list { list-style: none; border-top: 1px solid var(--rule); }
.order-list li { border-bottom: 1px solid var(--rule); }
.order-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 0;
  color: var(--ink);
}
.order-list a:hover { color: var(--ink); }
.order-list a:hover .order-id code { color: var(--accent); }
.order-list .order-id { color: var(--muted); font-size: 0.9rem; }
.order-list .order-date { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.order-list .order-total { font-weight: 500; font-variant-numeric: tabular-nums; min-width: 5rem; text-align: right; }

.back-link { margin-bottom: 0.75rem; font-size: 0.9rem; }
.back-link a { color: var(--muted); }
.back-link a:hover { color: var(--accent); }

.account-main .order-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.account-main .order-meta div { display: flex; flex-direction: column; gap: 0.25rem; }
.account-main .order-meta dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.account-main .order-meta dd { font-size: 0.95rem; font-weight: 500; }

.address-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.address-list li {
  position: relative;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.address-list address { font-style: normal; line-height: 1.5; font-size: 0.93rem; }
.address-list address strong { display: block; margin-bottom: 0.25rem; }
.address-list form.secondary { margin-top: 0.75rem; }
.address-list form.secondary button { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.add-address { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); max-width: 28rem; }

/* ---------- WISHLIST ---------- */

.wishlist-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.wishlist-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.wishlist-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.wishlist-thumb img { width: 100%; height: 100%; object-fit: contain; }
.wishlist-thumb .thumb-placeholder { font-size: 3rem; }

.wishlist-meta .category { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.wishlist-meta h2 { font-size: 1rem; font-weight: 500; margin-bottom: 0.25rem; }
.wishlist-meta h2 a { color: var(--ink); }
.wishlist-meta h2 a:hover { color: var(--accent); }
.wishlist-meta .price { color: var(--accent); font-weight: 500; font-size: 0.95rem; }

.wishlist-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.wishlist-actions form { flex: 1; min-width: 0; }
.wishlist-actions button { width: 100%; padding: 0.5rem 0.75rem; font-size: 0.85rem; }
.wishlist-actions form.secondary button { padding: 0.5rem 0.75rem; }

/* ---------- STUDIO (admin) ---------- */

.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.studio-header .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.studio-header h1 { font-size: 2rem; margin-bottom: 0.75rem; }

.studio-tabs { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.studio-tabs a { color: var(--muted); border-bottom: 2px solid transparent; padding-bottom: 0.25rem; }
.studio-tabs a:hover { color: var(--accent); }
.studio-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }

.btn-primary, .btn-secondary, .btn-danger {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--bg); }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

.btn-danger { background: transparent; color: var(--accent); border-color: var(--rule); }
.btn-danger:hover { border-color: var(--accent); background: var(--accent); color: var(--bg); }

.studio-list { list-style: none; border-top: 1px solid var(--rule); }

.studio-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 640px) {
  .studio-row { grid-template-columns: 60px 1fr; }
  .studio-price { grid-column: 2 / -1; text-align: left; }
  .studio-actions { grid-column: 1 / -1; justify-self: end; }
}

.studio-thumb {
  width: 72px;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-thumb img { width: 100%; height: 100%; object-fit: contain; }
.studio-thumb .thumb-placeholder { font-size: 2rem; }

.studio-meta .category { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.studio-meta h2 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.25rem; }
.studio-meta .studio-id { font-size: 0.8rem; color: var(--muted); }
.studio-meta .studio-id code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.studio-price { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 5rem; text-align: right; }

.studio-actions { display: flex; gap: 0.5rem; }
.studio-actions form.inline { display: inline; }

/* studio form */

.studio-form {
  max-width: 36rem;
  margin: 0 auto;
}
.studio-form .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.studio-form h1 { font-size: 1.8rem; margin-bottom: 2rem; }

.studio-form form { display: flex; flex-direction: column; gap: 0; }
.studio-form label { margin: 0.75rem 0; max-width: none; }
.studio-form input, .studio-form textarea { max-width: none; }

.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin: 0; }
.form-grid label { margin: 0.75rem 0 0; }

.field-hint { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }

.image-preview {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.image-preview .field-label { display: block; margin-bottom: 0.5rem; }
.image-preview img { max-width: 100%; max-height: 320px; border: 1px solid var(--rule); border-radius: var(--radius); }

.studio-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.studio-form-actions button { padding: 0.8rem 1.6rem; font-size: 0.95rem; }
.studio-form-actions a { color: var(--muted); font-size: 0.9rem; }
.studio-form-actions a:hover { color: var(--accent); }

form.secondary { margin-top: 0.75rem; }
form.secondary button { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
form.secondary button:hover { background: var(--ink); color: var(--bg); }

/* ---------- ABOUT ---------- */

.about {
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.75;
  color: var(--ink);
}
.about h1 {
  font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.about h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 600;
}
.about p { margin-bottom: 1.25rem; }
.about p.lede { font-size: 1.05rem; color: var(--ink); margin: 0; }
.about a { color: var(--accent); }
.about a:hover { text-decoration: underline; }

.about-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 560px) {
  .about-header { grid-template-columns: 140px minmax(0, 1fr); gap: 2rem; }
}
.about-portrait {
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: var(--shadow);
}
.about-portrait img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.about-portrait-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.5rem; font-weight: 300;
  color: var(--accent); opacity: 0.7;
  letter-spacing: -0.04em;
}
.about-intro .crumb {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 0.4rem;
}

.about-section { margin-bottom: 2.5rem; }
.about-section:last-child { margin-bottom: 0; }

.about-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.about-list li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.about-list-year {
  color: var(--muted); font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.about-list-body em { font-style: italic; color: var(--ink); }
.about-edit-note {
  font-size: 0.78rem; color: var(--muted); font-style: italic;
  margin-top: 0.5rem;
}
.about-edit-note code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--accent-soft); padding: 0.1em 0.4em;
  border-radius: 0.2em;
}

.about-contact {
  padding: 1.5rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin-top: 3rem;
}
.about-contact h2 { margin-bottom: 0.75rem; }
.about-contact p { margin-bottom: 0.5rem; }
.about-contact p:last-child { margin-bottom: 0; }

/* ---------- SOLD-OUT STATE (catalog + detail + studio) ---------- */

/* Wrap around .gallery-item thumb so we can absolute-position the badge */
.gallery-item .thumb-wrap { position: relative; }

.sold-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.is-sold .gallery-item h2,
.is-sold h2,
.is-sold .price { color: var(--muted); }
.is-sold img,
.is-sold picture img { filter: saturate(0.55); opacity: 0.85; }

.work-sold {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.work-sold-label {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.work-sold-note {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.stock-low {
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.studio-row .sold-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1em 0.55em;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  vertical-align: middle;
}

/* ---------- DETAIL: ADDITIONAL IMAGES GALLERY ---------- */

.work-gallery {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.work-gallery a {
  flex: 0 0 auto;
  width: 96px;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.15s, transform 0.2s;
}
.work-gallery a:hover { border-color: var(--ink); transform: translateY(-2px); }
.work-gallery a img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- STUDIO: IMAGE UPLOAD FORM ---------- */

.upload-form {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.upload-form label { display: block; }
.upload-form input[type="file"] {
  display: block;
  margin-top: 0.5rem;
  font: inherit;
}
.upload-form .studio-form-actions {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}
.upload-form button { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

/* ---------- STUDIO: STATS DASHBOARD ---------- */

.stats-page .crumb { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.stats-page h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.stats-page .back-link { margin-bottom: 2rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stats-section-h {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.status-list, .top-products {
  list-style: none;
  border-top: 1px solid var(--rule);
  max-width: 36rem;
}
.status-list li, .top-products li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.status-name { text-transform: capitalize; }
.status-count, .top-units {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.top-title { font-weight: 500; }

.stats-empty { color: var(--muted); font-style: italic; }

/* ---------- CART: PROMO + SUMMARY LINES ---------- */

.cart-promo {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1.5rem 0 1rem 0;
  flex-wrap: wrap;
}
.cart-promo label {
  font-size: 0.85rem;
  color: var(--muted);
}
.cart-promo input[type="text"] {
  font: inherit;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  letter-spacing: 0.04em;
}
.cart-promo button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
}

.cart-subtotal,
.cart-discount,
.cart-shipping {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cart-discount {
  color: var(--accent);
}

/* ---------- CATALOG: EDITION LINE ---------- */

.edition-line {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

/* ---------- ORDER: DISCOUNT/SHIPPING LINES ---------- */

.order-discount-line,
.order-shipping-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.order-discount-line { color: var(--accent); }

/* ---------- COA badge + About this image ---------- */

.coa-badge {
  display: inline-flex; align-items: baseline; gap: 0.5em;
  margin: 0.5rem 0 0.75rem;
  padding: 0.25rem 0.7rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.8rem;
}
.coa-badge .coa-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.coa-badge code { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); font-weight: 500; }

.about-image {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  max-width: 42rem;
}
.about-image-heading { font-size: 1.4rem; margin-bottom: 1rem; }
.about-image-body { line-height: 1.7; color: var(--ink); white-space: pre-wrap; }

/* ---------- DELIVERY (cart) ---------- */

.cart-delivery { margin: 1rem 0; }
.cart-delivery fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--surface); }
.cart-delivery legend { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 0 0.5rem; }
.cart-delivery label { margin: 0.5rem 0; }
.cart-delivery input[type=text] { max-width: 10rem; font-variant-numeric: tabular-nums; }
.cart-delivery button { padding: 0.45rem 1rem; font-size: 0.88rem; margin-top: 0.5rem; }

.delivery-tiers { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.75rem 0; }
.delivery-tier {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.delivery-tier:hover { border-color: var(--ink); }
.delivery-tier input[type=radio] { width: auto; margin: 0; accent-color: var(--ink); }
.delivery-tier:has(input:checked) { border-color: var(--ink); background: var(--accent-soft); }
.delivery-tier .tier-label { font-weight: 600; color: var(--ink); }
.delivery-tier .tier-eta { font-size: 0.82rem; color: var(--muted); grid-column: 2 / 3; }
.delivery-tier .tier-rate { font-variant-numeric: tabular-nums; font-weight: 500; }
.delivery-tier .tier-rate-empty { font-size: 0.78rem; color: var(--muted); font-style: italic; }

.cart-shipping-eta { font-size: 0.78rem; color: var(--muted); text-align: right; margin: -0.25rem 0 0.5rem; }

/* ---------- COA on line items ---------- */

.li-main { display: contents; }
.li-coa { font-size: 0.78rem; color: var(--muted); margin: 0.2rem 0 0; grid-column: 1 / -1; }
.li-coa code { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
.order-shipping-eta { font-size: 0.85rem; color: var(--muted); }

/* ---------- PHASE 4: TOUCH TARGETS (pointer:coarse only — keeps desktop dense) ---------- */

@media (pointer: coarse) {
  /* All form buttons reach the 44px minimum. */
  form button, button[type=submit],
  .btn-primary, .btn-secondary, .btn-danger {
    min-height: var(--touch-min);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
  /* Text/number/email/password/search inputs and selects. */
  form input[type=text], form input[type=email], form input[type=password],
  form input[type=number], form input[type=url], form input[type=search],
  form select, .site-nav input[type=search], .price-input input {
    min-height: var(--touch-min);
  }
  textarea { min-height: 6rem; }
  /* Quantity +/- buttons — bump from 32 to 44. */
  .qty-form button { width: var(--touch-min); height: var(--touch-min); font-size: 1.25rem; }
  .qty-value { min-width: var(--touch-min); }
  /* Star rating picker — each star gets ≥ 44 hit area. */
  .rating-input label { padding: 0.6rem 0.35rem; font-size: 1.8rem; }
  /* Tier radio rows — already have padding; just make sure they hit 44. */
  .delivery-tier { min-height: var(--touch-min); }
  /* Filter chips / rating chips — give them taller hit area on touch. */
  .price-chip, .rating-chip { min-height: var(--touch-min); padding-top: 0.6rem; padding-bottom: 0.6rem; }
  /* Nav links (mobile drawer already has 0.75rem padding — good). */
  .site-nav a { min-height: var(--touch-min); display: flex; align-items: center; }
}

/* ---------- PHASE 5: TABLE → CARD on phones ---------- */

@media (max-width: 699px) {
  /* Generic: turn any data table into stacked cards. Use this on .data-table
     OR on the standard <table> when wrapped in a known section. */
  .account-main table,
  section table {
    display: block;
    border: 0;
  }
  .account-main table thead,
  section table thead {
    /* Hide the header row visually but keep it for screen readers via aria-label
       on each <td> (or rely on visible text). */
    position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
  }
  .account-main table tbody,
  section table tbody { display: block; }
  .account-main table tr,
  section table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .account-main table tr:last-child,
  section table tr:last-child { border-bottom: 0; }
  .account-main table td,
  section table td {
    border: 0; padding: 0;
    font-size: 0.95rem;
  }
  /* Studio products list — already a custom layout (.studio-row), but the table
     in backbone admin/list uses raw tr/td. The default rule above handles it. */
}

/* ---------- HOMEPAGE ---------- */

/* HERO: text + featured artwork side-by-side on desktop, stacked on mobile. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
  align-items: center;
}
@media (min-width: 760px) {
  .home-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; }
}

.home-hero-crumb {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}
.home-hero-title {
  font-size: clamp(2rem, 4vw + 1rem, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.home-hero-lede {
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
  color: var(--muted);
  max-width: 32rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}
.home-hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.home-hero-cta .btn-primary,
.home-hero-cta .btn-secondary {
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
}

.home-hero-art {
  display: block;
  position: relative;
  transition: transform 0.25s;
}
.home-hero-art:hover { transform: translateY(-2px); }
.home-hero-art img,
.home-hero-art .thumb {
  aspect-ratio: 4 / 5;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: var(--shadow);
}
.home-hero-art-caption {
  display: block;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* SECTION SHARED */
.home-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.home-section-head h2 { font-size: 1.5rem; }
.home-featured, .home-categories, .home-about { margin-bottom: 4rem; }

/* FEATURED grid (tighter than catalog) */
.home-featured-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem 1.5rem;
}
.home-featured-card a { display: block; color: var(--ink); }
.home-featured-card .home-featured-thumb {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, transform 0.2s;
}
.home-featured-card .home-featured-thumb img,
.home-featured-card .home-featured-thumb picture { width: 100%; height: 100%; object-fit: contain; }
.home-featured-card a:hover .home-featured-thumb { border-color: var(--ink); transform: translateY(-2px); }
.home-featured-card h3 { margin: 0.75rem 0 0.2rem; font-weight: 500; font-size: 1rem; }
.home-featured-card .price { color: var(--accent); font-size: 0.95rem; font-weight: 500; }
.home-featured-card .category {
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.15rem;
}

/* CATEGORIES tiles */
.home-categories h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.home-category-tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.home-category-tiles a {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.2s;
  color: var(--ink);
}
.home-category-tiles a:hover {
  border-color: var(--ink); transform: translateY(-2px); color: var(--ink);
}
.home-category-tiles .tile-label { font-size: 1.1rem; font-weight: 600; }
.home-category-tiles .tile-meta { font-size: 0.85rem; color: var(--muted); }

/* ABOUT tile */
.home-about {
  padding: 2rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  max-width: 42rem;
}
.home-about h2 { margin-bottom: 0.75rem; font-size: 1.4rem; }
.home-about p { line-height: 1.7; margin-bottom: 1rem; }

/* ---------- FOOTER ---------- */

.site-footer {
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
}

/* Three-column top row on desktop; stacks vertically on phones. */
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
  /* Newsletter (capped at its content width) — flexible spacer — Explore — Currency. */
  .footer-top {
    grid-template-columns: minmax(0, 22rem) 1fr auto auto;
    gap: 1.5rem 3rem;
    align-items: start;
  }
  .footer-newsletter { grid-column: 1; }
  .footer-sitemap    { grid-column: 3; }
  .footer-currency   { grid-column: 4; }
}

/* Per-column heading */
.footer-col-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

/* Newsletter column */
.footer-newsletter { margin: 0; }
.footer-newsletter > label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.footer-newsletter .newsletter-row {
  display: flex; gap: 0.5rem; align-items: stretch;
  max-width: 22rem;
}
.footer-newsletter input[type=email] {
  flex: 1; min-width: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
}
.footer-newsletter button {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  background: var(--ink); color: var(--bg); border: 0;
  border-radius: var(--radius); cursor: pointer;
}
.footer-newsletter button:hover { background: var(--accent); }
.footer-newsletter .newsletter-fineprint {
  font-size: 0.72rem; color: var(--muted);
  margin: 0.5rem 0 0; line-height: 1.5;
  max-width: 22rem;
}

/* Sitemap column */
.footer-sitemap ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.footer-sitemap a { color: var(--muted); font-size: 0.85rem; }
.footer-sitemap a:hover { color: var(--accent); }

/* Currency column */
.footer-currency { margin: 0; }
.footer-currency > label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.footer-currency .currency-row {
  display: flex; gap: 0.4rem; align-items: stretch;
}
.footer-currency select {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit; cursor: pointer;
}
.footer-currency button {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  background: var(--ink); color: var(--bg); border: 0;
  border-radius: var(--radius); cursor: pointer;
}
.footer-currency button:hover { background: var(--accent); }

/* Bottom row: legal nav + web-id + copyright, single line on desktop. */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--accent); }
.footer-legal span { color: var(--rule); }
.footer-webid { margin: 0; }
.footer-webid code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--ink);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft);
  padding: 0.05em 0.4em;
  border-radius: 0.2em;
}
.footer-copyright { margin: 0; }

/* ---------- POLICIES ---------- */

.policies { max-width: 44rem; margin: 0 auto; }
.policies-header { margin-bottom: 2.5rem; }
.policies-header .crumb {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem;
}
.policies-header h1 { font-size: clamp(2rem, 3vw + 1rem, 2.8rem); margin-bottom: 0.75rem; }
.policies-header .lede { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }

.policies-toc {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 3rem;
}
.policies-toc a {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 99px;
  color: var(--ink);
  background: var(--bg);
}
.policies-toc a:hover { border-color: var(--ink); }

.policy-section { margin-bottom: 3rem; scroll-margin-top: 2rem; }
.policy-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.policy-section h3 {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 1.5rem 0 0.5rem; font-weight: 600;
}
.policy-section p { line-height: 1.7; margin-bottom: 1rem; }
.policy-section ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; line-height: 1.7; }
.policy-section ul li { margin-bottom: 0.25rem; }
.policy-section a { color: var(--accent); }
.policy-section a:hover { text-decoration: underline; }

/* ---------- FREE SHIPPING BAR (cart) ---------- */

.free-shipping-bar {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
}
.free-shipping-progress { background: var(--accent-soft); color: var(--ink); }
.free-shipping-progress strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.free-shipping-applied { background: #e5f3e9; color: #2c7a4b; border: 1px solid #c8e6cf; }
.free-shipping-applied strong { color: #1e5a36; }

/* ---------- NEWSLETTER (footer capture) ---------- */

.newsletter-capture {
  max-width: 28rem; margin: 0 auto 1.5rem;
  text-align: left;
}
.newsletter-capture label {
  display: block; font-size: 0.85rem; color: var(--ink);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.newsletter-row {
  display: flex; gap: 0.5rem; align-items: stretch;
}
.newsletter-row input[type=email] {
  flex: 1; min-width: 0; padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg); font: inherit;
}
.newsletter-row button {
  padding: 0.5rem 1rem; font-size: 0.9rem;
  background: var(--ink); color: var(--bg); border: 0;
  border-radius: var(--radius); cursor: pointer;
}
.newsletter-row button:hover { background: var(--accent); }
.newsletter-fineprint {
  font-size: 0.75rem; color: var(--muted);
  margin-top: 0.5rem; line-height: 1.5;
}

/* studio actions row for newsletter admin */
.studio-actions-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- WAITLIST (detail page when sold out) ---------- */

.waitlist-form {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.waitlist-form label { margin: 0 0 0.5rem; }
.waitlist-form input[type=email] {
  width: 100%; max-width: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule); background: var(--surface);
  border-radius: var(--radius); font: inherit;
}
.waitlist-form button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem; font-size: 0.9rem;
  background: var(--ink); color: var(--bg); border: 0;
  border-radius: var(--radius); cursor: pointer;
}
.waitlist-form button:hover { background: var(--accent); }

/* ---------- VIRTUAL ROOM VIEW (detail page) ---------- */

.room-view {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.room-view-heading { font-size: 1.4rem; margin-bottom: 0.5rem; }
.room-view-note { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

/* The "room" is a CSS-only wall scene by default — drop a real photo at
   static/rooms/default.jpg and the rule below picks it up automatically. */
.room-view-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg, #ede4d3 0%, #ede4d3 65%, #c9b896 65%, #b7a380 100%);
  background-image: url("/static/rooms/default.jpg"), linear-gradient(180deg, #ede4d3 0%, #ede4d3 65%, #c9b896 65%, #b7a380 100%);
  background-size: cover, auto;
  background-position: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
/* Subtle floor shadow at bottom — CSS-only ambience */
.room-view-stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 14%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.25));
  pointer-events: none;
}

/* Centered "framed" artwork at ~30% room width, off-center toward top */
.room-view-frame {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  max-height: 55%;
  padding: 8px;
  background: #1a1a1a;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.room-view-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  background: white;
}

/* ---------- COMMISSIONS ---------- */

.commissions { max-width: 44rem; margin: 0 auto; }
.commissions-header { margin-bottom: 2rem; }
.commissions-header .crumb {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem;
}
.commissions-header h1 { font-size: clamp(2rem, 3vw + 1rem, 2.8rem); margin-bottom: 0.5rem; }
.commissions-header .lede { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }

.commissions-info {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.commissions-info h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.commissions-info h2:not(:first-child) { margin-top: 1.25rem; }
.commissions-info ul { padding-left: 1.25rem; line-height: 1.7; margin-bottom: 0.5rem; }
.commissions-info .commissions-hint { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.commissions-form-wrap { margin-top: 2rem; }
.commissions-form-wrap h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }

.commissions-sent { max-width: none; text-align: left; }

/* ---------- COLLECTION PICKER (admin) ---------- */

.collection-picker { border: 1px solid var(--rule); padding: 1rem 1.25rem; margin: 1rem 0; border-radius: var(--radius); background: var(--surface); }
.collection-picker legend { padding: 0 0.5rem; }
.collection-picker-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; margin: 0.75rem 0 0; }
.collection-picker-list label {
  display: grid; grid-template-columns: auto 40px 1fr auto; gap: 0.5rem;
  align-items: center; margin: 0; padding: 0.4rem 0.5rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg); cursor: pointer;
}
.collection-picker-list label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.collection-picker-list input { width: auto; margin: 0; accent-color: var(--accent); }
.collection-picker-thumb { width: 40px; height: 40px; border-radius: var(--radius); overflow: hidden; background: var(--rule); display: flex; align-items: center; justify-content: center; }
.collection-picker-thumb img { width: 100%; height: 100%; object-fit: cover; }
.collection-picker-thumb .thumb-placeholder { font-size: 1.4rem; }
.collection-picker-title { font-size: 0.9rem; color: var(--ink); }
.collection-picker-price { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- MAKE AN OFFER (detail) ---------- */

.offer-block { margin-top: 1.25rem; }
.offer-block > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-weight: 500; color: var(--ink);
  user-select: none;
}
.offer-block > summary::-webkit-details-marker { display: none; }
.offer-block > summary::after { content: " ▾"; color: var(--muted); }
.offer-block[open] > summary { background: var(--accent-soft); border-color: var(--accent); }
.offer-block[open] > summary::after { content: " ▴"; }

.offer-form { margin-top: 0.75rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.offer-form button { margin-top: 0.5rem; }
.offer-note { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }

/* admin checkbox label */
label.checkbox-label { display: flex; gap: 0.5rem; align-items: flex-start; margin: 1rem 0; }
label.checkbox-label input { margin-top: 0.25rem; width: auto; accent-color: var(--accent); }
label.checkbox-label > span { display: block; }
label.checkbox-label .field-hint { margin-top: 0.25rem; font-size: 0.78rem; color: var(--muted); display: block; }

/* ---------- CURRENCY PICKER (footer) ---------- */

.currency-picker {
  display: flex; gap: 0.5rem; align-items: center; justify-content: center;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.currency-picker label {
  font-size: 0.78rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 600;
}
.currency-picker select {
  padding: 0.4rem 0.6rem; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg); font: inherit; cursor: pointer;
}
.currency-picker button {
  padding: 0.4rem 0.85rem; font-size: 0.85rem;
  background: var(--ink); color: var(--bg); border: 0;
  border-radius: var(--radius); cursor: pointer;
}
.currency-picker button:hover { background: var(--accent); }

/* ---------- CATEGORY CHIPS (filter sidebar) ---------- */

.category-presets {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 0.35rem;
}
.category-presets > .filter-label { margin-bottom: 0.25rem; }
.category-chip {
  display: block; text-align: left;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.category-chip:hover { border-color: var(--ink); color: var(--ink); background: var(--accent-soft); }
.category-chip.is-active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  font-weight: 500;
}
.category-chip.is-active:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* ---------- LEGAL FOOTER ROW + WEB-ID ---------- */

.site-footer-legal {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.78rem;
}
.site-footer-legal a { color: var(--muted); }
.site-footer-legal a:hover { color: var(--accent); }
.site-footer-legal span { color: var(--rule); }

.site-footer-webid {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin: 0.25rem 0;
  letter-spacing: 0.02em;
}
.site-footer-webid code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--ink);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft);
  padding: 0.1em 0.5em;
  border-radius: 0.2em;
  margin-left: 0.25em;
}

/* ---------- CART: shipping-address picker + inline add form ---------- */

.cart-address {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.cart-address-h {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  margin: 0 0 0.5rem;
}
.cart-address-current { margin: 0 0 0.35rem; font-size: 0.95rem; line-height: 1.5; }
.cart-address-current strong { color: var(--ink); }
.cart-address-meta { margin: 0; font-size: 0.85rem; }
.cart-address-meta a { color: var(--accent); }
.cart-address-meta a:hover { text-decoration: underline; }
.cart-address-empty { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9rem; }
.cart-address-signin {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.cart-address-signin a { color: var(--accent); font-weight: 500; }

.cart-address-add { margin-top: 0.75rem; }
.cart-address-add > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.88rem;
  color: var(--ink);
  user-select: none;
  margin-top: 0.25rem;
}
.cart-address-add > summary::-webkit-details-marker { display: none; }
.cart-address-add > summary::after { content: " ▾"; color: var(--muted); }
.cart-address-add[open] > summary { background: var(--accent-soft); border-color: var(--accent); }
.cart-address-add[open] > summary::after { content: " ▴"; }
.cart-address-form {
  margin-top: 0.85rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.cart-address-form button { margin-top: 0.5rem; }

/* Delivery: "shipping to ZIP" line (replaces the ZIP input when an address is saved) */
.cart-delivery-shipto {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ink);
}
.cart-delivery-shipto-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 0.25rem;
}

/* ---------- SITE-WIDE PROMO BAR (free shipping) ---------- */

.promo-bar {
  font-size: 0.82rem;
  text-align: center;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--rule);
  line-height: 1.4;
}
.promo-bar a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 0.4rem;
}
.promo-bar a:hover { color: var(--ink); }
.promo-bar strong { font-weight: 600; }

/* "Free shipping on orders over $200" — promotional / neutral */
.promo-bar-promo { background: var(--accent-soft); color: var(--ink); }
.promo-bar-promo strong { color: var(--accent); }

/* "You're $X away from free shipping" — gently urgent */
.promo-bar-progress {
  background: var(--ink);
  color: var(--bg);
  border-bottom-color: var(--ink);
}
.promo-bar-progress strong { color: #f3c349; }   /* warm gold for the dollar amount */
.promo-bar-progress a { color: var(--bg); }
.promo-bar-progress a:hover { color: #f3c349; }

/* "Free shipping unlocked!" — celebratory */
.promo-bar-applied {
  background: #e5f3e9;
  color: #1e5a36;
  border-bottom-color: #c8e6cf;
}
.promo-bar-applied strong { color: #1e5a36; }
.promo-bar-applied a { color: #1e5a36; font-weight: 500; }

/* ---------- STUDIO: category filter + reorder controls ---------- */

.studio-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-3);
  font-size: 0.88rem;
}
.studio-filter-label {
  color: var(--muted);
  margin-right: 0.25rem;
}
.studio-chip {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  text-transform: lowercase;
  background: #fff;
  transition: background 0.12s, border-color 0.12s;
}
.studio-chip:hover { border-color: var(--ink); }
.studio-chip.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.studio-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 var(--space-2);
}
.studio-hint span[aria-hidden="true"] {
  display: inline-block;
  margin: 0 0.15rem;
  color: var(--ink);
  font-weight: 600;
}

/* Reorder column — small stacked up/down arrows on the left of each row. */
.studio-reorder {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-self: center;
  margin-right: 0.5rem;
}
.btn-move {
  width: 2rem;
  height: 1.6rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}
.btn-move:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-move:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Category link in studio list — subtle, lowercase. */
.studio-meta .category a {
  color: var(--muted);
  text-decoration: none;
}
.studio-meta .category a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- SHOP ANNOUNCEMENT BAR (admin-editable) ---------- */

.announce-bar {
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--bg);
  letter-spacing: 0.02em;
  line-height: 1.4;
  border-bottom: 1px solid #000;
}

/* ---------- STUDIO: settings form layout ---------- */

.studio-settings-form {
  max-width: 56rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.setting-card {
  padding: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
}
.setting-card label {
  display: block;
  margin-bottom: var(--space-2);
}
.setting-card input[type="text"],
.setting-card input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 1rem;
  background: #fafafa;
}
.setting-card input[type="text"]:focus,
.setting-card input[type="number"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: #fff;
}
.setting-meta {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
}
.setting-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.setting-status-overridden {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.setting-status-default {
  background: #f0f0f0;
  color: var(--muted);
  border: 1px solid var(--rule);
}
.studio-settings-notes {
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: #fafafa;
  border-left: 3px solid var(--rule);
  font-size: 0.88rem;
  color: var(--muted);
}
.studio-settings-notes summary {
  cursor: pointer;
  color: var(--ink);
}
.studio-settings-notes ul { margin: 0.5rem 0 0 1.5rem; padding: 0; }
.studio-settings-notes li { margin-bottom: 0.25rem; }

/* ---------- GDPR: self-serve delete page + admin log ---------- */

.delete-summary {
  max-width: 56rem;
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  background: #fafafa;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.delete-summary h2 {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.delete-summary h2:not(:first-child) { margin-top: var(--space-3); }
.delete-summary ul { margin: 0 0 0 1.5rem; padding: 0; line-height: 1.7; }
.delete-summary code { background: #f0f0f0; padding: 0.05rem 0.3rem; border-radius: 2px; font-size: 0.9em; }

.delete-confirm {
  max-width: 56rem;
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
}
.delete-form .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: var(--space-3);
  cursor: pointer;
  font-weight: 500;
}
.delete-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.studio-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-2);
  font-size: 0.92rem;
}
.studio-table th,
.studio-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.studio-table th {
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}
.studio-table code.hash {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- CROSS-TIER FOOTER NAV (freelance examples) ---------- */

.footer-tiers-row {
  border-top: 1px solid var(--rule);
  padding: var(--space-3) 0 0;
  margin-top: var(--space-3);
  text-align: center;
}
.footer-tiers-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.footer-tiers {
  margin: 0 0 var(--space-2);
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.footer-tiers a { color: var(--ink); text-decoration: none; padding: 0.15rem 0.4rem; }
.footer-tiers a:hover { color: var(--accent); }
.footer-tiers a[aria-current="page"] { color: var(--accent); font-weight: 500; }
.footer-tiers span { color: var(--rule); }
