/* ---------- The counter (shop workbench) ----------
   Choose a category, see one real product at a time: its photograph, price, sizes or scents,
   rating and a verified review, with one action to that product (or size) on brasstacs.shop.
   The rest of the category sits in a strip below. Without JavaScript every tab and product is a
   plain link to the store, and the default product shows in full. */

.workbench {
  position: relative; padding-block: clamp(44px, 5vw, 72px) clamp(44px, 5vw, 68px);
  background: var(--ivory) var(--grain);
}
.workbench + .ingredients { border-top: 1px solid rgba(134, 103, 47, .2); }

/* Tabs: four categories on one rule; the chosen one is ink with a brass bar under it. */
.wb-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(22px, 2.6vw, 32px);
  border-bottom: 1px solid rgba(134, 103, 47, .3);
}
.wb-tab {
  position: relative; display: flex; align-items: baseline; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 6px 14px;
  font: 400 clamp(17px, 1.6vw, 22px)/1.15 var(--serif); color: var(--muted); text-decoration: none; text-align: center;
  transition: color var(--dur-ui);
}
.wb-tab::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 2px; background: var(--brass);
  transform: scaleX(0); transition: transform .45s var(--ease-out);
}
.wb-tab:hover { color: var(--ink); }
.wb-tab[aria-selected="true"], .wb-tab[aria-current="true"] { color: var(--ink); }
.wb-tab[aria-selected="true"]::after, .wb-tab[aria-current="true"]::after { transform: none; }
.wb-tab__count { font: 500 11.5px/1 var(--sans); letter-spacing: .06em; color: var(--brass); }
.wb-tab:focus-visible { outline-offset: -4px; }

/* Panel: the display case and the label. */
/* minmax(0, 1fr): the product strip scrolls inside the column instead of widening it. */
.wb-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 22px; }
.wb-info, .wb-stage { min-width: 0; }

.wb-stage {
  position: relative; padding: 10px;
  background: radial-gradient(120% 90% at 50% 20%, #2a2520 0%, #181512 60%, var(--dark-deep) 100%);
  box-shadow: 0 0 0 1px rgba(134, 103, 47, .35), var(--shadow-warm);
}
.wb-stage::after { content: ""; position: absolute; inset: 5px; pointer-events: none; border: 1px solid var(--brass-hair-dark); z-index: 2; }
.wb-photo { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #1c1916; }
.wb-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* A new photograph fades in over the last one once it has loaded. */
.wb-photo img.is-entering { opacity: 0; }
.wb-photo img.is-in { opacity: 1; transition: opacity .55s var(--ease-out); }

.wb-detail { transition: opacity .28s var(--ease-out), transform .28s var(--ease-out); }
.wb-detail.is-changing { opacity: 0; transform: translateY(6px); }
.wb-kicker { font: 600 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.wb-kicker span { color: var(--muted); letter-spacing: .08em; }
.wb-name { margin-top: 8px; font: 400 clamp(28px, 3vw, 42px)/1.05 var(--serif); letter-spacing: -.015em; }
.wb-name a { text-decoration: none; }
.wb-name a:hover { color: var(--brass); }
.wb-rating { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.wb-rating a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; text-decoration: none; }
.wb-rating a:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brass); }
.wb-rating .stars { font-size: 12px; }
.wb-rating--none { font-style: italic; }
.wb-blurb { margin-top: 12px; max-width: 52ch; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

/* Sizes or scents: real radio buttons, drawn as quiet chips. */
.wb-options { margin-top: 16px; border: 0; padding: 0; }
.wb-options legend { padding: 0; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wb-options__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wb-option { position: relative; }
.wb-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.wb-option span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--brass-hair); border-radius: 2px; font-size: 14px;
  transition: background-color var(--dur-ui), color var(--dur-ui), border-color var(--dur-ui);
}
.wb-option input:hover + span { border-color: var(--ink); }
.wb-option input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.wb-option input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }

.wb-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; }
.wb-cta { min-width: 220px; }
.wb-note { font-size: 12.5px; color: var(--muted); }

.wb-review { margin-top: 18px; padding-left: 16px; border-left: 1px solid var(--brass-hair); }
.wb-review p { font: italic 400 16.5px/1.45 var(--serif); color: var(--ink); max-width: 56ch; }
.wb-review footer { margin-top: 6px; font: 600 10.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* The rest of the category: a strip of small photographs, the current one ringed in brass. */
.wb-more { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(134, 103, 47, .22); transition: opacity .28s var(--ease-out); }
.wb-more.is-changing { opacity: 0; }
.wb-more__label { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wb-thumbs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 10px;
  margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.wb-thumbs::-webkit-scrollbar { display: none; }
.wb-thumb { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px; text-decoration: none; border: 1px solid transparent; border-radius: 2px; transition: border-color var(--dur-ui), background-color var(--dur-ui); }
.wb-thumb img { grid-row: 1 / span 2; width: 44px; height: 44px; object-fit: cover; border-radius: 1px; box-shadow: 0 0 0 1px rgba(134, 103, 47, .25); }
.wb-thumb__name { font-size: 13px; line-height: 1.2; color: var(--ink); }
.wb-thumb__price { font-size: 12px; color: var(--muted); }
.wb-thumb:hover { background: rgba(251, 247, 239, .7); }
.wb-thumb[aria-current="true"] { border-color: var(--brass); background: var(--card); }
.wb-all { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.wb-all a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--brass); }
.wb-all a:hover { color: var(--brass); }

@media (max-width: 699.98px) {
  .wb-tab { flex-direction: column; align-items: center; gap: 3px; min-height: 56px; padding: 10px 2px 12px; font-size: 15.5px; }
  .wb-tab__count { font-size: 10.5px; }
  .wb-cta { width: 100%; }
  .wb-thumbs { grid-auto-columns: 150px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
}

@media (min-width: 1024px) {
  .wb-panel { grid-template-columns: repeat(12, 1fr); column-gap: 32px; align-items: start; margin-top: 28px; }
  .wb-stage { grid-column: 1 / span 6; }
  .wb-photo { aspect-ratio: 1 / 1; }
  .wb-info { grid-column: 7 / span 6; padding-top: 4px; }
  .wb-thumbs { grid-auto-columns: 1fr; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .wb-detail, .wb-more, .wb-photo img.is-in, .wb-tab::after { transition: none; }
}
