/* ===================================================================
   Kasbah Brass — skin for the WooCommerce pages under /shop/
   Cart, checkout, order received and account. Loaded by the mu-plugin
   kasbah-shop-skin.php together with tokens.css, so every colour and
   type step here is the same variable the static site uses.
   The default Twenty Twenty-Five chrome is hidden and replaced with
   our own masthead, so a visitor never leaves the brand at checkout.
   =================================================================== */

/* ── chrome ───────────────────────────────────────────────────── */
/* the theme parts sit inside .wp-site-blocks, not directly under body —
   match them by class so nesting cannot matter */
header.wp-block-template-part,
footer.wp-block-template-part,
.wp-site-blocks > header,
.wp-site-blocks > footer{display:none!important}
.kb-mast,.kb-foot{display:block!important}

body{
  background:var(--ink-900)!important;
  color:var(--paper)!important;
  font-family:var(--body)!important;
  font-size:var(--step-0);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

/* our masthead, injected at wp_body_open */
.kb-mast{position:sticky;top:0;z-index:60;
  background:color-mix(in srgb,var(--ink-900) 88%,transparent);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line)}
.kb-mast__in{max-width:var(--maxw);margin-inline:auto;padding:1.05rem var(--gutter);
  display:flex;align-items:center;justify-content:space-between;gap:1.5rem}
.kb-mast a{text-decoration:none}
.kb-brand{display:inline-flex;align-items:center;gap:.62em;color:var(--paper)}
.kb-brand svg{width:1.75em;height:1.75em;flex:none;overflow:visible}
.kb-brand__txt{font-family:var(--body);font-size:.78rem;letter-spacing:.34em;
  text-transform:uppercase;font-weight:500;line-height:1}
.kb-brand__txt i{font-style:normal;color:var(--gold);margin-left:.1em}
.kb-mast__back{font-size:var(--step--1);letter-spacing:.14em;text-transform:uppercase;
  color:var(--paper-dim);border-bottom:1px solid transparent;transition:color .25s,border-color .25s}
.kb-mast__back:hover{color:var(--brass);border-bottom-color:var(--brass)}

.kb-foot{border-top:1px solid var(--line);margin-top:clamp(3rem,8vw,6rem)}
.kb-foot__in{max-width:var(--maxw);margin-inline:auto;padding:1.6rem var(--gutter);
  display:flex;flex-wrap:wrap;gap:1rem 2rem;justify-content:space-between;
  font-size:var(--step--1);color:var(--paper-faint);letter-spacing:.04em}

/* ── page shell ───────────────────────────────────────────────── */
.wp-site-blocks > *{background:transparent}
main.wp-block-group,
.wp-block-post-content{max-width:var(--maxw)!important;margin-inline:auto!important;
  padding-inline:var(--gutter)!important}

.wp-block-post-title,h1.entry-title{
  font-family:var(--display)!important;font-weight:300!important;
  font-size:var(--step-3)!important;line-height:1.05!important;
  color:var(--paper)!important;letter-spacing:-.01em;
  padding-bottom:clamp(1rem,2.2vw,1.7rem);border-bottom:1px solid var(--line);
  margin-block:clamp(2rem,5vw,3.4rem) clamp(1.6rem,3vw,2.4rem)!important}

h2,h3,.wc-block-components-title{font-family:var(--display)!important;font-weight:300!important;
  color:var(--paper)!important}
a{color:inherit}
a:hover{color:var(--brass)}
hr,.wp-block-separator{border-color:var(--line)}

/* ── buttons ──────────────────────────────────────────────────── */
.wc-block-components-button:not(.is-link),
.wp-element-button,.wp-block-button__link{
  font-family:var(--body)!important;font-size:var(--step--1)!important;
  letter-spacing:.14em!important;text-transform:uppercase!important;font-weight:500!important;
  background:var(--brass)!important;color:var(--ink-900)!important;
  border:1px solid var(--brass)!important;border-radius:0!important;
  padding:1rem 1.6rem!important;transition:opacity .25s var(--ease)!important}
.wc-block-components-button:not(.is-link):hover,
.wp-element-button:hover,.wp-block-button__link:hover{opacity:.88!important}
.wc-block-components-button.outlined,
.wc-block-components-button--outlined{
  background:transparent!important;color:var(--brass)!important;border-color:var(--brass)!important}
.wc-block-components-button.is-link{color:var(--brass)!important;text-decoration:none;
  border-bottom:1px solid var(--brass)}

/* ── cart ─────────────────────────────────────────────────────── */
.wc-block-cart,.wp-block-woocommerce-cart{color:var(--paper)}
.wc-block-cart__empty-cart__title{font-family:var(--display)!important;font-weight:300!important;
  font-size:var(--step-2)!important;color:var(--paper)!important}
/* the stock empty-cart emoji does not belong here */
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before{display:none!important}

.wc-block-cart-items,.wc-block-cart-items__header{border-color:var(--line)!important}
.wc-block-cart-items__header{font-family:var(--body);font-size:var(--step--1);
  letter-spacing:.18em;text-transform:uppercase;color:var(--paper-faint)!important;
  border-bottom:1px solid var(--line)!important}
.wc-block-cart-items__row{border-bottom:1px solid var(--line)!important}
.wc-block-cart-item__image img{border:1px solid var(--line)}
.wc-block-components-product-name{font-family:var(--display)!important;
  font-size:var(--step-0)!important;color:var(--paper)!important;text-decoration:none!important}
.wc-block-components-product-name:hover{color:var(--brass)!important}
.wc-block-components-product-metadata,
.wc-block-components-product-metadata__description{color:var(--paper-dim)!important;
  font-size:var(--step--1)!important}
.wc-block-components-product-price__value,
.wc-block-components-formatted-money-amount{color:var(--brass)!important;
  letter-spacing:.04em;font-variant-numeric:tabular-nums}

.wc-block-components-quantity-selector{border:1px solid var(--line)!important;border-radius:0!important;
  background:transparent!important}
.wc-block-components-quantity-selector__input{background:transparent!important;color:var(--paper)!important}
.wc-block-components-quantity-selector__button{color:var(--paper-dim)!important;background:transparent!important}
.wc-block-components-quantity-selector__button:hover{color:var(--brass)!important}

.wc-block-cart__sidebar .wc-block-components-sidebar,
.wc-block-components-sidebar{background:var(--ink-850)!important;
  border:1px solid var(--line);padding:clamp(1.2rem,2.4vw,1.8rem)!important}
.wc-block-components-totals-wrapper{border-color:var(--line)!important}
.wc-block-components-totals-item__label{color:var(--paper-dim)!important}
.wc-block-components-totals-item__value{color:var(--paper)!important;font-variant-numeric:tabular-nums}
.wc-block-components-totals-footer-item{border-top:1px solid var(--line)!important}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value{
  font-family:var(--display)!important;font-size:var(--step-1)!important;color:var(--brass)!important}

.wc-block-components-panel__button{color:var(--paper-dim)!important;font-size:var(--step--1)!important;
  letter-spacing:.1em;text-transform:uppercase}
.wc-block-components-panel__button:hover{color:var(--brass)!important}

/* ── forms: checkout and account ──────────────────────────────── */
.wc-block-components-text-input input,
.wc-block-components-textarea,select,input[type=text],input[type=email],
input[type=tel],input[type=password],input[type=search]{
  background:var(--ink-850)!important;color:var(--paper)!important;
  border:1px solid var(--line)!important;border-radius:0!important;
  font-family:var(--body)!important;font-size:var(--step-0)!important}
.wc-block-components-text-input input:focus,select:focus,
input:focus,textarea:focus{outline:none!important;border-color:var(--brass)!important;
  box-shadow:0 0 0 1px var(--brass)!important}
.wc-block-components-text-input label,
label,.wc-block-components-checkout-step__title{color:var(--paper-dim)!important}
.wc-block-components-checkout-step__title{font-family:var(--display)!important;
  font-size:var(--step-1)!important;color:var(--paper)!important}
.wc-block-components-checkout-step__description,
.wc-block-components-checkout-step__heading-content{color:var(--paper-faint)!important}
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option{border-color:var(--line)!important}
.wc-block-components-radio-control__option--checked-option-highlighted{
  border-color:var(--brass)!important}
.wc-block-checkout__sidebar .wc-block-components-sidebar{background:var(--ink-850)!important}

/* ── notices ──────────────────────────────────────────────────── */
.wc-block-components-notice-banner{border-radius:0!important;
  border:1px solid var(--line)!important;background:var(--ink-850)!important;color:var(--paper)!important}
.wc-block-components-notice-banner.is-error{border-color:#c0574b!important}
.wc-block-components-notice-banner.is-success{border-color:var(--green)!important}

/* ── the product grid Woo drops on the empty cart ──────────────
   Rebuilt to match the cards on the rest of the site: no button, the
   long SEO name split into a short name plus a descriptor line, and
   the price sitting on the name's baseline. The split is done by the
   small script in kasbah-shop-skin.php, because CSS cannot cut a text
   node at an em dash. */
.wc-block-grid__product-add-to-cart{display:none!important}
.kb-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:.7rem;
  align-items:baseline;padding:1rem .1rem 0;margin-top:1rem;
  border-top:1px solid var(--line)}
.kb-meta .wc-block-grid__product-title{margin:0!important;
  font-family:var(--display)!important;font-weight:300!important;
  font-size:var(--step-1)!important;line-height:1.15!important;color:var(--paper)!important}
.kb-meta .wc-block-grid__product-title a{text-decoration:none!important;color:inherit!important}
.wc-block-grid__product:hover .wc-block-grid__product-title a{color:var(--brass)!important;
  transition:color .35s var(--ease)}
.kb-meta .wc-block-grid__product-price{margin:0!important;
  font-family:var(--body)!important;font-size:var(--step--1)!important;
  letter-spacing:.06em;color:var(--brass)!important;white-space:nowrap}
.kb-desc{grid-column:1/-1;font-family:var(--body);font-size:var(--step--1);
  line-height:1.4;color:var(--paper-faint);margin:.35rem 0 0}
.kb-note{font-size:var(--step--1);color:var(--paper-faint);letter-spacing:.04em;
  padding:.35rem .1rem 0;margin:0}

/* ── the related-products grid Woo drops on the empty cart ────── */
.wc-block-grid__product{text-align:left}
.wc-block-grid__product-image img{border:1px solid var(--line)}
.wc-block-grid__product-title{font-family:var(--display)!important;
  font-size:var(--step-0)!important;color:var(--paper)!important}
.wc-block-grid__product-title a{text-decoration:none!important}
.wc-block-grid__product-price{color:var(--brass)!important}
.wp-block-group > h2.wp-block-heading{font-family:var(--display)!important;
  font-weight:300!important;font-size:var(--step-2)!important;color:var(--paper)!important}


/* ── empty cart: the stock block has almost no vertical rhythm ──── */
.wp-block-woocommerce-empty-cart-block,
.wc-block-cart__empty-cart__title{text-align:center}
.wc-block-cart__empty-cart__title{margin-block:clamp(2.5rem,6vw,4.5rem) 1rem!important}
.wp-block-woocommerce-empty-cart-block > p,
.wp-block-woocommerce-empty-cart-block > .wp-block-paragraph{
  color:var(--paper-dim)!important;margin-block:0 clamp(2rem,5vw,3.2rem)!important}
/* only the "Browse store" line — this block also contains the product grid,
   and styling every <a> in it painted brass text onto brass buttons */
.wp-block-woocommerce-empty-cart-block > p a{color:var(--brass)!important;
  text-decoration:none;border-bottom:1px solid var(--brass);
  font-size:var(--step--1);letter-spacing:.14em;text-transform:uppercase}
.wp-block-woocommerce-empty-cart-block a.wp-block-button__link{
  color:var(--ink-900)!important;border-bottom:0!important}
.wc-block-grid__product-title a,.wc-block-grid__product-link{
  text-transform:none!important;letter-spacing:normal!important;
  border-bottom:0!important;color:var(--paper)!important;
  font-size:var(--step-0)!important;font-family:var(--display)!important}
.wc-block-grid__product-title a:hover{color:var(--brass)!important}
.wp-block-woocommerce-empty-cart-block .wp-block-separator{
  margin-block:clamp(2rem,5vw,3.4rem)!important;border-color:var(--line)!important;opacity:1}
.wp-block-woocommerce-empty-cart-block h2,
.wp-block-woocommerce-empty-cart-block .wp-block-heading{
  margin-block:clamp(2.4rem,5vw,3.6rem) clamp(1.4rem,3vw,2rem)!important;text-align:left}

/* ── the related grid, closer to our product cards ─────────────── */
.wc-block-grid__products{gap:clamp(1.2rem,2.4vw,2.2rem)!important}
.wc-block-grid__product{margin:0!important;padding:0!important}
.wc-block-grid__product-image{margin-bottom:.9rem!important}
.wc-block-grid__product-title{line-height:1.25!important;margin-bottom:.35rem!important}
.wc-block-grid__product-price{display:block;font-size:var(--step--1)!important;
  margin-bottom:.9rem!important;letter-spacing:.06em}
.wc-block-grid__product-add-to-cart .wp-block-button__link{width:100%;text-align:center}

/* The "View cart" link Woo puts inside the added-to-cart banner.
   store-notices.css claims it with
     .wc-block-components-notice-banner > ...__content .wc-forward
       { color:#2f2f2f!important; opacity:.7 }
   — three classes, and that sheet is enqueued after this one, so it wins
   any tie. The [class] below is a fourth class-weight token that costs
   nothing and outranks it. Near-black at .7 on our dark ground was
   invisible; it is a link, not a call to action, so it reads as one. */
.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a.wc-forward,
.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a.wp-element-button,
.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a{
  background:transparent!important;border:0!important;box-shadow:none!important;
  padding:0!important;opacity:1!important;
  color:var(--brass)!important;-webkit-text-fill-color:var(--brass)!important;
  font-family:var(--body)!important;font-size:var(--step--1)!important;
  letter-spacing:.12em!important;text-transform:uppercase!important;
  text-decoration:underline!important;text-underline-offset:.3em!important}
.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a:hover{
  opacity:.72!important;text-decoration:none!important}
.wc-block-components-notice-banner:focus,
.wc-block-components-notice-banner:focus-visible{outline:1px solid var(--brass)!important;
  outline-offset:2px!important}

/* ── checkout order summary ───────────────────────────────────────
   The names are long SEO titles in a narrow column; set in the display
   face they ran to five lines each and buried the totals. Body face,
   one step down, and the catalogue blurb dropped. */
.wc-block-components-order-summary-item__description .wc-block-components-product-name{
  font-family:var(--body)!important;font-size:var(--step--1)!important;
  line-height:1.45!important;color:var(--paper)!important}
.wc-block-components-order-summary-item__description
  .wc-block-components-product-metadata__description{display:none!important}

/* "Order summary" came out in the body face while every other heading on
   the page is in the display face. */
.wc-block-components-checkout-order-summary__title,
.wc-block-components-checkout-order-summary__title-text{
  font-family:var(--display)!important;font-weight:300!important;
  font-size:var(--step-1)!important;letter-spacing:0!important;
  text-transform:none!important;color:var(--paper)!important}

.kb-foot__social{display:inline-flex;gap:0 1.05rem;flex-wrap:wrap;align-items:center}
.kb-foot__social a{display:inline-flex;color:var(--paper-faint);padding:.2rem .15rem;
  transition:color .35s var(--ease),translate .35s var(--ease)}
.kb-foot__social a:hover{color:var(--brass);translate:0 -2px}
.kb-foot__social svg{width:18px;height:18px;display:block}
