/*
Theme Name: BLK SHP Catalogue
Description: A monochrome tattoo needle catalogue and WooCommerce storefront.
Version: 2.0.41
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blkshp-catalogue
*/
:root {
  --ink: #060607;
  --muted: #545554;
  --paper: #fff;
  --soft: #efefee;
  --line: #c4c4c4;
  --gutter: clamp(20px, 4vw, 56px);
  --page: 1440px;
  --copy: 592px;
  --panel: 544px;
  --header: 72px;
  --body: 14px;
  --small: 11px;
  --display: 34px;
  --s1: 6px;
  --s2: 12px;
  --s3: 16px;
  --s4: 24px;
  --s5: 32px;
  --s6: 48px;
  --s7: 80px;
  --rule: 1px solid var(--line);
  --font: Arial, Helvetica, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body)/20px var(--font); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { appearance: none; border: 0; border-radius: 0; padding: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }
.page-width { width: min(100%, var(--page)); margin-inline: auto; padding-inline: var(--gutter); }
.small { font-size: var(--small); line-height: 1.4; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; }
.muted { color: var(--muted); }
.display { font-size: var(--display); font-weight: 400; line-height: .98; letter-spacing: -.055em; }
/* Full-width sticky header, with the original content grid retained. */
:root {
  --header-text-size: var(--header-size, var(--display));
  --header-height: max(var(--header), calc(var(--header-text-size) + 1px));
  --admin-offset: 0px;
  --header-sticky-top: 0px;
}
body.admin-bar { --admin-offset: 32px; --header-sticky-top: 32px; }
.site-header {
  position: sticky;
  top: var(--header-sticky-top);
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--header-height);
  padding-inline: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
  gap: var(--s2);
  border-bottom: 1px solid var(--hdr-line, var(--line));
  background: var(--hdr-bg, var(--paper));
  color: var(--hdr-fg, var(--ink));
}
@media (max-width: 782px) {
  body.admin-bar { --admin-offset: 46px; --header-sticky-top: 46px; }
}
@media (max-width: 600px) {
  body.admin-bar { --header-sticky-top: 0px; }
}
@media (max-width: 700px) {
  :root { --header-text-size: var(--header-mobile-size, var(--header-size, var(--display))); }
}
@media (max-width: 355px) {
  :root { --header-text-size: var(--header-mobile-size, var(--body)); }
}
.brand { display: flex; min-width: 0; align-items: center; gap: var(--s2); text-decoration: none; line-height: 1; }
.brand strong { font-family: var(--header-font, var(--font)); font-weight: var(--header-weight, 700); font-size: var(--header-text-size); letter-spacing: -.07em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline-end: 4px; min-width: 0; }
.site-header .brand, .site-header .brand strong { text-shadow: none; filter: none; -webkit-text-stroke: 0; -webkit-font-smoothing: antialiased; }
.brand small { flex: none; color: var(--muted); }
.cart-trigger { text-decoration: none; display: flex; flex: none; align-items: center; gap: var(--s2); min-height: 44px; }
.cart-trigger svg { width: 20px; height: 20px; flex: none; }
/* The first screen contains only the header and the full-bleed photograph. */
.hero-visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  height: max(0px, calc(100vh - var(--header-height) - var(--admin-offset)));
  height: max(0px, calc(100svh - var(--header-height) - var(--admin-offset)));
}
#hero picture { display: block; width: 100%; height: 100%; }
/* Hero overlay: independent horizontal, vertical and font controls. */
.hero-overlay { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; justify-items: end; padding: 28px max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter))) 88px; pointer-events: none; }
.hero-overlay-inner { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: var(--s3); text-align: right; min-width: 0; max-width: 65%; max-height: 100%; }
.hero-overlay img { display: block; width: auto; height: auto; max-width: min(100%, var(--overlay-width, 320px)); max-height: min(35svh, 320px); object-fit: contain; flex-shrink: 1; }
.hero-overlay-text { margin: 0; color: var(--overlay-color, #060607); font-size: var(--overlay-desktop-size, 34px); line-height: .94; font-weight: var(--overlay-weight, 800); letter-spacing: -.035em; white-space: pre-line; overflow-wrap: anywhere; max-width: 100%; }
.hero-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 25% bottom; background: var(--soft); }
@media (min-width: 901px) {
  .hero-desktop-left { justify-items: start; }
  .hero-desktop-left .hero-overlay-inner { align-items: flex-start; text-align: left; }
  .hero-desktop-center { justify-items: center; }
  .hero-desktop-center .hero-overlay-inner { align-items: center; text-align: center; }
  .hero-desktop-v-top { align-items: start; }
  .hero-desktop-v-center { align-items: center; }
  .hero-desktop-v-bottom { align-items: end; }
  .hero-overlay.hero-coordinates-desktop { display: block; padding: 0; }
  .hero-coordinates-desktop .hero-overlay-inner { position: absolute; top: var(--overlay-top-desktop, 28%); left: var(--overlay-left-desktop, 56%); width: max-content; max-width: calc(100% - var(--overlay-left-desktop, 56%) - 4%); max-height: none; }
}
@media (max-width: 900px) {
  .hero-image { object-position: center bottom; }
  .hero-overlay { align-items: start; justify-items: start; padding: clamp(24px, 5svh, 48px) var(--gutter) 72px; }
  .hero-overlay .hero-overlay-inner { align-items: flex-start; text-align: left; max-width: 100%; }
  .hero-overlay.hero-mobile-h-center { justify-items: center; }
  .hero-overlay.hero-mobile-h-center .hero-overlay-inner { align-items: center; text-align: center; }
  .hero-overlay.hero-mobile-h-right { justify-items: end; }
  .hero-overlay.hero-mobile-h-right .hero-overlay-inner { align-items: flex-end; text-align: right; }
  .hero-overlay.hero-mobile-center { align-items: center; }
  .hero-overlay.hero-mobile-bottom { align-items: end; }
  .hero-overlay-text { font-size: var(--overlay-mobile-size, 40px); }
  .hero-overlay.hero-coordinates-mobile { display: block; padding: 0; }
  .hero-overlay.hero-coordinates-mobile .hero-overlay-inner { position: absolute; top: var(--overlay-top-mobile, 6%); left: var(--overlay-left-mobile, 6%); width: max-content; max-width: calc(100% - var(--overlay-left-mobile, 6%) - 6%); max-height: none; }
}
@media (max-width: 700px) {
  .hero-overlay { padding-top: 20px; }
  .hero-overlay-text { line-height: .95; }
}
.hero-caption { display: flex; justify-content: space-between; gap: var(--s4); color: var(--muted); padding-block: var(--s2); }
#hero, .specifications { border-bottom: var(--rule); }
.config { padding-block: var(--s7); }
.specifications-note { margin-top: var(--s2); overflow-wrap: anywhere; }
.config-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.config-table { width: 100%; border-collapse: collapse; text-align: left; }
/* Catalogue */
.config-table :is(th, td) { padding: var(--s2) var(--s2) var(--s2) 0; }
.config-table thead th { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: var(--small); }
.config-table tbody tr + tr { border-top: 1px solid var(--soft); }
.config-table tbody { border-block: var(--rule); }
.config-table :is(th, td):last-child { padding-right: 0; text-align: right; }
.config-table th { font-weight: 400; }
.config-table tbody th { width: 30%; }
.config-select { width: 100%; min-width: 0; }
.config-table .add:disabled { opacity: .5; }
.config-table .qty { width: 4em; text-align: center; }
.add, .cart-close { min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.add:hover, .cart-close:hover { background: var(--soft); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); border-top: var(--rule); padding-block: var(--s4); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--s3); padding: 0; margin: 0; list-style: none; }
.site-footer p { margin-inline-start: auto; }

/* WooCommerce and the native dialog. */
.cart-panel { position: fixed; inset: 0 0 0 auto; width: min(100%, var(--panel)); max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; border-left: var(--rule); padding: var(--s4); color: var(--ink); background: var(--paper); }
.cart-panel[open] { display: flex; flex-direction: column; animation: cart-enter .16s ease-out; }
.cart-panel::backdrop { background: rgb(0 0 0 / .22); }
@keyframes cart-enter { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .cart-panel[open] { animation: none; } }
body:has(.cart-panel[open]) { overflow: hidden; }
.cart-header { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); border-bottom: var(--rule); padding-bottom: var(--s2); }
.catalogue-cart-error:not(:empty) { padding-block: var(--s2); }
.cart-title-count .blkshp-cart-count::before { content: "("; }
.cart-title-count .blkshp-cart-count::after { content: ")"; }
.cart-items { flex: 1; min-height: 0; overflow: auto; padding-top: var(--s3); }
.store-page { padding-block: var(--s6); }
.store-page h1, .store-page .entry-content > p { margin-bottom: var(--s4); }
.checkout-panel { width: min(100%, 860px); margin-inline: auto 0; border-inline-start: var(--rule); }
.checkout-panel .display { margin-top: var(--s4); }
body :is(.woocommerce, .woocommerce-page, .cart-panel, .checkout-panel) :is(input, select, textarea, .button, button, table.shop_table, a.remove, #payment, .payment_box, .wc-block-components-button) { border-radius: 0; box-shadow: none; }
body :is(.woocommerce, .cart-panel) :is(a.button, button.button, input.button) { background: var(--ink); color: var(--paper); }
body :is(.woocommerce, .cart-panel) :is(a.button, button.button, input.button):hover { background: var(--muted); color: var(--paper); }
.woocommerce :is(.woocommerce-info, .woocommerce-error, .woocommerce-message) { border-top-color: var(--ink); }
.woocommerce :is(.woocommerce-info, .woocommerce-error, .woocommerce-message)::before { color: var(--ink); }
input, select, textarea { font: inherit; color: inherit; border: var(--rule); border-radius: 0; padding: var(--s1); background: var(--paper); max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.screen-reader-text:focus { z-index: 1000; inset: var(--s2) auto auto var(--s2); width: auto; height: auto; padding: var(--s2); clip-path: none; background: var(--paper); }
.entry-content { overflow-wrap: anywhere; }
.entry-content img { max-width: 100%; height: auto; }
@media (max-width: 700px) {
  .config-table:not(.table-scroll .config-table) { table-layout: fixed; }
  .config-table :is(th, td) { padding-right: var(--s1); overflow-wrap: anywhere; }
  .cart-panel, .checkout-panel { border-inline-start: 0; }
  .site-footer { flex-direction: column; }
  .site-footer p { margin-inline-start: 0; }
}
@media (max-width: 355px) {
  .brand, .cart-trigger { gap: var(--s1); }
}


.config-table :is(td, th) { padding-block: var(--s3); }
.config-table thead th { padding-top: 0; padding-bottom: var(--s2); }
.config-table tbody tr + tr { border-top-color: var(--line); }
.config-name { font-weight: 700; }
.config-add { padding-block: var(--s1); border-bottom: var(--rule); }
.quantity-control { display: inline-grid; grid-template-columns: repeat(3, 34px); align-items: center; text-align: center; border: var(--rule); }
.quantity-control button { min-height: 36px; }
.quantity-control button:hover, .config-add:hover { background: var(--soft); }
.table-scroll + p { margin-top: var(--s2); }
.site-footer > p:last-child { margin-inline-start: auto; }

.cart-panel[aria-hidden] { z-index: 11; display: flex; flex-direction: column; transform: translateX(100%); }
.cart-panel.is-open { transform: none; }
.cart-backdrop { position: fixed; inset: 0; z-index: 10; background: rgb(0 0 0 / .22); }
body:has(.cart-panel.is-open) { overflow: hidden; }
.cart-header .display { margin-top: var(--s1); }
.cart-summary { border-top: var(--rule); padding-top: var(--s3); }
.cart-total { display: flex; justify-content: space-between; line-height: 18.3px; }
.cart-summary p { margin-block: var(--s2); }
.checkout-button { width: 100%; min-height: 44px; background: var(--soft); color: var(--muted); }

@media (max-width: 700px) {
  .config-heading { flex-direction: column; gap: var(--s3); }
  .table-scroll thead { position: absolute; clip-path: inset(50%); }
  .table-scroll .config-table tbody { display: block; }
  .table-scroll .config-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); padding-block: var(--s4); }
  .table-scroll .config-table td { padding: 0; text-align: left; }
  .table-scroll .config-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--small); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--s1); }
  .table-scroll .config-table td:last-child { grid-column: 1 / -1; }
  .site-footer > p:last-child { margin-inline-start: 0; }
}

.site-header { gap: 6px; }
.hero-caption { column-gap: var(--s3); }
.table-scroll thead { border-top: var(--rule); }
.table-scroll .config-table thead th { padding-block: var(--s2); }
.table-scroll + p { margin-top: 0; }
.site-footer > p:last-child { margin-inline-start: 0; }
.cart-panel[aria-hidden] .cart-header { padding-bottom: var(--s4); }
.cart-panel[aria-hidden] .cart-items { flex: 0 1 auto; padding-block: var(--s4); }
.cart-summary { margin-top: auto; }
.cart-panel[aria-hidden] .cart-close { text-transform: uppercase; }
.cart-summary p { margin-block: var(--s3); }
.checkout-button { text-transform: uppercase; letter-spacing: .1em; }

@media (max-width: 700px) {
  .table-scroll { margin-top: 5px; }
  .table-scroll .config-table tr { padding-block: var(--s3); gap: 5px; }
  .table-scroll .config-table td::before { margin-bottom: 0; }
  .table-scroll .config-table tbody { border-top: 0; }
  .table-scroll + p { margin-top: 9px; }
}

@media (min-width: 701px) {
  .config:has(.table-scroll) .config-heading { margin-bottom: 20px; }
}

.config-table a.add { display: inline-flex; align-items: center; }

.specifications .config-table { table-layout: fixed; overflow-wrap: anywhere; }
.specifications thead th { color: var(--ink); }
.specifications thead th:first-child { width: 30%; }
.specifications thead th:last-child { width: 24%; }

.catalogue-intro { padding-block: var(--s7); }
.catalogue-intro-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s6);
}
.catalogue-intro-copy #catalogue-title { margin-top: var(--s2); }
.catalogue-intro-description { max-width: var(--copy); }
.catalogue-intro-description > * + * { margin-top: var(--s3); }
.catalogue-intro-description ul, .catalogue-intro-description ol { padding-inline-start: 1.4em; }
.catalogue-intro-description ul { list-style: disc; }
.catalogue-intro-description ol { list-style: decimal; }
.catalogue-intro-description strong { font-weight: 700; }
.catalogue-intro-description em { font-style: italic; }
.catalogue-intro-description a { text-decoration: underline; }
.catalogue-intro-description h3, .catalogue-intro-description h4, .catalogue-intro-description h5, .catalogue-intro-description h6 { font-size: 1em; font-weight: 700; }
.catalogue-overview { border-block: var(--rule); }
.catalogue-overview .specifications { min-width: 0; border-bottom: 0; }
.specifications summary {
  padding-block: var(--s2);
  cursor: pointer;
  font-size: var(--body);
}
.specifications:not([open]) > :not(summary) { display: none; }
.specifications[open] { padding-bottom: var(--s4); }
.cart-panel[aria-hidden] .cart-empty,
.cart-panel[aria-hidden] .cart-summary p { color: var(--muted); }

@media (max-width: 700px) {
  .catalogue-intro { padding-block: var(--s6); }
  .catalogue-intro-copy { grid-template-columns: 1fr; gap: var(--s4); }
  .catalogue-intro-description p + p { margin-top: 21px; }
  .table-scroll .config-table tr[data-preview-configuration] {
    gap: 5px var(--s3);
    padding-block: var(--s3);
  }
  .cart-panel[aria-hidden] .cart-header .display { margin-top: var(--s2); }
  .cart-panel[aria-hidden] .cart-header { padding-bottom: 18px; }
}


/* Catalogue additions update the count without an inline View cart link. */
.config-table [data-configuration-action] a.added_to_cart { display: none; }


/* Mobile ordering layout only; desktop keeps the native quantity field. */
.catalogue-quantity-stepper { display: contents; }
.mobile-qty-step { display: none; }
@media (max-width: 700px) {
  #select-configuration .config-table { display: block; width: 100%; }
  #select-configuration .config-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  #select-configuration .config-table tbody { display: block; }
  #select-configuration .config-table tr[data-configuration-group] {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 12px; align-items: center; padding-block: 16px;
  }
  #select-configuration .config-table tr[data-configuration-group] > :is(th, td) {
    width: auto; min-width: 0; padding: 0; overflow-wrap: normal;
  }
  #select-configuration .config-table tbody th { grid-area: 1 / 1 / 2 / -1; font-weight: 700; }
  #select-configuration .config-table td:nth-child(2) { grid-area: 2 / 1 / 3 / -1; }
  #select-configuration .config-table td:nth-child(3) { grid-area: 3 / 1; }
  #select-configuration .config-table td:nth-child(4) { grid-area: 3 / 2; }
  #select-configuration .config-select { width: 100%; min-height: 44px; font-size: 16px; }
  #select-configuration .catalogue-quantity-stepper:has(input.qty[type="number"]) {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: stretch; width: 100%; max-width: 180px; border: var(--rule);
  }
  #select-configuration .catalogue-quantity-stepper:has(input.qty[type="number"]) .mobile-qty-step {
    display: block; min-height: 44px; font-size: 20px; line-height: 1;
  }
  #select-configuration .mobile-qty-step:disabled { opacity: .35; cursor: default; }
  #select-configuration .catalogue-quantity-stepper .quantity { min-width: 0; }
  #select-configuration .catalogue-quantity-stepper input.qty[type="number"] {
    width: 100%; min-width: 0; height: 44px; padding: 0 2px; border: 0;
    border-inline: var(--rule); font-size: 16px; text-align: center; appearance: textfield;
  }
  #select-configuration input.qty::-webkit-inner-spin-button,
  #select-configuration input.qty::-webkit-outer-spin-button { appearance: none; margin: 0; }
  #select-configuration .config-table .add {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; min-height: 46px; padding-inline: 8px; border: var(--rule);
    text-decoration: none; text-align: center;
  }
}

/* Hide fallback thumbnails in classic and block-based cart/checkout. */
:is(.cart-panel, .checkout-panel, .woocommerce-cart, .woocommerce-checkout,
    .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
img:is(.woocommerce-placeholder, [src*="woocommerce-placeholder"],
       [srcset*="woocommerce-placeholder"]) {
  display: none !important;
}
/* Collapse the dedicated image wrapper as well, without hiding product text. */
:is(.cart-panel, .checkout-panel, .woocommerce-cart, .woocommerce-checkout,
    .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
:is(.wc-block-components-order-summary-item__image, .wc-block-cart-item__image,
    .wc-block-components-product-image):has(img:is(.woocommerce-placeholder,
    [src*="woocommerce-placeholder"], [srcset*="woocommerce-placeholder"])) {
  display: none !important;
}


/* Shared catalogue typography for classic and block-based commerce views.
   Keep the storefront, header branding and payment-provider frames untouched. */
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page,
         .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer) {
  font-family: var(--font);
  font-size: var(--body);
  line-height: 20px;
  font-weight: 400;
  letter-spacing: normal;
}
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page,
         .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
:is(p, a, label, input, select, textarea, button, legend, th, td, li, strong, bdi,
    .woocommerce-Price-amount, .quantity, .variation, .select2-selection,
    .select2-selection__rendered, .wc-block-components-product-name,
    .wc-block-components-product-price, .wc-block-components-formatted-money-amount,
    .wc-block-components-totals-item, .wc-block-components-totals-item__label,
    .wc-block-components-totals-item__value, .wc-block-components-totals-item__description,
    .wc-block-components-text-input, .wc-block-components-checkbox__label,
    .wc-block-components-radio-control__label, .wc-block-components-radio-control__description,
    .wc-block-components-order-summary-item__description,
    .wc-block-components-order-summary-item__quantity,
    .wc-block-components-order-summary-item__total-price,
    .wc-block-components-product-metadata, .wc-block-components-panel__button,
    .wc-block-components-button__text, .wc-block-components-validation-error,
    .wc-block-components-notice-banner__content) {
  font-family: var(--font) !important;
  font-size: var(--body);
  line-height: 20px;
  letter-spacing: normal;
}
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page,
         .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
:is(.button, button, input, select, textarea, label, .wc-block-components-button__text,
    .wc-block-components-product-name, .wc-block-components-formatted-money-amount) {
  font-size: var(--body) !important;
  font-weight: 400;
}
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page,
         .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
:is(h1, h2, h3, h4, .wc-block-components-title, .wc-block-components-checkout-step__title) {
  font-family: var(--font) !important;
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
}
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page) .display {
  font-family: var(--font) !important;
  font-size: var(--display);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.055em;
}
body .cart-panel #cart-title { font-size: 18px; line-height: 1.3; letter-spacing: normal; }
body .cart-panel #cart-title .blkshp-cart-count { font: inherit; letter-spacing: inherit; }
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page,
         .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
:is(.small, small, .woocommerce-cart-form thead th, .wc-block-cart-items__header th,
    .wc-block-components-product-metadata__description) {
  font-family: var(--font) !important;
  font-size: var(--small) !important;
  line-height: 1.4;
  font-weight: 400;
}
body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page)
:is(.eyebrow, .woocommerce-cart-form thead th, .wc-block-cart-items__header th) {
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
/* SelectWoo dropdowns can be appended directly to body. */
body:is(.woocommerce-cart, .woocommerce-checkout) .select2-dropdown,
body:is(.woocommerce-cart, .woocommerce-checkout) .select2-results__option {
  font-family: var(--font);
  font-size: var(--body);
  line-height: 20px;
}
/* Avoid mobile input zoom while keeping the catalogue's typographic family. */
@media (max-width: 700px) {
  body :is(.cart-panel, .woocommerce-cart .store-page, .woocommerce-checkout .store-page,
           .wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer)
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    font-size: 16px !important;
  }
}

/* Optional hero navigation; native anchor with sticky-header clearance. */
 .hero-scroll-arrow {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #0d0d0f;
  text-decoration: none;
  mix-blend-mode: normal;
  border: 1px solid transparent;
}
.hero-arrow-circle { border-radius: 50%; background: rgba(255,255,255,.82); border-color: rgba(0,0,0,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-arrow-circle:hover { background: #fff; border-color: var(--studio-primary, #9333EA); }
@media (min-width: 901px) {
  .hero-scroll-arrow { width: 48px; height: 48px; bottom: max(28px, env(safe-area-inset-bottom, 0px)); }
  .hero-arrow-circle { background: rgba(255,255,255,.92); box-shadow: 0 4px 16px rgba(0,0,0,.16); }
  .hero-arrow-circle:hover { background: #fff; }
}
.hero-scroll-arrow svg { display: block; }
.hero-arrow-minimal svg { filter: drop-shadow(0 0 1px white) drop-shadow(0 0 2px white); }
.hero-scroll-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-arrow { transition: transform .25s ease, background-color .25s ease, border-color .25s ease; }
  .hero-scroll-arrow:hover { transform: translate(-50%, 3px); }
}
@media (max-width: 700px) {
  .hero-scroll-arrow { width: 44px; height: 44px; }
}
#configuration-title { scroll-margin-top: calc(var(--header-height) + var(--header-sticky-top) + var(--s3)); }
@media (prefers-reduced-motion: no-preference) {
  html:has(.hero-scroll-arrow) { scroll-behavior: smooth; }
}

/* Electric Studio: cart status follows the native WooCommerce count fragment. */
.site-header .cart-trigger { font-size: var(--header-cart-d, 13px); }
body.colour-cart .site-header .cart-trigger { color: var(--hdr-cart-empty, var(--studio-cart-empty)); }
body.colour-cart .site-header .cart-trigger:has(.blkshp-cart-count[data-cart-filled="1"]),
body.colour-cart:has(#catalogue-cart[open]) .site-header .cart-trigger {
  color: var(--studio-cart-active);
}
@media (prefers-reduced-motion: reduce) {
  .site-header .cart-trigger { transition: none; }
}

/* Electric Studio — independently configurable accents. */
#select-configuration .config-table button.add {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 76px; min-height: var(--order-control-height, 40px); padding: 0 18px;
  border: 1px solid var(--ink); background: #141414; color: var(--paper);
  text-decoration: none;
}
body.colour-add #select-configuration .config-table button.add:is(:hover, :focus-visible, :active):not(:disabled) {
  background: var(--studio-primary); border-color: var(--studio-primary); color: var(--studio-on-primary);
}
#select-configuration .config-table button.add:hover:not(:disabled) { filter: brightness(.9); }
#select-configuration .config-table button.add:disabled { opacity: .45; }
#select-configuration .config-table :is(th,td):last-child { text-align: right; }
body.colour-focus :is(.config-select, .catalogue-order input, .cart-panel input, .woocommerce-checkout input, .woocommerce-checkout select):focus {
  border-color: var(--studio-primary); outline: 2px solid var(--studio-primary); outline-offset: 1px;
}
body.colour-spec-icon .specifications summary::marker { color: var(--studio-secondary); }
body.colour-spec-surface .specifications[open] { background: var(--studio-surface); }
body.colour-heading :is(#catalogue-title,#configuration-title)::after {
  content: ""; display: block; width: 32px; height: 2px; margin-top: 12px; background: var(--studio-primary);
}
body.colour-arrow .hero-scroll-arrow { color: var(--studio-primary); }
body.colour-arrow .hero-arrow-circle { border-color: var(--studio-primary); }
body.colour-checkout :is(.cart-panel,.woocommerce,.woocommerce-page) :is(a.checkout,a.checkout-button,button#place_order),
body.colour-checkout :is(.wc-block-cart__submit-button,.wc-block-components-checkout-place-order-button) {
  background: var(--studio-primary); color: var(--studio-on-primary); border-color: var(--studio-primary);
}
body.colour-checkout :is(.cart-panel,.woocommerce,.woocommerce-page) :is(a.checkout,a.checkout-button,button#place_order):hover,
body.colour-checkout :is(.wc-block-cart__submit-button,.wc-block-components-checkout-place-order-button):hover { filter: brightness(.9); }
/* Shared purchase-control geometry and restrained accent states. */
#select-configuration { --order-control-height: 40px; }
#select-configuration .config-select {
  display: block; height: var(--order-control-height); min-height: var(--order-control-height);
  padding-block: 0; line-height: normal;
}
#select-configuration .catalogue-quantity-stepper:has(input.qty[type="number"]) {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch; width: 140px; max-width: 100%;
  height: var(--order-control-height); border: var(--rule);
}
#select-configuration .catalogue-quantity-stepper:has(input.qty[type="number"]) .mobile-qty-step {
  display: block; min-height: 0; height: 100%; font-size: 19px; line-height: 1;
}
#select-configuration .mobile-qty-step:disabled { opacity: .35; }
#select-configuration .catalogue-quantity-stepper .quantity { min-width: 0; height: 100%; margin: 0; }
#select-configuration .catalogue-quantity-stepper input.qty[type="number"] {
  width: 100%; min-width: 0; height: 100%; padding: 0 2px;
  border: 0; border-inline: var(--rule); text-align: center; appearance: textfield;
}
#select-configuration input.qty::-webkit-inner-spin-button,
#select-configuration input.qty::-webkit-outer-spin-button { appearance: none; margin: 0; }
#select-configuration .config-table button.add,
#select-configuration .config-table a.add {
  height: var(--order-control-height); min-height: var(--order-control-height);
  padding-block: 0; align-items: center; justify-content: center;
}
#select-configuration .config-table thead th:last-child,
#select-configuration .config-table tbody td:last-child { text-align: right; padding-right: 0; }
#select-configuration .config-table [data-configuration-action] { text-align: right; }
@media (min-width: 701px) {
  #select-configuration .config-table { table-layout: fixed; }
  #select-configuration .config-table tbody th { width: auto; }
  #select-configuration .config-table thead th:nth-child(1) { width: 25%; }
  #select-configuration .config-table thead th:nth-child(2) { width: auto; }
  #select-configuration .config-table thead th:nth-child(3) { width: 156px; }
  #select-configuration .config-table thead th:nth-child(4) { width: 120px; }
}
@media (max-width: 700px) {
  #select-configuration { --order-control-height: 44px; }
  #select-configuration .catalogue-quantity-stepper:has(input.qty[type="number"]) {
    width: 100%; max-width: none; grid-template-columns: 38px minmax(0, 1fr) 38px;
  }
  #select-configuration .config-table button.add { width: 100%; }
}
/* The dialog lives in the browser top layer; preserve safe-area clearance. */
.cart-panel {
  top: 0; bottom: auto; height: 100%; height: 100dvh; max-height: 100dvh;
  padding: 24px 20px; padding-top: calc(32px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  border-left: 1px solid #e5e5e5; box-shadow: -8px 0 24px rgba(0,0,0,.06);
  overflow: hidden;
}
.cart-panel .cart-header { flex: 0 0 auto; align-items: center; }
.cart-panel .cart-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.cart-panel::backdrop { background: rgba(0,0,0,.16); }



/* Equal-height commerce actions; retain the four-column catalogue geometry. */
#catalogue-cart .cart-header > div { min-width: 0; }
#catalogue-cart .cart-header .eyebrow { margin: 0 0 6px; line-height: 1.4; }
#catalogue-cart .cart-header form { margin: 0; flex: 0 0 auto; }
#catalogue-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto; align-items: stretch; gap: 8px;
  margin: 16px 0 0; padding: 0;
}
#catalogue-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons::before,
#catalogue-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons::after {
  display: none !important; content: none !important;
}
#catalogue-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons > a.button {
  box-sizing: border-box; float: none !important; clear: none !important;
  display: flex; align-items: center; justify-content: center;
  align-self: stretch; width: 100%; min-width: 0; height: auto;
  min-height: 44px; margin: 0 !important; padding: 10px 14px; line-height: 20px;
  text-align: center; grid-row: 1;
}
#catalogue-cart .woocommerce-mini-cart__buttons > a.button:not(.checkout) { grid-column: 1; }
#catalogue-cart .woocommerce-mini-cart__buttons > a.button.checkout { grid-column: 2; }
body .wc-block-checkout__actions_row {
  display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap;
}
body .wc-block-checkout__actions_row :is(.wc-block-components-checkout-return-to-cart-button,.wc-block-components-checkout-place-order-button) {
  box-sizing: border-box; display: inline-flex; align-items: center;
  justify-content: center; min-height: 44px; margin-block: 0;
  padding: 10px 14px; line-height: 20px; text-align: center;
}
body .woocommerce-checkout #payment .place-order button#place_order,
body .woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body .wc-block-cart .wc-block-cart__submit-button {
  box-sizing: border-box; min-height: 44px; padding: 10px 14px; line-height: 20px;
}

/* Empty cart: one message and one return action, no product recommendations. */
body.woocommerce-cart .blkshp-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin: 24px 0 48px;
    padding: 0;
    text-align: left;
}
body.woocommerce-cart .blkshp-empty-cart p { margin: 0; font: inherit; }
body.woocommerce-cart :is(.blkshp-return-catalogue, .return-to-shop .button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    box-sizing: border-box;
    background: #141414;
    color: #fff;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    font-weight: 400;
}
body.woocommerce-cart :is(.blkshp-return-catalogue, .return-to-shop .button):hover {
    background: #333;
    color: #fff;
}
/* Fallback for saved empty-cart block templates with a different wrapper. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(.wp-block-woocommerce-product-new,.wp-block-woocommerce-product-collection,.wp-block-woocommerce-all-products,.wp-block-woocommerce-product-best-sellers) { display:none; }


/* Mobile refinement: clean header edge, single focus border, compact footer gap. */
@media (max-width: 700px) {
  .site-header { border-top: 0; }
  body #select-configuration .config-select:focus {
    outline: none;
    outline-offset: 0;
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
  }
  body.colour-focus #select-configuration .config-select:focus {
    border-color: var(--studio-primary);
    box-shadow: inset 0 0 0 1px var(--studio-primary);
  }
  #select-configuration { padding-bottom: 56px; }
}

/* Native add-to-cart request feedback: stable geometry across all states. */
#select-configuration .config-table button.add {
  width: 100%; padding-inline: 5px; white-space: normal; line-height: 1.15;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
#select-configuration .config-table button.add:is(.add-pending,.add-confirmed):disabled {
  opacity: 1; cursor: default; filter: none;
}
body.colour-add #select-configuration .config-table button.add:is(.add-pending,.add-confirmed):disabled {
  background: var(--studio-primary); border-color: var(--studio-primary); color: var(--studio-on-primary);
}
body.colour-add #select-configuration .config-table button.add.add-reset:not(:disabled) {
  background: #141414; border-color: var(--ink); color: var(--paper); filter: none;
}
@media (prefers-reduced-motion: reduce) {
  #select-configuration .config-table button.add { transition: none; }
}

/* Image anchor: only active after geometry is available. */
.hero-overlay.is-image-anchored { display:block; padding:0; }
.hero-overlay.is-image-anchored .hero-overlay-inner { position:absolute; inset:auto; left:var(--anchored-x,0px); top:var(--anchored-y,0px); width:max-content; max-width:var(--anchor-max-width,100%); max-height:none; transform:none; }

/* Header appearance: retain the existing sticky layout and cart fragments. */
.site-header[data-header-mode="dark"],
.site-header[data-header-mode="adaptive"].is-dark-scheme {
  --hdr-bg: #09090b; --hdr-fg: #f5f5f5; --hdr-line: #333;
  --hdr-cart-empty: var(--hdr-fg);
}
.site-header[data-cart-style="minimal"] .cart-trigger { padding-inline: 0; border: 0; }
.site-header[data-cart-style="outlined"] .cart-trigger { padding-inline: 14px; border: 1px solid currentColor; border-radius: 999px; }
.site-header[data-primary-hover="1"] .brand:hover,
body .site-header[data-primary-hover="1"] .cart-trigger:hover { color: var(--studio-primary, currentColor); }
@media (prefers-reduced-motion: no-preference) {
  .site-header[data-smooth-transition="1"] { transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease; }
  .site-header[data-smooth-transition="1"] .cart-trigger { transition: color 220ms ease; }
}
@media (max-width: 700px) { .site-header .cart-trigger { font-size: var(--header-cart-m, 12px); } }

/* BLK SHP — Order Support */

.blkshp-order-support {
    width: 100%;
    max-width: var(--copy);
    margin-inline: 0;
    font: var(--body)/20px var(--font);
    color: var(--ink);
}

.blkshp-order-support > h2 {
    font-size: var(--display);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.055em;
    margin-bottom: var(--s3);
}

body.page-id-427 .store-page:has(h1) .blkshp-order-support > h2 {
    display: none;
}

.blkshp-order-support > p {
    color: var(--muted);
    margin-bottom: var(--s5);
}

.blkshp-support-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s3);
    margin: 0;
}

.blkshp-support-form > * {
    grid-column: 1 / -1;
    min-width: 0;
}

.blkshp-support-form > p {
    margin: 0;
}

.blkshp-support-form > p:nth-of-type(2) {
    grid-column: 1;
}

.blkshp-support-form > p:nth-of-type(3) {
    grid-column: 2;
}

.blkshp-support-form > p > label {
    display: block;
    font-size: var(--body);
    line-height: 20px;
}

.blkshp-support-form :is(
    input:not([type="checkbox"]):not([type="hidden"]),
    select,
    textarea
) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin-top: var(--s1);
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: var(--rule);
    border-radius: 0;
    box-shadow: none;
}

.blkshp-support-form select {
    padding-block: 0;
}

.blkshp-support-form textarea {
    min-height: 144px;
    resize: vertical;
}

.blkshp-support-form :is(input, select, textarea):focus {
    border-color: var(--ink);
    outline: none;
    box-shadow: inset 0 0 0 1px var(--ink);
}

.blkshp-support-form .bs-withdrawal {
    padding: var(--s3);
    border: var(--rule);
    background: var(--soft);
}

.blkshp-support-form .bs-withdrawal label {
    display: flex;
    align-items: flex-start;
    gap: var(--s2);
}

.blkshp-support-form input[type="checkbox"] {
    flex: none;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--ink);
}

.blkshp-support-form .bs-withdrawal p + p {
    margin-top: var(--s2);
    font-size: var(--small);
    color: var(--muted);
}

.blkshp-support-form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 20px;
    margin-top: var(--s2);
    border: 1px solid var(--ink);
    border-radius: 0;
    background: #141414;
    color: var(--paper);
    font: inherit;
    cursor: pointer;
}

.blkshp-support-form button[type="submit"]:hover {
    background: #333;
}

body.page-id-427 .entry-content :is(
    p[role="alert"],
    p[role="status"]
) {
    max-width: var(--copy);
    margin-block: 0 var(--s4);
    padding: var(--s3);
    border: var(--rule);
    background: var(--soft);
    color: var(--ink);
}

@media (max-width: 700px) {
    .blkshp-support-form {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s3);
    }

    .blkshp-support-form > p:nth-of-type(2),
    .blkshp-support-form > p:nth-of-type(3) {
        grid-column: 1 / -1;
    }

    .blkshp-support-form :is(
        input:not([type="checkbox"]):not([type="hidden"]),
        select,
        textarea
    ) {
        min-height: 44px;
        font-size: 16px;
    }
}

/* END BLK SHP — Order Support */


/* BLK SHP — Desktop footer */

@media (min-width: 701px) {
    .site-footer {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--s4);
    }

    .site-footer nav {
        margin: 0;
    }

    .site-footer nav ul {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--s4);
        margin: 0;
        padding: 0;
    }

    .site-footer > p:last-child {
        margin-inline-start: auto;
        text-align: right;
    }
}

/* END BLK SHP — Desktop footer */


/* BLK SHP — Mobile footer */

@media (max-width: 700px) {
    .site-footer {
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 12px;
    }

    .site-footer nav {
        min-width: 0;
        max-width: 100%;
    }

    .site-footer nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .site-footer a {
        white-space: nowrap;
    }

    .site-footer > p:last-child {
        flex: 0 0 100%;
        margin: 0;
        text-align: left;
    }
}

/* END BLK SHP — Mobile footer */


/* BLK SHP — Policy pages */

.privacy-policy-content,
.shipping-policy-content {
    width: 100%;
    max-width: 760px;
    margin-inline: 0;
    font-family: var(--font);
    font-size: var(--body);
    line-height: 1.65;
    color: var(--ink);
}

.policy-section {
    padding-block: 24px 32px;
    border-top: var(--rule);
}

.policy-section h2 {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -.02em;
    margin: 0 0 16px;
}

.policy-section h2 .num {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    margin-right: 10px;
}

.policy-section p {
    margin: 0 0 12px;
}

.policy-section h3,
.policy-section .subhead {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin: 20px 0 8px;
}

.policy-section ul,
.policy-section ol {
    margin: 12px 0 16px;
    padding-inline-start: 20px;
}

.policy-section li {
    padding-left: 2px;
    margin-bottom: 5px;
}

.policy-section > :last-child {
    margin-bottom: 0;
}

.privacy-policy-content .updated,
.shipping-policy-content .updated {
    font-size: var(--small);
    color: var(--muted);
    margin-bottom: 32px;
}

.policy-section .contact-name {
    font-weight: 600;
}

.policy-section a {
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .privacy-policy-content,
    .shipping-policy-content {
        max-width: 100%;
    }

    .policy-section {
        padding-block: 20px 24px;
    }

    .policy-section h2 {
        font-size: 17px;
        margin-bottom: 12px;
    }
}

/* END BLK SHP — Policy pages */


/* BLK SHP — Empty checkout */

body.woocommerce-checkout .wc-block-checkout-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s3);
    margin: var(--s4) 0 var(--s6);
    padding: 0;
    text-align: left;
    font: var(--body)/20px var(--font);
    color: var(--ink);
}

body.woocommerce-checkout .wc-block-checkout-empty svg {
    display: none;
}

body.woocommerce-checkout .wc-block-checkout-empty :is(h2,h3,p) {
    margin: 0;
    padding: 0;
    font: var(--body)/20px var(--font);
    text-align: left;
}

body.woocommerce-checkout .wc-block-checkout-empty :is(a.button, .wp-block-button__link, .wc-block-components-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    margin: 0;
    background: #141414;
    color: var(--paper);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
    font: var(--body)/20px var(--font);
}

body.woocommerce-checkout .wc-block-checkout-empty :is(a.button, .wp-block-button__link, .wc-block-components-button):hover {
    background: #333;
}

body.woocommerce-checkout .wc-block-checkout-empty .wp-block-buttons {
    justify-content: flex-start;
    margin: 0;
}

/* END BLK SHP — Empty checkout */


/* BLK SHP — Restricted checkout terms */

body.woocommerce-checkout:has([data-blkshp-commercial-footer]):not(:has([data-blkshp-commercial-footer] [data-blkshp-commercial-link]))
:is(.wp-block-woocommerce-checkout-terms-block, .wc-block-checkout__terms) {
    display: none !important;
}

/* END BLK SHP — Restricted checkout terms */


/* BLK SHP — Coupon input focus */
.wc-block-components-totals-coupon input:focus,
#blkshp-code:focus {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid var(--ink) !important;
    border-radius: 0 !important;
}

.wc-block-components-totals-coupon input:focus-visible,
#blkshp-code:focus-visible {
    border-color: var(--ink) !important;
    outline: none !important;
    box-shadow: none !important;
}

