/* --------------------------------------------------------------------------------
   The store's own styles: everything WooCommerce renders, dressed in the site's system.

   Loads after the five shared sheets (tokens, type, accents, fonts, shell — copied from
   the main site by scripts/sync-shared.mjs) and after WooCommerce's own. Nothing in this
   file restates a color, a face or a size the shared sheets define; it only applies them
   to markup the site never had to style.

   KEEPING WOOCOMMERCE'S CSS rather than dequeuing it, which was the other way to start.
   Dequeuing woocommerce-general would mean fewer overrides here, but that sheet also carries
   the machinery a theme does not think about until it is missing: the gallery's slider and
   zoom positioning, the loading overlay, the responsive cart table, the star font. Keeping
   it and overriding its look is more lines and far fewer ways to break a checkout.

   THE SPECIFICITY CONVENTION. WooCommerce's selectors are built on `.woocommerce` or
   `.woocommerce-page`. Every rule here that has to beat one of them starts `body.kg-store`
   and otherwise mirrors WooCommerce's selector — which lands exactly one type selector
   above it, every time, without !important and without guessing. (kg-store is the body
   class inc/woocommerce.php adds.) The two !important declarations below are both against
   inline styles that WooCommerce's scripts write, which nothing else can beat.
   -------------------------------------------------------------------------------- */

:root {
  /* A field's edge has to be visible, not just present: WCAG 1.4.11 wants 3:1 for the
     boundary of a control. The site's --hair (0.14) is a divider and measures 1.41:1 on
     ink; 0.42 measures 3.70:1 against ink and 3.45:1 against the field's own fill. */
  --field-border: rgba(244, 239, 228, 0.42);
  --field-bg: rgba(244, 239, 228, 0.04);
  --raised: rgba(244, 239, 228, 0.045);

  /* Placeholder text sits on the field fill, not on ink, and the site's --dimmer (0.50)
     loses enough there to fall to the 4.5:1 line. 0.55 measures 5.20:1 on the fill and
     still reads as quieter than a typed value. */
  --placeholder: rgba(244, 239, 228, 0.55);

  /* Error text. --kg-ember itself is 4.33:1 on ink, under the 4.5 small text needs, and
     every error message is small text. This is ember lifted to 6.75:1; ember stays the color
     of error BORDERS, where 3:1 is enough. */
  --error-text: #f0735a;

  /* WooCommerce's own custom properties, pointed at the palette, so the states this file
     never names — disabled buttons, the store notice, highlights inside its own
     components — still come out in the site's colors. */
  --wc-primary: var(--kg-ember);
  --wc-primary-text: var(--kg-bone);
  --wc-secondary: var(--raised);
  --wc-secondary-text: var(--kg-bone);
  --wc-highlight: var(--kg-gold);
  --wc-highligh-text: var(--kg-ink); /* sic — WooCommerce's spelling */
  --wc-content-bg: var(--kg-ink);
  --wc-subtext: var(--dim);
  --wc-red: var(--error-text);
  --wc-green: var(--kg-teal);
  --wc-form-border-color: var(--field-border);
  --wc-form-border-radius: 2px;
  --wc-form-border-width: 1px;
}

/* WordPress and WooCommerce both hide labels with this class; the site's own equivalent
   is .sr, which neither knows about. Without it every "Quantity" and "Remove this item"
   label renders in full. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  word-wrap: normal;
}

body.kg-store :is(a, button, summary):focus-visible {
  outline: 2px solid var(--kg-bone);
  outline-offset: 3px;
}

/* WooCommerce sets `height: auto` on every image inside .woocommerce-page, at a
   specificity that ties with shell.css's `.wordmark img` (shell.css wins that tie by loading
   later) and beats its `.footer__mark` outright — which rendered the footer's 54px lockup
   at its natural 222px. Restated here one level up, rather than edited in shell.css, which
   is the site's file and has no reason to know about WooCommerce. */
body.kg-store .footer__mark {
  height: 54px;
}

/* ------------------------------------------------------------------------- cart */

/* The site's Store button, in the same slot and outline. A class of its own rather than
   `.store`, because shell.css hides .store below 350px — right on the site, where the menu
   holds the same link, and wrong here, where the cart is the one control that must stay.
   The header player the site keeps beside it is gone (see header.php), which is the room
   the cart needs at 320px. */
.kg-cart {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px 0 18px;
  border: 1px solid var(--kg-gold);
  border-radius: 2px;
  white-space: nowrap;
}
.kg-cart[aria-current="page"] {
  background: rgba(232, 163, 61, 0.12);
}
.kg-cart__count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--kg-gold);
  color: var(--kg-ink);
  font-size: 0.72rem;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------- store bar */

/* The store's sections, under the masthead and not stuck to it. The masthead already
   takes 68-78px of every screen; a second sticky bar would double that on a phone for
   links a shopper uses once per visit. */
.shopbar {
  border-bottom: 1px solid var(--hair);
}
.shopbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--measure-page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shopbar__list {
  display: flex;
  gap: 28px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.shopbar__list::-webkit-scrollbar {
  display: none;
}
.shopbar a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--dim);
  white-space: nowrap;
}
.shopbar a:hover {
  color: var(--kg-bone);
}
/* An inset underline rather than a border, so the current section's rule sits on the
   bar's own hairline and costs no height. */
.shopbar a[aria-current="page"] {
  color: var(--kg-gold);
  box-shadow: inset 0 -2px 0 var(--kg-gold);
}
.shopbar__account {
  flex: none;
  margin-left: auto;
}
/* On a phone the section list outruns the screen (five labels need ~460px) and scrolls
   sideways inside its own strip. The fade says there is more; without it the last visible
   label looks like the end of the list. */
@media (max-width: 699px) {
  .shopbar__list {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    padding-right: 36px;
  }
}

/* -------------------------------------------------------------------- page scaffold */

/* .band (shell.css) gives every page its measure, gutters and top rule. The store bar is
   the rule here, so the first band does not draw a second one right under it. */
main > .band:first-child {
  border-top: 0;
}
.page__body {
  display: block;
}

/* -------------------------------------------------------------------------- buttons */

/* Every WooCommerce button, in the site's two button shapes: outline for the secondary
   actions (update cart, apply coupon, view cart), solid ember for the one primary action on
   each screen — WooCommerce marks exactly those with `.alt`. Type is the eyebrow role,
   which is what the site's .btn is always paired with. */
body.kg-store a.button,
body.kg-store button.button,
body.kg-store input.button,
body.kg-store #respond input#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: var(--kg-step--1);
  line-height: 1.2;
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--kg-gold);
  background: transparent;
  border: 1px solid var(--kg-gold);
  border-radius: 2px;
  white-space: nowrap;
  transition:
    color var(--kg-dur-fast) var(--kg-ease-snap),
    background-color var(--kg-dur-fast) var(--kg-ease-snap),
    border-color var(--kg-dur-fast) var(--kg-ease-snap);
}
body.kg-store a.button:hover,
body.kg-store button.button:hover,
body.kg-store input.button:hover,
body.kg-store #respond input#submit:hover {
  color: var(--kg-ink);
  background: var(--kg-gold);
}
body.kg-store a.button.alt,
body.kg-store button.button.alt,
body.kg-store input.button.alt,
body.kg-store #respond input#submit.alt {
  min-height: 56px;
  padding: 0 30px;
  color: var(--kg-bone);
  background: var(--kg-ember);
  border-color: var(--kg-ember);
}
body.kg-store a.button.alt:hover,
body.kg-store button.button.alt:hover,
body.kg-store input.button.alt:hover,
body.kg-store #respond input#submit.alt:hover {
  color: var(--kg-ink);
  background: var(--kg-gold);
  border-color: var(--kg-gold);
}
/* Disabled. This is the add-to-cart button's resting state on every product here — it stays
   disabled until a color and size are chosen — so it is the first button most visitors see.
   WooCommerce paints it with hardcoded purple rather than its own --wc-primary, at up to
   (0,6,1) with :disabled[disabled]:hover, hence the :is() list: its most specific argument
   sets the weight, and the :hover twin is the one that has to clear WooCommerce's. */
body.kg-store :is(a, button, input).button:is(.disabled, :disabled, :disabled[disabled]),
body.kg-store :is(a, button, input).button:is(.disabled, :disabled, :disabled[disabled]):hover {
  color: var(--kg-gold);
  background: transparent;
  border-color: var(--kg-gold);
  opacity: 0.45;
  cursor: not-allowed;
}
body.kg-store :is(a, button, input).button.alt:is(.disabled, :disabled, :disabled[disabled]),
body.kg-store :is(a, button, input).button.alt:is(.disabled, :disabled, :disabled[disabled]):hover {
  color: var(--kg-bone);
  background: var(--kg-ember);
  border-color: var(--kg-ember);
}

/* ---------------------------------------------------------------------------- forms */

body.kg-store :is(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], input[type="date"], textarea, select),
body.kg-store form .form-row :is(.input-text, select, textarea) {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font-family: var(--kg-font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--kg-bone);
  background-color: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 2px;
  box-shadow: none;
  transition: border-color var(--kg-dur-fast) var(--kg-ease-snap);
}
body.kg-store textarea,
body.kg-store form .form-row textarea {
  min-height: 120px;
}
body.kg-store :is(input, textarea, select):focus,
body.kg-store form .form-row :is(.input-text, select, textarea):focus {
  outline: 2px solid var(--kg-gold);
  outline-offset: 1px;
  border-color: var(--kg-gold);
}
body.kg-store ::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

/* Selects drop the platform arrow for the site's own, drawn in bone. WooCommerce 10 draws
   its own arrow in dark grey on the variation selects, which vanishes on ink. */
body.kg-store select,
body.kg-store form .form-row select,
body.kg-store div.product form.cart .variations select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23F4EFE4' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
}
/* Windows and Linux draw the open list with the option's own colors, not the select's. */
body.kg-store select option {
  color: var(--kg-bone);
  background: var(--kg-ink);
}

body.kg-store label,
body.kg-store form .form-row label {
  display: block;
  margin: 0 0 8px;
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: var(--kg-step--1);
  line-height: 1.3;
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
}
/* Checkbox and radio labels read as sentences ("Ship to a different address?", "I have
   read and agree to…"), not as field names, so they keep sentence case. */
body.kg-store form .form-row label.checkbox,
body.kg-store form .form-row label.woocommerce-form__label-for-checkbox,
body.kg-store label.woocommerce-form__label-for-checkbox,
body.kg-store #payment ul.payment_methods li label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kg-bone);
}
body.kg-store input[type="checkbox"],
body.kg-store input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--kg-gold);
}
body.kg-store form .form-row .required {
  color: var(--kg-gold);
  text-decoration: none;
}
body.kg-store form .form-row {
  margin: 0 0 18px;
  padding: 0;
}
body.kg-store form .form-row.woocommerce-invalid :is(.input-text, select),
body.kg-store form .form-row.woocommerce-invalid .select2-container .select2-selection {
  border-color: var(--kg-ember);
}
body.kg-store form .form-row.woocommerce-invalid label {
  color: var(--error-text);
}

/* The country and state pickers on checkout. select2 appends its dropdown to <body>, which
   is why these carry no container beyond the body class. */
body.kg-store .select2-container--default .select2-selection--single {
  height: 48px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 2px;
}
body.kg-store .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 14px;
  line-height: 46px;
  color: var(--kg-bone);
}
body.kg-store .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
  right: 10px;
}
body.kg-store .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-top-color: var(--kg-bone);
}
body.kg-store .select2-container--default.select2-container--focus .select2-selection--single,
body.kg-store .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--kg-gold);
}
body.kg-store .select2-dropdown {
  color: var(--kg-bone);
  background: var(--kg-ink);
  border-color: var(--field-border);
  border-radius: 2px;
}
body.kg-store .select2-container--default .select2-search--dropdown .select2-search__field {
  color: var(--kg-bone);
  background: var(--field-bg);
  border-color: var(--field-border);
}
body.kg-store .select2-container--default .select2-results__option--highlighted[aria-selected],
body.kg-store .select2-container--default .select2-results__option--highlighted[data-selected] {
  color: var(--kg-ink);
  background: var(--kg-gold);
}
body.kg-store .select2-container--default .select2-results__option[aria-selected="true"],
body.kg-store .select2-container--default .select2-results__option[data-selected="true"] {
  background: var(--raised);
}

/* -------------------------------------------------------------------------- notices */

/* Raised ink with a rule down the leading edge — the site's hairline vocabulary, in the
   one place a color has to carry meaning: teal for done, gold for information, ember for
   a problem. WooCommerce draws its rule along the top in its own greens and blues. */
body.kg-store .woocommerce-message,
body.kg-store .woocommerce-info,
body.kg-store .woocommerce-error,
body.kg-store .woocommerce-noreviews,
body.kg-store p.no-comments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0 0 28px;
  padding: 16px 20px 16px 52px;
  color: var(--kg-bone);
  background: var(--raised);
  border: 0;
  border-left: 3px solid var(--kg-gold);
  border-radius: 0;
  font-size: 0.95rem;
  line-height: var(--kg-lead-tight);
}
body.kg-store .woocommerce-message {
  border-left-color: var(--kg-teal);
}
body.kg-store .woocommerce-error {
  border-left-color: var(--kg-ember);
  flex-direction: column;
  align-items: flex-start;
}
body.kg-store .woocommerce-message::before,
body.kg-store .woocommerce-info::before,
body.kg-store .woocommerce-error::before {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--kg-gold);
}
body.kg-store .woocommerce-message::before {
  color: var(--kg-teal);
}
body.kg-store .woocommerce-error::before {
  color: var(--error-text);
}
body.kg-store .woocommerce-message .button,
body.kg-store .woocommerce-info .button,
body.kg-store .woocommerce-error .button {
  order: 2;
  float: none;
  margin-left: auto;
  min-height: 40px;
}
body.kg-store .woocommerce-message a:not(.button),
body.kg-store .woocommerce-info a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------- shop archive */

.shop__head {
  margin-bottom: 28px;
}
.shop-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hair);
}
body.kg-store .woocommerce-result-count {
  float: none;
  margin: 0;
  font-family: var(--kg-font-data);
  font-size: var(--kg-step--1);
  letter-spacing: 0.04em;
  color: var(--dimmer);
}
body.kg-store .woocommerce-ordering {
  float: none;
  margin: 0;
}
body.kg-store .woocommerce-ordering select {
  width: auto;
  min-width: 220px;
}

/* The grid, as the homepage's featured-merch grid: two columns on a phone, four from
   1000px, with a three-column step between that the homepage (four items, never more)
   did not need. Grid rather than WooCommerce's floats — and its clearfix pseudo-elements
   have to go, or they become the grid's first and last cells. */
body.kg-store ul.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 40px;
  padding: 0;
}
body.kg-store ul.products::before,
body.kg-store ul.products::after {
  display: none;
}
@media (min-width: 700px) {
  body.kg-store ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}
@media (min-width: 1000px) {
  body.kg-store ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
  }
}

/* The tile. Everything here is .tile from index.astro, applied to WooCommerce's markup:
   the border that turns gold on hover, the square image, the dashed seam, the body. */
body.kg-store ul.products[class*="columns-"] li.product,
body.kg-store ul.products li.product {
  position: relative;
  width: auto;
  float: none;
  clear: none;
  margin: 0;
  text-align: left;
  border: 1px solid var(--hair);
  transition: border-color var(--kg-dur-fast) var(--kg-ease-snap);
}
body.kg-store ul.products li.product:hover {
  border-color: var(--kg-gold);
}
body.kg-store ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
body.kg-store ul.products li.product a img {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: cover;
}
.tile__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  padding: 14px 16px 16px;
  border-top: 1px dashed rgba(244, 239, 228, 0.22);
}
/* Sentence case at 600, not the homepage tile's uppercase chip. Those four names are two
   or three words; the catalog's run to sixty characters ("Women's Racerback Crop Tank –
   Color Flash Logo + 1969"), which in letterspaced caps at chip size is four lines of
   shouting per tile. */
body.kg-store ul.products li.product .woocommerce-loop-product__title {
  margin: 0;
  padding: 0;
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--kg-bone);
  text-wrap: pretty;
}
body.kg-store ul.products li.product .price {
  display: block;
  margin: 0;
  margin-top: auto;
  font-family: var(--kg-font-data);
  font-weight: 400;
  font-size: var(--kg-step--1);
  letter-spacing: 0.04em;
  color: var(--kg-gold);
}
@media (max-width: 699px) {
  .tile__body {
    padding: 12px 12px 14px;
  }
  body.kg-store ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.86rem;
  }
}

body.kg-store span.onsale,
body.kg-store ul.products li.product .onsale {
  top: 10px;
  left: 10px;
  right: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 6px 9px;
  line-height: 1.2;
  color: var(--kg-bone);
  background: var(--kg-ember);
  border-radius: 2px;
  z-index: 1; /* WooCommerce's 9 would ride over the masthead; see the gallery trigger */
}

/* Prices, everywhere: data face, and a struck regular price that recedes. */
body.kg-store .price del {
  color: var(--dimmer);
  opacity: 1;
}
body.kg-store .price ins {
  text-decoration: none;
  font-weight: 400;
}

body.kg-store nav.woocommerce-pagination {
  text-align: left;
}
body.kg-store nav.woocommerce-pagination ul {
  display: inline-flex;
  gap: 8px;
  margin: 0;
  border: 0;
  white-space: normal;
}
body.kg-store nav.woocommerce-pagination ul li {
  float: none;
  border: 0;
  overflow: visible;
}
body.kg-store nav.woocommerce-pagination ul li :is(a, span) {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  font-family: var(--kg-font-data);
  font-size: var(--kg-step--1);
  color: var(--kg-bone);
  border: 1px solid var(--hair);
  border-radius: 2px;
}
body.kg-store nav.woocommerce-pagination ul li a:hover,
body.kg-store nav.woocommerce-pagination ul li a:focus {
  color: var(--kg-gold);
  background: transparent;
  border-color: var(--kg-gold);
}
body.kg-store nav.woocommerce-pagination ul li span.current {
  color: var(--kg-ink);
  background: var(--kg-gold);
  border-color: var(--kg-gold);
}

/* ------------------------------------------------------------------ single product */

body.kg-store div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
body.kg-store div.product > * {
  grid-column: 1 / -1;
}
body.kg-store div.product div.images,
body.kg-store div.product div.summary {
  float: none;
  width: auto;
  margin: 0;
}
@media (min-width: 900px) {
  body.kg-store div.product {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    column-gap: clamp(40px, 5vw, 72px);
  }
  body.kg-store div.product > div.images {
    grid-column: 1;
  }
  body.kg-store div.product > div.summary {
    grid-column: 2;
    /* The gallery is taller than the summary on most products; keeping the summary in
       view while the eye works down the thumbnails means the size picker and the button
       are never a scroll away. */
    position: sticky;
    top: calc(var(--masthead-h) + 24px);
  }
}

/* The gallery. One framed image, the thumbnail strip under it. */
body.kg-store div.product div.images .woocommerce-product-gallery__wrapper {
  border: 1px solid var(--hair);
}
body.kg-store div.product div.images .woocommerce-product-gallery__image > a > img {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  object-fit: cover;
}
body.kg-store div.product div.images .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}
body.kg-store div.product div.images .flex-control-thumbs li,
body.kg-store div.product div.images.woocommerce-product-gallery--columns-5 .flex-control-thumbs li {
  width: auto;
  float: none;
}
body.kg-store div.product div.images .flex-control-thumbs li img {
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--hair);
  opacity: 0.55;
  transition:
    opacity var(--kg-dur-fast) var(--kg-ease-snap),
    border-color var(--kg-dur-fast) var(--kg-ease-snap);
}
body.kg-store div.product div.images .flex-control-thumbs li img:hover,
body.kg-store div.product div.images .flex-control-thumbs li img.flex-active {
  opacity: 1;
  border-color: var(--kg-gold);
}
/* The zoom trigger. WooCommerce draws a magnifier out of two bordered pseudo-elements on
   a white disc; the disc goes ink and the glass goes bone. */
body.kg-store div.product div.images .woocommerce-product-gallery__trigger {
  top: 14px;
  right: 14px;
  /* WooCommerce stacks this at 99, which put it over the sticky masthead (3) on scroll and
     through the open phone menu (4). It only has to clear the image it sits on. */
  z-index: 1;
  background: rgba(14, 13, 12, 0.72);
  border: 1px solid var(--hair);
}
body.kg-store div.product div.images .woocommerce-product-gallery__trigger::before {
  border-color: var(--kg-bone);
}
body.kg-store div.product div.images .woocommerce-product-gallery__trigger::after {
  background: var(--kg-bone);
}

/* The summary. */
.product-eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
}
/* Anton, set well below the section display size. The names are long, and Anton is the
   one face narrow enough to carry sixty characters in two lines at this size — Hanken
   would take four. The uppercase transform is also what keeps it inside the caps-only
   subset fonts.css ships. */
body.kg-store div.product .product_title {
  margin: 0 0 18px;
  font-family: var(--kg-font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.55rem + 1.5vw, 3rem);
  line-height: var(--kg-lead-display);
  letter-spacing: var(--kg-track-display);
  text-transform: uppercase;
  text-wrap: balance;
}
body.kg-store div.product p.price,
body.kg-store div.product span.price {
  font-family: var(--kg-font-data);
  font-size: var(--kg-step-1);
  letter-spacing: 0.02em;
  color: var(--kg-gold);
}
body.kg-store div.product p.price {
  margin: 0 0 22px;
}
.woocommerce-product-details__short-description {
  max-width: var(--kg-measure-lede);
  margin-bottom: 24px;
  color: var(--dim);
  line-height: var(--kg-lead-body);
}

body.kg-store div.product form.cart {
  margin: 0;
  padding-top: 26px;
  border-top: 1px solid var(--hair);
}
body.kg-store div.product form.cart .variations {
  margin: 0 0 8px;
  border: 0;
}
body.kg-store div.product form.cart .variations :is(tbody, tr, th, td) {
  display: block;
  padding: 0;
  border: 0;
  line-height: 1.3;
  text-align: left;
}
body.kg-store div.product form.cart .variations td {
  padding-bottom: 18px;
}
/* Block, so "Clear" drops under the last select rather than riding beside it — WooCommerce
   prints it inside the same cell, and inline it sat off the select's baseline. */
body.kg-store div.product form.cart .variations select {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 380px;
  margin: 0;
}
body.kg-store div.product form.cart .reset_variations {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
}
body.kg-store div.product form.cart .reset_variations:hover {
  color: var(--kg-gold);
}
body.kg-store div.product .woocommerce-variation-price {
  margin-bottom: 14px;
}
body.kg-store div.product .stock,
body.kg-store div.product p.stock {
  margin: 0 0 14px;
  font-family: var(--kg-font-data);
  font-size: var(--kg-step--1);
  color: var(--dim);
}
body.kg-store div.product .stock.out-of-stock {
  color: var(--error-text);
}
body.kg-store div.product form.cart .woocommerce-variation-add-to-cart,
body.kg-store div.product form.cart:not(.variations_form) {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
body.kg-store div.product form.cart div.quantity {
  float: none;
  margin: 0;
}
body.kg-store .quantity .qty {
  width: 84px;
  min-height: 56px;
  padding: 0 8px;
  text-align: center;
  font-family: var(--kg-font-data);
}
body.kg-store div.product form.cart .button {
  float: none;
  flex: 1 1 220px;
}

/* Description, attributes, reviews. The tabs are eyebrow labels on the section's
   hairline, the current one underlined in gold — the store bar's pattern, one level down.
   WooCommerce builds its tabs from bordered list items and four pseudo-elements; all of
   that is taken back out. */
body.kg-store div.product .woocommerce-tabs {
  margin-top: clamp(24px, 4vw, 48px);
}
body.kg-store div.product .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 32px;
  margin: 0 0 28px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
body.kg-store div.product .woocommerce-tabs ul.tabs::before {
  border-bottom-color: var(--hair);
}
body.kg-store div.product .woocommerce-tabs ul.tabs li,
body.kg-store div.product .woocommerce-tabs ul.tabs li.active {
  flex: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
body.kg-store div.product .woocommerce-tabs ul.tabs li::before,
body.kg-store div.product .woocommerce-tabs ul.tabs li::after {
  display: none;
}
body.kg-store div.product .woocommerce-tabs ul.tabs li a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0;
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: var(--kg-step--1);
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
}
body.kg-store div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--kg-bone);
}
body.kg-store div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--kg-bone);
  box-shadow: inset 0 -2px 0 var(--kg-gold);
}
body.kg-store div.product .woocommerce-tabs .panel {
  max-width: var(--kg-measure);
  margin: 0;
  color: rgba(244, 239, 228, 0.8);
  line-height: var(--kg-lead-body);
}
body.kg-store div.product .woocommerce-tabs .panel > * + * {
  margin-top: 1em;
}

body.kg-store table.shop_attributes {
  border: 0;
  border-top: 1px solid var(--hair);
}
body.kg-store table.shop_attributes :is(th, td) {
  padding: 14px 16px 14px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  font-style: normal;
}
body.kg-store table.shop_attributes tr:nth-child(even) :is(th, td) {
  background: none;
}
body.kg-store table.shop_attributes th {
  width: 160px;
  font-weight: 600;
  font-size: var(--kg-step--1);
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
}
body.kg-store table.shop_attributes td p {
  padding: 0;
}

body.kg-store #reviews #comments h2,
body.kg-store #reviews .comment-reply-title {
  font-family: var(--kg-font-body);
  font-weight: 700;
  font-size: var(--kg-step-1);
}
body.kg-store #reviews #comment {
  height: auto;
}
body.kg-store p.stars a {
  color: var(--kg-gold);
}
body.kg-store .star-rating span::before,
body.kg-store .star-rating::before {
  color: var(--kg-gold);
}

/* Related products and upsells — a section of their own under the product, headed the
   way the homepage heads its sections. */
body.kg-store :is(.related, .upsells, .cross-sells) > h2 {
  margin: 0 0 24px;
  font-family: var(--kg-font-display);
  font-weight: 400;
  font-size: var(--kg-step-2);
  line-height: var(--kg-lead-display);
  letter-spacing: var(--kg-track-display);
  text-transform: uppercase;
}
body.kg-store div.product :is(.related, .upsells) {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--hair);
}

/* ------------------------------------------------------------------------ tables */

/* The cart, the checkout's order review, the order-received and account order tables. */
body.kg-store table.shop_table {
  width: 100%;
  margin: 0 0 32px;
  border: 1px solid var(--hair);
  border-collapse: collapse;
  border-radius: 0;
}
body.kg-store table.shop_table th {
  padding: 14px 16px;
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: var(--kg-step--1);
  line-height: 1.3;
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
}
body.kg-store table.shop_table td {
  padding: 16px;
  border-top: 1px solid var(--hair);
  vertical-align: middle;
}
body.kg-store table.shop_table :is(tfoot td, tfoot th, tbody th) {
  border-top: 1px solid var(--hair);
}
body.kg-store table.shop_table .amount {
  font-family: var(--kg-font-data);
  letter-spacing: 0.02em;
}
body.kg-store table.shop_table td.product-name a {
  color: var(--kg-bone);
  font-weight: 600;
}
body.kg-store table.shop_table td.product-name a:hover {
  color: var(--kg-gold);
}
/* "Color: Black / Size: XL" under a line item. */
body.kg-store table.shop_table td.product-name dl.variation,
body.kg-store .woocommerce-mini-cart dl.variation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--dim);
}
body.kg-store td.product-name dl.variation :is(dt, dd) {
  float: none;
  margin: 0;
  padding: 0;
}
body.kg-store td.product-name dl.variation dd p {
  margin: 0;
}

body.kg-store table.cart img,
body.kg-store.woocommerce-cart table.cart img {
  width: 84px;
  border: 1px solid var(--hair);
}
body.kg-store table.cart td.actions {
  padding: 18px 16px;
}
body.kg-store table.cart td.actions .coupon {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
body.kg-store table.cart td.actions .coupon .input-text {
  width: 200px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--field-border);
}
body.kg-store table.cart td.actions > .button {
  float: right;
}
/* WooCommerce colors this with !important in its own sheet, via --wc-red — which is why
   the variable at the top of this file is the way in, not a rule here. What is left to
   set is the shape: a square button, not a red disc. */
body.kg-store a.remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  font-weight: 400;
  border: 1px solid var(--hair);
  border-radius: 2px;
}
body.kg-store a.remove:hover {
  color: var(--kg-ink) !important; /* WooCommerce's own hover color is !important */
  background: var(--kg-gold);
  border-color: var(--kg-gold);
}

body.kg-store .cart-collaterals .cart_totals h2,
body.kg-store #order_review_heading,
body.kg-store .woocommerce-billing-fields > h3,
body.kg-store .woocommerce-shipping-fields > h3,
body.kg-store .woocommerce-additional-fields > h3,
body.kg-store .woocommerce-order-details__title,
body.kg-store .woocommerce-column__title,
body.kg-store .woocommerce-MyAccount-content h2,
body.kg-store .u-column1 > h2,
body.kg-store .u-column2 > h2 {
  margin: 0 0 18px;
  font-family: var(--kg-font-body);
  font-weight: 700;
  font-size: var(--kg-step-1);
  line-height: var(--kg-lead-subhead);
  letter-spacing: -0.01em;
}
body.kg-store .cart-collaterals .cart_totals table {
  margin-bottom: 20px;
}
body.kg-store .cart-collaterals .cart_totals .wc-proceed-to-checkout {
  padding: 0;
}
body.kg-store .cart-collaterals .cart_totals .wc-proceed-to-checkout a.checkout-button {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0 30px;
  font-size: var(--kg-step--1);
}
body.kg-store ul#shipping_method li {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
body.kg-store ul#shipping_method li label {
  display: inline;
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kg-bone);
}
body.kg-store .woocommerce-shipping-destination,
body.kg-store .woocommerce-shipping-calculator .shipping-calculator-button {
  font-size: 0.86rem;
  color: var(--dim);
}

/* The phone cart. WooCommerce's small-screen sheet turns each row into a stack of
   label: value pairs, labels from data-title. The labels take the eyebrow role. */
@media (max-width: 768px) {
  body.kg-store table.shop_table_responsive tr td::before {
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: var(--kg-track-eyebrow);
    text-transform: uppercase;
    color: var(--dim);
  }
  body.kg-store table.shop_table_responsive tr:nth-child(2n) td {
    background: none;
  }
  body.kg-store table.cart td.actions .coupon {
    flex-wrap: wrap;
  }
  body.kg-store table.cart td.actions .coupon .input-text {
    flex: 1 1 160px;
    width: auto;
  }
  body.kg-store table.cart td.actions > .button {
    float: none;
    width: 100%;
    margin-top: 10px;
  }
}

/* The empty cart. */
body.kg-store .cart-empty.woocommerce-info {
  font-size: 1.05rem;
}
body.kg-store .return-to-shop .button {
  margin-top: 4px;
}

/* ------------------------------------------------------------------------ checkout */

body.kg-store .woocommerce-form-coupon-toggle .woocommerce-info,
body.kg-store .woocommerce-form-login-toggle .woocommerce-info {
  margin-bottom: 20px;
}
body.kg-store form.checkout_coupon,
body.kg-store form.woocommerce-form-login {
  margin: 0 0 28px;
  padding: 24px;
  border: 1px solid var(--hair);
  border-radius: 0;
}

/* Details on the left, the order and payment on the right, from 1000px. The order column
   is the one a shopper checks against, so it stays in view. Below 1000px it all stacks in
   WooCommerce's own order: details, then order, then payment and the button. */
body.kg-store form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px clamp(40px, 5vw, 72px);
  align-items: start;
}
body.kg-store form.checkout > * {
  grid-column: 1 / -1;
}
body.kg-store #customer_details .col-1,
body.kg-store #customer_details .col-2 {
  float: none;
  width: auto;
}
body.kg-store #customer_details .col-2 {
  margin-top: 16px;
}
/* Four rows, placed explicitly. Row 1 is for the error notices WooCommerce inserts at the top
   of the form on a failed submit, so they stay above everything. The details column spans
   rows 2-4 while the order heading and table take 2 and 3, and row 4 is a 1fr track that
   exists to absorb the details column's extra height. Without it the grid shares that
   height between the rows the heading and table sit in, which opened a 100px gap between
   "Your order" and the table under it. */
@media (min-width: 1000px) {
  body.kg-store form.checkout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
  }
  body.kg-store form.checkout > .woocommerce-NoticeGroup {
    grid-row: 1;
  }
  body.kg-store form.checkout > #customer_details {
    grid-column: 1;
    grid-row: 2 / span 3;
  }
  body.kg-store form.checkout > #order_review_heading {
    grid-column: 2;
    grid-row: 2;
  }
  body.kg-store form.checkout > #order_review {
    grid-column: 2;
    grid-row: 3;
    position: sticky;
    top: calc(var(--masthead-h) + 24px);
  }
}
/* Space above the order when it stacks under the details; none beside them, where it
   lines up with "Billing details". */
body.kg-store #order_review_heading {
  margin-top: 16px;
}
@media (min-width: 1000px) {
  body.kg-store #order_review_heading {
    margin-top: 0;
  }
}

body.kg-store #payment,
body.kg-store.woocommerce-checkout #payment {
  background: var(--raised);
  border-radius: 0;
}
body.kg-store #payment ul.payment_methods {
  padding: 18px 20px;
  border-bottom: 1px solid var(--hair);
}
body.kg-store #payment ul.payment_methods li {
  line-height: 1.4;
}
body.kg-store #payment div.payment_box {
  margin: 12px 0 4px;
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--dim);
  background: rgba(244, 239, 228, 0.05);
  border-radius: 0;
}
body.kg-store #payment div.payment_box::before {
  border-bottom-color: rgba(244, 239, 228, 0.05);
}
body.kg-store #payment div.form-row {
  padding: 20px;
  margin: 0;
}
body.kg-store #payment #place_order {
  float: none;
  width: 100%;
  margin-top: 16px;
}
body.kg-store .woocommerce-privacy-policy-text,
body.kg-store .woocommerce-terms-and-conditions-wrapper {
  font-size: 0.86rem;
  line-height: var(--kg-lead-tight);
  color: var(--dim);
}
body.kg-store .woocommerce-privacy-policy-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Order received. */
body.kg-store ul.order_details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 0 0 32px;
  padding: 20px;
  border: 1px solid var(--hair);
  list-style: none;
}
body.kg-store ul.order_details::before,
body.kg-store ul.order_details::after {
  display: none;
}
body.kg-store ul.order_details li {
  float: none;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.72rem;
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
}
body.kg-store ul.order_details li strong {
  margin-top: 6px;
  font-family: var(--kg-font-data);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--kg-bone);
}

/* ------------------------------------------------------------------------- account */

body.kg-store .woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hair);
}
body.kg-store .woocommerce-MyAccount-navigation ul li a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 600;
  font-size: var(--kg-step--1);
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--hair);
}
body.kg-store .woocommerce-MyAccount-navigation ul li a:hover {
  color: var(--kg-bone);
}
body.kg-store .woocommerce-MyAccount-navigation ul li.is-active a {
  color: var(--kg-gold);
}
body.kg-store .woocommerce-MyAccount-content {
  line-height: var(--kg-lead-body);
}
body.kg-store .woocommerce-MyAccount-content > p + p {
  margin-top: 1em;
}
body.kg-store .woocommerce-MyAccount-content a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 767px) {
  body.kg-store .woocommerce-MyAccount-navigation {
    margin-bottom: 32px;
  }
}

body.kg-store form.login,
body.kg-store form.register,
body.kg-store form.lost_reset_password {
  max-width: 480px;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--hair);
  border-radius: 0;
}
/* "Remember me" and the button share one paragraph in WooCommerce's markup, the button
   floated beside a checkbox that sat top-aligned to it. Stacked instead: the choice, then
   the action. */
body.kg-store form.login .form-row:has(.woocommerce-form-login__submit) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
/* WooCommerce's clearfix pseudo-elements on .form-row become flex items here, and the
   gap after the empty ::before was pushing the button 18px off the left edge. */
body.kg-store form.login .form-row:has(.woocommerce-form-login__submit)::before,
body.kg-store form.login .form-row:has(.woocommerce-form-login__submit)::after {
  display: none;
}
body.kg-store form.login .woocommerce-form-login__rememberme {
  order: -1;
  flex-basis: 100%;
  margin: 0;
}
body.kg-store form.login .woocommerce-form-login__submit {
  float: none;
  margin: 0;
}
body.kg-store .woocommerce-LostPassword {
  margin-top: 16px;
  font-size: 0.9rem;
}
body.kg-store .woocommerce-address-fields,
body.kg-store address {
  font-style: normal;
  line-height: var(--kg-lead-body);
}

/* ------------------------------------------------------------------------- prose */

/* The policy pages. The site's reading measure and paragraph rhythm; shell.css zeroes
   paragraph margins everywhere, which is right for its components and wrong for a returns
   policy, so the rhythm comes back here and only here. */
.kg-prose {
  max-width: var(--kg-measure);
  font-size: var(--kg-step-0);
  line-height: var(--kg-lead-body);
  color: rgba(244, 239, 228, 0.8);
}
.kg-prose > * + * {
  margin-top: 1em;
}
.kg-prose :is(h2, h3, h4) {
  margin-top: 2em;
  font-family: var(--kg-font-body);
  font-weight: 700;
  line-height: var(--kg-lead-subhead);
  color: var(--kg-bone);
}
.kg-prose h2 {
  font-size: var(--kg-step-1);
}
.kg-prose :is(h3, h4) {
  font-size: var(--kg-step-0);
}
.kg-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kg-prose :is(ul, ol) {
  padding-left: 1.2em;
}
.kg-prose li + li {
  margin-top: 0.4em;
}
.kg-prose strong {
  color: var(--kg-bone);
}

/* --------------------------------------------------------------------------- 404 */

.missing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  min-height: 60vh;
  justify-content: center;
}
.missing__code {
  font-size: clamp(7rem, 22vw, 15rem);
}
.missing__lede {
  color: var(--dim);
}
.missing__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}
.missing__link {
  color: var(--kg-bone);
  border-bottom: 1px solid rgba(244, 239, 228, 0.38);
}
.missing__link:hover {
  color: var(--kg-gold);
  border-bottom-color: var(--kg-gold);
}

/* ------------------------------------------------------------------------ loading */

/* The overlay WooCommerce lays over the cart and checkout while it recalculates. jQuery
   BlockUI writes a white background and its opacity as inline styles, and inline styles
   are the one thing a stylesheet can only beat with !important. White at 0.6 over ink is a
   grey flash on every quantity change. */
.blockUI.blockOverlay {
  background: var(--kg-ink) !important;
  opacity: 0.6 !important;
}
