/* ============================================================================
   YEMMA — THE SWATCH SHOP
   The front-end study at app/public/swatch-proto/, ported.

   It loads AFTER the theme's own swatches.css and styles only what that sheet
   does not have. The weave square, the family rail, the honesty note and the
   knot drawing are all the theme's and are left alone; what is here is the
   photographed wool card, the set tile, the family band and the envelope bar.

   Every value is a theme token. Nothing is invented, and nothing is a colour
   literal except the two rgba() rims that have to sit over an unknown
   photograph.

   HANDLE: yemma-swatches-page. NOT yemma-swatches — the theme registered that
   one for its own sheet on this very context, and enqueuing a handle somebody
   has already registered silently drops the src given here.
   ========================================================================== */

/* ================================================================ GRIDS === */
.swgrid { display: grid; gap: clamp(1.1rem, 2vw, 2rem) clamp(.8rem, 1.3vw, 1.5rem); }
.swgrid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.swgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.swgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.swgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1200px) { .swgrid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1024px) {
  .swgrid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swgrid--4,
  .swgrid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .swgrid--5,
  .swgrid--4,
  .swgrid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swgrid--2 { grid-template-columns: 1fr; }
}

.swgap { margin-top: clamp(1.8rem, 3vw, 2.8rem); }
.swhint { font-size: 11px; color: var(--muted); letter-spacing: .04em; max-width: 36ch; line-height: 1.7; }
.is-quiet { color: var(--muted-2); font-family: var(--sans); font-size: 10px; letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 400; }

/* ======================================================= THE CHECKBOXES == */
/* Every tick on this page is a real checkbox, hidden, with the round tick drawn
   over it as its label. They are NOT `.screen-reader-text`: the theme gives that
   class a `:focus` rule (base.css) meant for the "Skip to content" link — fixed
   to the top-left corner, unclipped — so clicking a tick focused its checkbox
   and a bare browser checkbox appeared beside the phone number in the top strip.
   This class stays hidden when focused. Keyboard focus is still shown, on the
   tick a sighted user is actually looking at — see the `:focus-visible` rules
   below. No top or left, so the box keeps its place in the card and focusing it
   never scrolls the page somewhere else. */
.swpick {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; opacity: 0;
}

/* ========================================================= THE WOOL CARD == */
/* The house card with a square media box, because a pom is square and every
   photograph in the registry is square. */
.swc { position: relative; display: flex; flex-direction: column; }

.swc__fig {
  position: relative; display: block; aspect-ratio: 1;
  overflow: hidden; background: var(--sand);
}
.swc__ph { position: absolute; inset: 0; display: block; z-index: 0; }
.swc__fig img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.2s var(--ease-out);
}
.swc:hover .swc__fig img { transform: scale(1.055); }

/* The photo goes to the wool's own page, the tick puts it in the envelope, and
   the two must never share a hit area. */
.swc__go { position: absolute; inset: 0; z-index: 2; display: block; }

/* ---- the tick ------------------------------------------------------------
   Always visible, which is where this departs from the study. The study hid it
   until hover, the way a shop grid hides a quick-add — but this page is a
   picker, ticking IS the page, and a primary action behind a hover state is a
   primary action a phone never sees at all. It is drawn quietly instead. */
.swc__tick {
  position: absolute; z-index: 3; right: 10px; bottom: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(250, 246, 239, .92); color: var(--ink-3);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 10px -4px rgba(20, 16, 13, .5);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.swc__tick svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .45; transition: opacity .3s var(--ease); }
.swc:hover .swc__tick { background: var(--bone); color: var(--ink); }
.swc:hover .swc__tick svg { opacity: 1; }

/* Ticked. The checkbox is the state and CSS reads it, so the look can never
   disagree with what will be submitted — there is no class to forget to set. */
.swc__fig:has( [data-yemma-pick]:checked ) { box-shadow: inset 0 0 0 2px var(--ink); }
.swc__fig:has( [data-yemma-pick]:checked ) .swc__tick { background: var(--clay); color: #fff; transform: scale(1.06); }
.swc__fig:has( [data-yemma-pick]:checked ) .swc__tick svg { opacity: 1; }

/* Keyboard. The input is off-screen, so the ring has to be put on the thing a
   sighted keyboard user is actually looking at. */
.swc__fig:has( [data-yemma-pick]:focus-visible ) .swc__tick { outline: 2px solid var(--ink); outline-offset: 2px; }

.swc__meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  margin-top: .8rem; padding-top: .55rem; border-top: 1px solid var(--line);
}
.swc__n { font-family: var(--serif); font-size: 1.12rem; line-height: 1.2; }
.swc:hover .swc__n { color: var(--clay); }
.swc__p { font-family: var(--serif); font-size: 1.02rem; color: var(--ink-3); white-space: nowrap; }
.swc__p em { font-style: normal; font-family: var(--sans); font-size: 9.5px; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted-2); }
.swc__note {
  font-size: 11px; color: var(--muted-2); line-height: 1.55; margin-top: .3rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.swc__fam { display: block; font-size: 9.5px; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--clay); margin-top: .35rem; }

/* ========================================================== THE SET TILE == */
.bnd { position: relative; display: flex; flex-direction: column; }
.bnd__fig { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--bone-2); }
.bnd__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.bnd:hover .bnd__fig img { transform: scale(1.05); }

/* The wools themselves, when the set has no photograph of its own. */
.bnd__bars { position: absolute; inset: 0; display: flex; }
.bnd__bars i { flex: 1; display: block; }
.bnd__strip { display: flex; margin-top: .55rem; height: 7px; }
.bnd__strip i { flex: 1; display: block; }

.bnd__meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  margin-top: .7rem; padding-top: .5rem; border-top: 1px solid var(--line);
}
.bnd__n { font-family: var(--serif); font-size: 1.18rem; }
.bnd:hover .bnd__n { color: var(--clay); }
.bnd__p { font-family: var(--serif); font-size: 1.02rem; color: var(--ink-3); white-space: nowrap; }
.bnd__sub { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; line-height: 1.6; }
.bnd__sub em { font-style: normal; color: var(--clay); }

.bnd__add {
  margin-top: .6rem; align-self: flex-start; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--sans); font-size: var(--fs-xs); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-3);
  background: none; border: 0; padding: 0;
  transition: color .3s var(--ease);
}
.bnd__add::before { content: "+"; font-size: 1rem; line-height: 1; }
.bnd__add:hover { color: var(--clay); }
.bnd:has( [data-yemma-pick]:checked ) .bnd__fig { box-shadow: inset 0 0 0 2px var(--ink); }
.bnd:has( [data-yemma-pick]:checked ) .bnd__add { color: var(--clay); }
.bnd:has( [data-yemma-pick]:checked ) .bnd__add::before { content: "\2713"; font-size: .8rem; }
.bnd:has( [data-yemma-pick]:focus-visible ) .bnd__add { outline: 2px solid var(--ink); outline-offset: 3px; }

/* A family band and a colourway have no photograph and never will — neither is
   a product. The bars ARE the picture, so the box is shallower and the bars get
   the room a photograph would otherwise have taken.

   `.is-in` rather than `:has(:checked)`: neither holds a checkbox of its own.
   Each is a button over somebody else's wools, and it lights when every one of
   those wools is ticked — which only the script can work out. */
.bnd--fam .bnd__fig,
.bnd--way .bnd__fig { aspect-ratio: 16/9; }
.bnd--fam.is-in .bnd__fig,
.bnd--way.is-in .bnd__fig { box-shadow: inset 0 0 0 2px var(--ink); }
.bnd--fam.is-in .bnd__add,
.bnd--way.is-in .bnd__add { color: var(--clay); }
.bnd--fam.is-in .bnd__add::before,
.bnd--way.is-in .bnd__add::before { content: "\2713"; font-size: .8rem; }

/* ====================================================== A SMALLER BAND ==== */
.famrow {
  display: flex; align-items: center; gap: 1rem; width: 100%;
  padding: .9rem 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: padding-left .3s var(--ease);
}
.famrow:first-of-type { border-top: 1px solid var(--line); }
.famrow:hover { padding-left: 8px; }
.famrow__sw { display: flex; flex: none; }
.famrow__sw i {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(20, 16, 13, .14);
  box-shadow: inset 0 0 0 2px var(--bone);
  margin-right: -9px; background-size: cover; background-position: center;
}
.famrow__n { display: block; font-family: var(--serif); font-size: 1.1rem; line-height: 1.2; }
.famrow:hover .famrow__n { color: var(--clay); }
.famrow__c { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }
.famrow__p { margin-left: auto; font-family: var(--serif); font-size: 1rem; color: var(--ink-3); white-space: nowrap; }
.famrow.is-in .famrow__p { color: var(--clay); }
.famrow.is-in .famrow__p::after { content: " \2713"; }

/* =================================================== THE WEAVE SQUARES ==== */
/* The theme owns .square. Three things it never defined, and one of them put
   the bare word "Add" on the page as body text since the day this shipped. */
.squares { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .squares { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .squares { grid-template-columns: 1fr; } }

.square__vis img { width: 100%; height: 100%; object-fit: cover; display: block; }
.square h4 a { color: inherit; }
.square:hover h4 a { color: var(--clay); }

.square__pick {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--sans); font-size: var(--fs-xs); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-3);
  transition: color .3s var(--ease);
}
.square__pick::before { content: "+"; font-size: 1rem; line-height: 1; }
.square__pick:hover { color: var(--clay); }
.square:has( [data-yemma-pick]:checked ) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.square:has( [data-yemma-pick]:checked ) .square__pick { color: var(--clay); }
.square:has( [data-yemma-pick]:checked ) .square__pick::before { content: "\2713"; font-size: .8rem; }
.square:has( [data-yemma-pick]:focus-visible ) .square__pick { outline: 2px solid var(--ink); outline-offset: 3px; }

.square__go { margin-top: 1rem; align-self: flex-start; }

/* The pile bar, on the shared scale of the deepest pile the shop weaves. */
.pilebar { height: 3px; background: var(--sand-2); margin-top: .55rem; }
.pilebar i { display: block; height: 100%; background: var(--clay); }

/* Two weaves, three columns. The third cell is the sentence about why. */
.wnote {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--bone);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.wnote::before {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: repeating-linear-gradient(45deg, var(--brass-l) 0 1px, transparent 1px 26px),
                    repeating-linear-gradient(-45deg, var(--brass-l) 0 1px, transparent 1px 26px);
}
.wnote > * { position: relative; }
.wnote h4 { color: var(--bone); font-family: var(--serif); font-size: 1.35rem; font-weight: 400; margin-top: .5rem; }
.wnote p { color: var(--muted-2); font-size: .88rem; line-height: 1.75; margin-top: .7rem; }
.wnote .eyebrow { color: var(--brass-l); }

/* ================================================== NOT ON SALE YET ======= */
/* A wool the shop dyes but has not made a product for. It is drawn, because
   hiding it would publish a shorter palette than the truth — and it is drawn
   plainly enough that nobody tries to tick it. */
.swc.is-unmade .swc__fig,
.bnd.is-unmade .bnd__fig { filter: saturate(.5); opacity: .62; }
.swc.is-unmade .swc__n,
.bnd.is-unmade .bnd__n { color: var(--muted); }
.swc.is-unmade:hover .swc__fig img { transform: none; }
.square.is-unmade { opacity: .66; }
.square.is-unmade:hover { transform: none; border-color: var(--line); box-shadow: none; }

/* ============================================== THE FAMILY RAIL, EXTRA ==== */
/* The theme's .pfilter, with room for the count the port prints beside a name. */
.pfilter button span { opacity: .5; margin-left: .35em; }
.pfilter button.is-on span { opacity: .7; }

/* ============================================== THE ENVELOPE BAR ========== */
/* The theme's own sticky buy bar, which lives in product.css and is therefore
   NOT loaded on this context. The base is repeated here rather than depended
   on; only the expanding list below it is genuinely new. */
.sbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 700;
  background: rgba(250, 246, 239, .95); backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 40px -24px rgba(20, 16, 13, .5);
  transform: translateY(102%); transition: transform .55s var(--ease-out);
}
.sbar.is-on { transform: none; }
.sbar__in { display: flex; align-items: center; gap: 1.2rem; padding-block: .8rem; }

.sbar__count {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--ink); color: var(--bone); display: grid; place-items: center;
  font-family: var(--serif); font-size: .95rem;
}
.sbar__lab { min-width: 0; }
.sbar__lab b { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbar__lab span { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; }
.sbar__price { margin-left: auto; font-family: var(--serif); font-size: 1.35rem; white-space: nowrap; }
.sbar .btn { flex: none; }

.sbar__open {
  background: none; border: 0; font: inherit; cursor: pointer; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: .4em;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
}
.sbar__open svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .35s var(--ease); }
.sbar.is-open .sbar__open svg { transform: rotate(180deg); }

.sbar__list { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease-out); }
.sbar.is-open .sbar__list { max-height: 44svh; overflow-y: auto; }
.sbar__list ul { list-style: none; margin: 0; padding: 0 0 .8rem; border-top: 1px solid var(--line); }
.sbar__list li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.sbar__list li i { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid rgba(20, 16, 13, .14); background-size: cover; background-position: center; }
.sbar__list li b { font-family: var(--serif); font-weight: 400; margin-left: auto; }
.sbar__list li button { background: none; border: 0; font: inherit; cursor: pointer; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 0 .2rem; }
.sbar__list li button:hover { color: var(--clay); }
.sbar__cap { font-size: 11px; color: var(--clay); line-height: 1.5; padding: .6rem 0 0; }

/* A rug's wools that did not fit in one order, named so the customer can swap
   one in (swatches.js fromRug()). Empty, and gone, the rest of the time. */
.sbar__note { margin: 0; padding: .75rem 0 0; font-size: 12px; line-height: 1.5; color: var(--clay); }
.sbar__note:empty { display: none; }

/* While the envelope shows, the chat button stands above it, by the rule the
   theme's product.css gives a rug page's buy bar: swatches.js says
   `html.has-sbar` and `--sbar-h`, and the back-to-top button follows through
   layout.css. Before, the chat button sat on the envelope's own button. */
html.has-sbar .ya-launch { bottom: calc(var(--sbar-h, 0px) + clamp(14px, 3vw, 28px)); }

/* The bar stands over the end of the page, so the page has to end above it. */
.swpage { padding-bottom: 0; }
body.yemma-has-envelope { padding-bottom: 86px; }

/* ---- the bottom-right corner belongs to somebody else ---------------------
   Two fixed controls already live there on every page: the assistant's
   launcher (58px, z 99990) and the back-to-top button (46px). A bar pinned to
   the bottom runs straight under both, and the thing they cover is the right
   end of the bar — which is where the only button that matters is.

   So the corner is reserved rather than fought over. Raising the bar above a
   z-index of 99990 would win the argument and cover the chat button instead,
   which is the same bug pointing the other way.

   Only while the wrap still reaches the window's edge. Past that the wrap is
   inset by its own max-width, the corner is outside it already, and the
   reservation would be a hole in the middle of nothing. */
@media (max-width: 1180px) {
  .sbar .wrap { padding-right: max(var(--gutter), 78px); }
}

@media (max-width: 720px) {
  .sbar__lab span,
  .sbar__open { display: none; }
  .sbar__in { gap: .7rem; }

  /* The label may shrink and ellipsise; the button may not. A cut-off
     "ADD TO THE BA" is worse than a smaller word. */
  .sbar .btn { flex: none; white-space: nowrap; }
  .sbar__price { font-size: 1.2rem; }
}
@media (max-width: 560px) {
  /* The count circle already says the number; the words only steal room from
     the button. */
  .sbar__lab { display: none; }
  .sbar .btn { padding-inline: 1rem; }
}

/* ==================================================== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
  .swc__fig img,
  .bnd__fig img,
  .sbar,
  .sbar__list,
  .famrow { transition: none; }
  .swc:hover .swc__fig img,
  .bnd:hover .bnd__fig img { transform: none; }
}

/* ============================================ ONE SWATCH, ON ITS OWN PAGE = */
/* WooCommerce's own single-product markup, used as the grid rather than
   replaced. `SwatchProductPage` strips the default callbacks off the three
   hooks and hangs ours on instead, so `div.product` keeps its id, its
   `wc_product_class()` and its structured data, and `.summary` is simply the
   right-hand column. Nothing here applies anywhere but a sample's page. */
.yemma-swatch-pdp div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 4.5rem);
  align-items: start;
}
.yemma-swatch-pdp div.product > .summary { margin: 0; width: auto; float: none; }

/* The bands run the full width underneath both columns. */
.yemma-swatch-pdp div.product > .swdtl__band { grid-column: 1 / -1; }

@media (max-width: 1024px) {
  .yemma-swatch-pdp div.product { grid-template-columns: 1fr; }
}

/* ---- the photograph ------------------------------------------------------ */
/* Not sticky, and that is a decision rather than an omission.

   The bands below are siblings of this and of `.summary` inside WooCommerce's
   own `div.product`, and a sticky grid item is constrained by the GRID
   CONTAINER, not by its row — so a sticky figure rode 600px down over "the
   palettes it sits in" and sat on top of the rug cards. The two columns are
   within sixty pixels of each other anyway (629 against 566 on a wool), so
   there was no travel to win and nothing was lost by stopping. */
.swdtl__fig {
  position: relative; aspect-ratio: 1; overflow: hidden; background: var(--sand);
}

.swdtl__ph { position: absolute; inset: 0; display: block; z-index: 0; }
.swdtl__fig.is-pale { box-shadow: inset 0 0 0 1px rgba(20, 16, 13, .14); }
.swdtl__fig img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.swdtl__bars { position: absolute; inset: 0; display: flex; z-index: 0; }
.swdtl__bars i { flex: 1; display: block; }
.swdtl__weave { position: absolute; inset: 0; z-index: 0; background: var(--bone-2); }
.swdtl__weave svg { width: 100%; height: 100%; display: block; }

/* The warp, the weft and the knots.
   `swatches.css` carries these, and `swatches.css` is loaded on the swatches
   CONTEXT — which a product page is not. Without them an SVG `<line>` has no
   stroke and vanishes, so the square drew twelve dots floating on nothing while
   the caption underneath talked about a weave. Scoped to this box so the two
   copies can never be in the same cascade. */
.swdtl__weave .sq-warp { stroke: var(--sand-2); stroke-width: .8; }
.swdtl__weave .sq-weft { stroke: var(--clay); stroke-width: .8; opacity: .5; }
.swdtl__weave .sq-knot { fill: var(--ink); }

/* ---- the column beside it ------------------------------------------------ */
.swdtl__crumbs { margin-bottom: 1.2rem; }
.swdtl__h {
  font-family: var(--serif); font-weight: 300; line-height: 1;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  letter-spacing: var(--track-tight); margin: .7rem 0 0;
}
.swdtl__price { font-family: var(--serif); font-size: 1.6rem; margin-top: .9rem; }
.swdtl__note { font-size: 1.02rem; color: var(--ink-3); line-height: 1.8; margin-top: 1rem; max-width: 46ch; }
.swdtl__credit {
  font-size: 11px; color: var(--clay); line-height: 1.7; margin-top: .9rem;
  letter-spacing: .04em; max-width: 44ch;
}
.swdtl__back { margin-top: 1.4rem; }

/* WooCommerce's own add-to-cart form, given the shop's own spacing. */
.yemma-swatch-pdp .summary form.cart { margin: 1.6rem 0 0; }
.yemma-swatch-pdp .summary form.cart .quantity { display: none; }
.yemma-swatch-pdp .summary .single_add_to_cart_button { width: 100%; }
/* Only the in-stock line is hidden. When a sample is out of stock WooCommerce
   prints "Out of stock" and leaves the form out, and that sentence is then the
   only thing on the page saying why there is no button — hiding every `.stock`
   left a price, a promise of money back, and no way to act on either. */
.yemma-swatch-pdp .summary .stock.in-stock,
.yemma-swatch-pdp .summary .product_meta,
.yemma-swatch-pdp .summary .woocommerce-product-details__short-description { display: none; }

/* ---- the facts ----------------------------------------------------------- */
.facts { margin: 1.6rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.2rem;
  padding: .75rem 0; border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.facts dd { font-family: var(--serif); font-size: 1.05rem; text-align: right; margin: 0; }

/* ---- a set lists what is in the envelope --------------------------------- */
.slotlist { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.slotlist a,
.slotlist > li > span {
  display: flex; align-items: center; gap: .85rem; padding: .65rem .8rem;
  border: 1px solid var(--line); background: var(--bone);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.slotlist a:hover { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.slotlist i {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  border: 1px solid rgba(20, 16, 13, .14);
  background-size: cover; background-position: center;
}
.slotlist b { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }

/* ---- the bands underneath ------------------------------------------------ */
/* Rules and space, not tones. These sit inside the theme's `.wrap`, so a
   full-bleed band would have to break out with viewport units — and three
   tinted bands on a three-dollar product page would be louder than the thing
   being sold. `/swatches/` carries the tones; this page does not. */
.swdtl__band { margin-top: clamp(3rem, 6vw, 5.5rem); padding-top: clamp(2rem, 4vw, 3.4rem); border-top: 1px solid var(--line); }
.swdtl__band .sec-head { margin-bottom: clamp(1.4rem, 2.6vw, 2.4rem); }
.swdtl__band h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

/* ---- a rug, drawn small -------------------------------------------------- */
.rugc { display: flex; flex-direction: column; }
.rugc__fig { aspect-ratio: 3/4; background: var(--sand); overflow: hidden; display: block; }
.rugc__fig img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s var(--ease-out); }
.rugc:hover .rugc__fig img { transform: scale(1.045); }
.rugc__n { font-family: var(--serif); font-size: 1.12rem; margin-top: .7rem; display: block; }
.rugc:hover .rugc__n { color: var(--clay); }
.rugc__p { font-family: var(--serif); font-size: 1rem; color: var(--ink-3); }
.rugc__p del { color: var(--muted-2); margin-right: .4em; }

@media (prefers-reduced-motion: reduce) {
  .rugc__fig img { transition: none; }
  .rugc:hover .rugc__fig img { transform: none; }
}

/* ---- WooCommerce's own Add button, wearing the shop's clothes ------------- */
/* The form is left exactly as WooCommerce ships it — same POST, same
   `add-to-cart` parameter, so `WC_Form_Handler` still runs and
   `woocommerce_add_to_cart_validation` still fires, which is the wall SwatchCap
   stands on. Only the look is ours. WooCommerce offers no class filter on this
   button, and the theme never styled it because a rug draws its own.

   The clay sweep is a BACKGROUND, not the theme's `::before`. `.btn` lifts its
   label with `.btn span { z-index: 2 }` and WooCommerce's button has no span —
   its label is a bare text node, which an absolutely-positioned pseudo-element
   at z-index 1 paints straight over. A two-stop gradient slid on
   background-position wipes upward exactly the same way and stays behind the
   text, because that is what a background is. */
.yemma-swatch-pdp .single_add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center; gap: .8em;
  width: 100%; padding: 1.05em 2.3em;
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--bone);
  background-color: var(--ink);
  background-image: linear-gradient(to top, var(--clay) 50%, transparent 50%);
  background-size: 100% 200%;
  background-position: 0 0;
  background-repeat: no-repeat;
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  line-height: 1; cursor: pointer;
  transition: background-position .5s var(--ease-out), color .45s var(--ease),
              border-color .45s var(--ease), transform .45s var(--ease);
}
.yemma-swatch-pdp .single_add_to_cart_button:hover {
  background-position: 0 100%;
  color: #fff;
  border-color: var(--clay);
}
.yemma-swatch-pdp .single_add_to_cart_button:active { transform: translateY(1px); }
.yemma-swatch-pdp .single_add_to_cart_button:disabled {
  opacity: .45; cursor: not-allowed; background-position: 0 0;
  color: var(--bone); border-color: var(--ink); transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .yemma-swatch-pdp .single_add_to_cart_button { transition: none; }
}

/* ---- withdrawn, and out of stock ---------------------------------------- */
.swdtl__gone {
  margin-top: .9rem; padding: .8rem 1rem; max-width: 46ch;
  border-left: 2px solid var(--clay); background: var(--bone-2);
  font-size: .92rem; line-height: 1.7; color: var(--ink-2);
}
.yemma-swatch-pdp .summary .stock.out-of-stock {
  margin-top: 1.4rem; font-size: var(--fs-xs); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--clay);
}

/* ---- already in the bag, on the picker ----------------------------------- */
/* Every sample is sold one to an order, so a wool already in the basket cannot
   be ticked again — the script disables its box and marks the card. Without it
   the customer ticked it, pressed Add, and the run stopped on WooCommerce's
   "you cannot add another", with every wool after it never tried. */
.is-bagged .swc__tick,
.is-bagged .square__pick,
.is-bagged .bnd__add { pointer-events: none; }
.swc.is-bagged .swc__tick { background: var(--ink); color: var(--bone); }
.swc.is-bagged .swc__tick svg { opacity: 1; }
.yemma-bagged {
  display: inline-block; margin-top: .45rem;
  font-size: 9.5px; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--clay);
}

/* =============================================================== THE OFFER = */
/* The credit, as the page's opening argument: the shop's photograph of real
   poms shown whole on the left, and the offer set on the photograph's own plain
   backdrop to the right. The band is painted in that backdrop's colour
   (`--ground`, read off the picture by SwatchesPage::ground_of()), so picture
   and band are one surface with no edge. All the words come from
   SwatchesPage::offer(); none are typed here. */
.swoffer {
  position: relative; container-type: inline-size; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center;
  background: var(--ground, var(--bone-2)); color: var(--ink);
}
/* `width: 100%` is load-bearing. The band sits in the theme's flex column, and
   `container-type: inline-size` takes away the width a flex item would have got
   from its content — without it the band collapsed to nothing. */
.swoffer--words { grid-template-columns: minmax(0, 1fr); }

/* Whole: never cropped, never zoomed. */
.swoffer__fig { margin: 0; align-self: stretch; display: flex; align-items: center; }
.swoffer__img { display: block; width: 100%; height: auto; }

.swoffer__copy {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(2.5rem, 5vw, 5rem);
  padding-left: clamp(1rem, 2vw, 2rem);
  /* The right edge lines up with the page's own wrap, measured against the
     band (cqw) rather than the window, so a scrollbar cannot shift it. */
  padding-right: max(var(--gutter), calc((100cqw - var(--wrap)) / 2 + var(--gutter)));
}
.swoffer__copy > * { max-width: 34rem; }
.swoffer--words .swoffer__copy { padding-left: max(var(--gutter), calc((100cqw - var(--wrap)) / 2 + var(--gutter))); }

.swoffer__h {
  font-family: var(--serif); font-weight: 300; line-height: 1;
  font-size: clamp(2.5rem, 4.4vw, 4.4rem); letter-spacing: var(--track-tight);
  color: var(--ink); margin-top: .9rem; text-wrap: balance;
}
.swoffer__h em { font-style: italic; color: var(--clay); }
.swoffer__p { font-size: 1.02rem; line-height: 1.8; color: var(--ink-3); margin-top: 1.1rem; }

/* Not a grid. The first step carries the price as WooCommerce's own <span>, and
   in a grid every loose run of text and every span becomes its own cell — the
   price fell onto a line of its own. The number hangs in the padding instead. */
.swoffer__steps { list-style: none; margin: 1.7rem 0 0; padding: 0; counter-reset: step; display: grid; gap: .8rem; }
.swoffer__steps li {
  counter-increment: step; position: relative; padding-left: 2.6rem;
  font-size: .94rem; line-height: 1.6; color: var(--ink-2);
}
.swoffer__steps li::before {
  content: "0" counter(step); position: absolute; left: 0; top: -.1em;
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; color: var(--clay);
}

/* The small print, as the biggest type on the band. */
.swoffer__facts {
  list-style: none; margin: 1.9rem 0 0; padding: 1.3rem 0 0;
  border-top: 1px solid var(--line-2);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem;
}
.swoffer__facts li { min-width: 0; }
.swoffer__n {
  display: block; font-family: var(--serif); font-weight: 300; line-height: 1;
  font-size: clamp(2rem, 3vw, 2.9rem); color: var(--ink); white-space: nowrap;
}
.swoffer__n sup { font-size: .42em; vertical-align: 1.1em; margin: 0 .06em; color: var(--clay); }
.swoffer__l {
  display: block; margin-top: .5rem;
  font-size: 10px; line-height: 1.5; letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--muted);
}

.swoffer__go { margin-top: 2rem; align-self: flex-start; }
.swoffer__go svg { width: 13px; height: 13px; }

@media (max-width: 1024px) {
  .swoffer { grid-template-columns: minmax(0, 1fr); }
  .swoffer__copy { padding-inline: var(--gutter); padding-top: 0; padding-bottom: clamp(2.4rem, 7vw, 3.4rem); }
  .swoffer--words .swoffer__copy { padding-top: clamp(2.4rem, 7vw, 3.4rem); }
}
@media (max-width: 560px) {
  .swoffer__facts { gap: .8rem; }
  .swoffer__n { font-size: 1.85rem; }
  .swoffer__l { font-size: 9px; letter-spacing: .14em; }
  .swoffer__go { align-self: stretch; }
}

