/*
Theme Name: Crucible Forge Works
Theme URI: https://www.crucibleforgeworks.com/
Author: Crucible Forge Works
Description: The Shop's own block theme: black and the logo's mint, Anuphan, product cards with short titles and series links, numbered pages. Core and WooCommerce blocks only (no page builder). Built in the CFW app repo (wp-theme/cfw).
Version: 0.1.26
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cfw
*/

/* Most styling lives in theme.json; these are the pieces it can't express. */

/* Visually hidden, still read by screen readers */
.cfw-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: the shipping strip, then logo, search and account/cart on one row, the Shop-by menu under it */
/* Dark text on the mint strip, whatever other styles say (a plugin's styles turned it white, 2026-10-24) */
.cfw-strip, .cfw-strip p, .cfw-strip a { color: var(--wp--preset--color--base, #0c0316) !important; }
.cfw-strip { text-align: center; background-color: var(--wp--preset--color--accent, #68f8b0) !important; }
.cfw-header .wp-block-search__input { background: var(--wp--preset--color--surface-2); color: var(--wp--preset--color--text); border: 1px solid var(--wp--preset--color--line-strong); border-radius: 8px 0 0 8px; min-height: 46px; }
.cfw-header .wp-block-search__button { border-radius: 0 8px 8px 0; min-height: 46px; margin-left: 0; }
.cfw-header .wp-block-search__inside-wrapper { border: 0; padding: 0; }
.cfw-header .wp-block-navigation__submenu-container { background: var(--wp--preset--color--surface) !important; border: 1px solid var(--wp--preset--color--line) !important; border-radius: 10px; padding: 6px !important; }

/* Phones: the strip keeps only the shipping line; logo, account, cart and the menu button share one row, the search
   under them (it was four rows, 252px, before 0.1.10) */
@media (max-width: 599px) {
  .cfw-strip-more { display: none; }
  .cfw-header { position: relative; }
  .cfw-header > .wp-block-group { row-gap: 12px !important; }
  .cfw-header .cfw-logo { order: 1; }
  .cfw-header .cfw-logo img { height: 36px !important; width: auto !important; }
  .cfw-header > .wp-block-group > .wp-block-group { order: 2; margin-left: auto; margin-right: 40px; }
  .cfw-header .wp-block-search { order: 3; flex-basis: 100%; }
  .cfw-header > nav { position: absolute; top: 24px; right: var(--wp--style--root--padding-right, 16px); width: auto; }
}

/* Hero: the banner under a left-to-right shade, so the headline stays readable */
/* The Fireflies banner (the user's choice, 2026-10-24), anchored so the travelers stay in frame */
.cfw-hero.wp-block-cover { min-height: 640px; }
.cfw-tagline { white-space: nowrap; }
@media (max-width: 520px) { .cfw-tagline { white-space: normal; text-wrap: balance; } }
/* Phones: the side shade would hide the whole image, so the shade runs top to bottom and the text sits low */
@media (max-width: 599px) {
  .cfw-hero.wp-block-cover { min-height: 560px; padding-top: 220px !important; padding-bottom: 40px !important; align-items: flex-end; }
  .cfw-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(12, 3, 22, 0) 0%, rgba(12, 3, 22, 0.35) 30%, rgba(12, 3, 22, 0.9) 58%, rgba(12, 3, 22, 0.97) 100%) !important; }
  /* The phone image is a portrait crop already framed on the travellers (npm run theme-images) */
  .cfw-hero .wp-block-cover__image-background { object-position: 50% 40% !important; }
  .cfw-hero .cfw-tagline { font-size: 13px !important; }
}

/* Product cards: square images, the short title, the series line, the price */
.wc-block-product-template .wp-block-woocommerce-product-image img,
.wc-block-components-product-image img { aspect-ratio: 1 !important; object-fit: cover; border-radius: 10px; }
/* !important: WooCommerce's block writes an inline 3:4, which cut the sides off the square photos (to 0.1.16) */
.wc-block-product-template .wp-block-post-title { margin: 8px 0 0; }
.wc-block-product-template .wp-block-post-title a { text-decoration: none; }
.cfw-series { margin: 2px 0 0; font-size: var(--wp--preset--font-size--small); line-height: 1.3; }
.cfw-series a { color: var(--wp--preset--color--accent); text-decoration: none; }
.cfw-series a:hover { text-decoration: underline; }
.wc-block-product-template .cfw-series { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Phones: three products across, compact text (the user's choice, 2026-10-24) */
@media (max-width: 600px) {
  .wc-block-product-template.is-flex-container > li,
  .wc-block-product-template.wc-block-product-template__responsive { gap: 10px 8px !important; }
  .wc-block-product-template.wc-block-product-template__responsive { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .wc-block-product-template .wp-block-post-title { font-size: 12px !important; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* WooCommerce makes the title's link inline-block, which the clamp counts as one line (3-line titles to 0.1.10) */
  .wc-block-product-template .wp-block-post-title a { display: inline; }
  .wc-block-product-template .cfw-series { font-size: 11px; }
  .wc-block-product-template .wc-block-components-product-price { font-size: 12px !important; }
}

/* Filters (inc/filters.php): a sidebar beside the grid on desktop; on phones a bar (Filter button, 2/3 per row) and a
   sheet from the bottom. Without JavaScript the form shows above the grid with its Show results button. */
.cfw-browse { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
/* Pages without filters (tags, brands): the results take the whole width */
.cfw-browse:not(:has(> .cfw-filters)) { display: block; }
.cfw-results { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cfw-results > * { margin-block: 0; }
.cfw-filters { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 22px; }
.cfw-filters__groups { display: flex; flex-direction: column; gap: 22px; }
.cfw-filters__head { display: none; }
.cfw-filters__head h2 { margin: 0; font-size: 18px; }
.cfw-filters__close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--wp--preset--color--text); cursor: pointer; }
.cfw-facet { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfw-facet legend { font-weight: 700; font-size: 15px; padding: 0 0 8px; }
.cfw-option { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: 15px; cursor: pointer; }
.cfw-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--wp--preset--color--accent); flex: none; }
.cfw-option__name { flex: 1; }
.cfw-count { color: var(--wp--preset--color--muted); font-size: 14px; }
.cfw-price__row { display: flex; align-items: center; gap: 8px; color: var(--wp--preset--color--muted); }
.cfw-price input { width: 88px; height: 40px; box-sizing: border-box; padding: 0 10px; }
.cfw-filters__foot { display: flex; gap: 10px; }
.cfw-filters__clear, .cfw-filters__apply { flex: 1; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 700; text-decoration: none; cursor: pointer; font: inherit; }
.cfw-filters__clear { color: var(--wp--preset--color--accent); border: 1px solid var(--wp--preset--color--accent); }
.cfw-filters__apply { flex: 2; color: var(--wp--preset--color--base); background: var(--wp--preset--color--accent); border: 0; font-weight: 700; }
/* Desktop with JavaScript: a change applies at once, so no buttons */
@media (min-width: 900px) { .cfw-js .cfw-filters__foot { display: none; } }
.cfw-filter-bar { display: none; }
.cfw-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cfw-chip { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 18px; font-size: 14px; color: var(--wp--preset--color--base); background: var(--wp--preset--color--accent); text-decoration: none; }
.cfw-chip:hover { background: var(--wp--preset--color--accent-hover); color: var(--wp--preset--color--base); text-decoration: none; }
.cfw-chips__clear { font-size: 14px; text-decoration: underline; }

@media (max-width: 899px) {
  .cfw-browse { display: block; }
  .cfw-filters { position: static; margin-bottom: 18px; }
  /* The sheet: closed until the Filter button opens it */
  .cfw-js .cfw-filters { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; top: 12vh; margin: 0; display: none; flex-direction: column; gap: 0;
    background: var(--wp--preset--color--surface); border-top: 1px solid var(--wp--preset--color--accent); border-radius: 16px 16px 0 0; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6); }
  .cfw-js .cfw-filters.is-open { display: flex; }
  .cfw-js .cfw-filters__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--wp--preset--color--line); }
  .cfw-js .cfw-filters__groups { flex: 1; overflow-y: auto; padding: 8px 16px 16px; gap: 18px; }
  .cfw-js .cfw-filters__foot { padding: 12px 16px 20px; border-top: 1px solid var(--wp--preset--color--line); }
  .cfw-sheet-open { overflow: hidden; }
  /* Options as chips */
  .cfw-facet { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .cfw-facet legend { padding: 8px 0; }
  .cfw-option { min-height: 40px; padding: 0 14px; gap: 6px; border: 1px solid var(--wp--preset--color--line-strong); border-radius: 20px; background: var(--wp--preset--color--surface-2); font-size: 14px; }
  .cfw-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .cfw-option:has(input:checked) { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }
  .cfw-option:has(input:checked) .cfw-count { color: var(--wp--preset--color--base); }
  .cfw-option:has(input:focus-visible) { outline: 3px solid var(--wp--preset--color--text); outline-offset: 2px; }
  .cfw-option__name { flex: none; }
  .cfw-price { flex-direction: column; }
  /* The bar: Filter (n) and the 2/3 switch */
  .cfw-js .cfw-filter-bar { display: flex; gap: 8px; align-items: center; }
  .cfw-filter-open { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 700; color: var(--wp--preset--color--base); background: var(--wp--preset--color--accent); border: 0; border-radius: 8px; cursor: pointer; }
  .cfw-cols { display: flex; border: 1px solid var(--wp--preset--color--line-strong); border-radius: 8px; overflow: hidden; flex: none; }
  .cfw-cols button { width: 40px; height: 38px; display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; color: var(--wp--preset--color--text); background: var(--wp--preset--color--surface-2); }
  .cfw-cols button[aria-pressed="true"] { color: var(--wp--preset--color--base); background: var(--wp--preset--color--accent); }
  /* Two per row (the switch): bigger cards and titles */
  .cfw-cols-2 .wc-block-product-template.wc-block-product-template__responsive { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px 12px !important; }
  .cfw-cols-2 .wc-block-product-template .wp-block-post-title { font-size: 15px !important; }
  .cfw-cols-2 .wc-block-product-template .cfw-series { font-size: 13px; }
  .cfw-cols-2 .wc-block-product-template .wc-block-components-product-price { font-size: 14px !important; }
}

/* The option picker (assets/js/picker.js): tiles over WooCommerce's dropdown, which stays in the page, hidden */
.cfw-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; }
.cfw-picker--text { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cfw-picker-select { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cfw-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; text-align: left; font: inherit; color: var(--wp--preset--color--text);
  background: var(--wp--preset--color--surface); border: 2px solid var(--wp--preset--color--line); border-radius: 12px; cursor: pointer; }
.cfw-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; }
.cfw-tile__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.cfw-tile__price { font-size: 13px; color: var(--wp--preset--color--muted); }
.cfw-tile__save { font-size: 13px; font-weight: 600; color: var(--wp--preset--color--accent); }
.cfw-tile:hover { border-color: var(--wp--preset--color--line-strong); }
.cfw-tile[aria-pressed="true"] { background: var(--wp--preset--color--accent-deep); border-color: var(--wp--preset--color--accent); }
.cfw-tile[aria-pressed="true"] .cfw-tile__price { color: var(--wp--preset--color--text); }
.cfw-tile:focus-visible { outline: 3px solid var(--wp--preset--color--text); outline-offset: 2px; }
.cfw-tile:disabled { opacity: 0.45; cursor: not-allowed; }
.cfw-buybar { display: none; }
@media (max-width: 899px) {
  .cfw-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfw-buybar:not([hidden]) { position: fixed; z-index: 900; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: center; box-sizing: border-box; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(12, 3, 22, 0.94); border-top: 1px solid var(--wp--preset--color--line); }
  .cfw-buybar__what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .cfw-buybar__name { font-size: 13px; color: var(--wp--preset--color--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cfw-buybar__price { font-size: 18px; font-weight: 700; }
  .cfw-buybar__add { flex: 1.4; height: 52px; font: inherit; font-size: 16px; font-weight: 700; color: var(--wp--preset--color--base); background: var(--wp--preset--color--accent); border: 0; border-radius: 8px; cursor: pointer; }
  /* Room under the page for the bar, and the back-to-top button above it */
  body:has(.cfw-buybar:not([hidden])) { padding-bottom: 84px; }
  body:has(.cfw-buybar:not([hidden])) .cfw-to-top { bottom: 100px; }
}

/* Page numbers under product lists (templates' query-pagination, class cfw-pages): buttons big enough for a thumb,
   the current page in mint */
.cfw-pages { gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.cfw-pages .wp-block-query-pagination-numbers { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0; }
.cfw-pages .page-numbers, .cfw-pages .wp-block-query-pagination-previous, .cfw-pages .wp-block-query-pagination-next {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; box-sizing: border-box; margin: 0;
  border: 1px solid var(--wp--preset--color--line-strong); border-radius: 10px; background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--text); font-weight: 600; text-decoration: none; line-height: 1;
}
.cfw-pages a:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.cfw-pages a:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }
.cfw-pages .page-numbers.current { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }
.cfw-pages .page-numbers.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; color: var(--wp--preset--color--muted); }
@media (max-width: 599px) {
  .cfw-pages { gap: 6px; }
  .cfw-pages .wp-block-query-pagination-numbers { gap: 6px; }
  .cfw-pages .page-numbers, .cfw-pages .wp-block-query-pagination-previous, .cfw-pages .wp-block-query-pagination-next { min-width: 40px; height: 40px; padding: 0 10px; }
}

/* Back to top (assets/js/cfw.js) */
.cfw-to-top { position: fixed; right: 20px; bottom: 20px; width: 52px; height: 52px; border-radius: 26px; border: 0; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); cursor: pointer; z-index: 50; }
.cfw-to-top[hidden] { display: none; }
.cfw-to-top:focus-visible { outline: 3px solid var(--wp--preset--color--text); outline-offset: 2px; }

/* Designer and category headers: the banner behind the title */
.cfw-banner.wp-block-cover { border-radius: 16px; overflow: hidden; }

/* MailPoet's newsletter slide-in, in the Shop's style (was Additional CSS under Kadence, which stays with that theme;
   docs/policies/newsletter-form.css). It waits until the cookie banner is answered: both sit at the bottom of the
   screen, and the slide-in covered the banner's Accept / Deny. */
body:has(.cmplz-cookiebanner.cmplz-show) .mailpoet_form_slide_in { display: none !important; }
.mailpoet_form_slide_in {
  background: var(--wp--preset--color--base, #0c0316) !important;
  color: var(--wp--preset--color--text, #f2f2f2) !important;
  border-top: 1px solid var(--wp--preset--color--accent, #68f8b0) !important;
  padding: 16px !important;
  font-family: var(--wp--preset--font-family--anuphan, Anuphan, sans-serif) !important;
}
.mailpoet_form_slide_in form { padding: 0 !important; }
.mailpoet_form_slide_in * { text-transform: none !important; }
.mailpoet_form_slide_in h1, .mailpoet_form_slide_in h2, .mailpoet_form_slide_in h3 {
  color: var(--wp--preset--color--text, #f2f2f2) !important; font-size: 20px !important; margin: 0 0 6px !important;
}
.mailpoet_form_slide_in p, .mailpoet_form_slide_in .mailpoet_paragraph {
  color: var(--wp--preset--color--text, #f2f2f2) !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.45 !important; margin: 0 0 10px !important;
}
.mailpoet_form_slide_in input.mailpoet_text {
  background: var(--wp--preset--color--surface-2, #18111f) !important; color: var(--wp--preset--color--text, #f2f2f2) !important;
  border: 1px solid var(--wp--preset--color--line-strong, #362c44) !important; border-radius: 6px !important; height: 42px !important;
}
.mailpoet_form_slide_in input.mailpoet_submit {
  background: var(--wp--preset--color--accent, #68f8b0) !important; color: var(--wp--preset--color--base, #0c0316) !important;
  border: none !important; border-radius: 6px !important; height: 42px !important; font-weight: 700 !important;
}
.mailpoet_form_slide_in a { color: var(--wp--preset--color--accent, #68f8b0) !important; }
.mailpoet_form_slide_in .mailpoet_form_close_icon, .mailpoet_form_slide_in .mailpoet_form_close_icon svg {
  color: var(--wp--preset--color--text, #f2f2f2) !important; fill: var(--wp--preset--color--text, #f2f2f2) !important;
}
/* Its close button is a picture of a black round X (round_black.svg), invisible on the dark slide-in: made white and
   bigger (2026-10-25) */
.mailpoet_form_slide_in .mailpoet_form_close_icon { filter: invert(1); width: 30px !important; height: 30px !important; opacity: 1 !important; }

/* Cart and checkout (WooCommerce's classic forms): dark fields, country menu, notices and payment box, instead of
   WooCommerce's white and light grey (2026-10-25, "hard on the eyes") */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text, .woocommerce-page form .form-row textarea,
.woocommerce .coupon input.input-text, #coupon_code {
  background-color: var(--wp--preset--color--surface-2) !important; color: var(--wp--preset--color--text) !important;
  border: 1px solid var(--wp--preset--color--line-strong) !important; border-radius: 8px !important;
}
.woocommerce form .form-row input.input-text, .woocommerce .coupon input.input-text, #coupon_code { min-height: 46px; padding: 0 12px !important; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus, #coupon_code:focus {
  border-color: var(--wp--preset--color--accent) !important; outline: none; box-shadow: 0 0 0 2px var(--wp--preset--color--accent-deep);
}
.woocommerce form .form-row ::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
.woocommerce form .form-row .required { color: #ff8a8a; }
.select2-container--default .select2-selection--single {
  background-color: var(--wp--preset--color--surface-2) !important; border: 1px solid var(--wp--preset--color--line-strong) !important; border-radius: 8px !important;
  height: 46px !important; min-height: 0 !important; padding: 0 !important; display: block !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--wp--preset--color--text) !important; line-height: 44px !important; padding: 0 36px 0 12px !important; height: 44px; }
/* The card form's fieldset kept the browser's white border */
.woocommerce-checkout #payment .payment_box fieldset { border: 0 !important; padding: 0 !important; margin: 0 !important; }
/* WooPayments' card fields copy the page's input styles; their frame gets the same border */
.woocommerce-checkout #payment .wcpay-upe-element, .woocommerce-checkout #payment #wcpay-upe-element, .woocommerce-checkout #payment .wcpay-card-element {
  background: var(--wp--preset--color--surface-2) !important; border: 1px solid var(--wp--preset--color--line-strong) !important; border-radius: 8px !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--wp--preset--color--muted) !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: var(--wp--preset--color--text) !important; }
.select2-dropdown { background-color: var(--wp--preset--color--surface) !important; border-color: var(--wp--preset--color--line-strong) !important; color: var(--wp--preset--color--text); }
.select2-search--dropdown .select2-search__field { background: var(--wp--preset--color--surface-2) !important; color: var(--wp--preset--color--text) !important; border: 1px solid var(--wp--preset--color--line-strong) !important; border-radius: 6px; }
.select2-results__option { color: var(--wp--preset--color--text); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background-color: var(--wp--preset--color--accent-deep) !important; color: var(--wp--preset--color--text) !important; }
.select2-container--default .select2-results__option[aria-selected="true"], .select2-container--default .select2-results__option[data-selected="true"] { background-color: var(--wp--preset--color--surface-2) !important; }
.wc-block-components-notice-banner.is-info, .wc-block-components-notice-banner.is-success, .woocommerce-info, .woocommerce-message {
  background-color: var(--wp--preset--color--surface) !important; border-color: var(--wp--preset--color--line-strong) !important; color: var(--wp--preset--color--text) !important;
}
.wc-block-components-notice-banner.is-info > svg, .wc-block-components-notice-banner.is-success > svg { background-color: var(--wp--preset--color--accent-deep) !important; fill: var(--wp--preset--color--accent) !important; }
.wc-block-components-notice-banner.is-error { background-color: #2a1016 !important; border-color: #b4233c !important; color: var(--wp--preset--color--text) !important; }
.woocommerce-checkout #payment, .woocommerce-checkout #payment ul.payment_methods { background: var(--wp--preset--color--surface) !important; border-radius: 12px; border-color: var(--wp--preset--color--line) !important; }
.woocommerce-checkout #payment div.payment_box { background-color: var(--wp--preset--color--surface-2) !important; color: var(--wp--preset--color--text) !important; border-radius: 8px; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--wp--preset--color--surface-2) !important; }
.woocommerce table.shop_table, .woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--wp--preset--color--line) !important; color: var(--wp--preset--color--text); }
.woocommerce-checkout #payment .place-order .button, .woocommerce button.button.alt { background-color: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--base) !important; }
/* The checkout's own header (parts/checkout-header.html) */
.cfw-checkout-header { border-bottom: 1px solid var(--wp--preset--color--line); }
/* The checkout's layout (2026-10-26, the user's request: the cart's items in sight, not only billing and payment).
   Wide screens: billing and shipping on the left, "Your order" and payment in a column on the right (assets/js/cfw.js
   puts them in .cfw-checkout-side), the coupon line above that column. Phones: "Your order" and its items first, then
   the details, payment last. Without the script WooCommerce's own stacking stays. */
.woocommerce-form-coupon-toggle .wc-block-components-notice-banner { padding: 8px 12px !important; margin: 0 0 10px !important; gap: 8px; font-size: 14px; align-items: center; }
.woocommerce-form-coupon-toggle .wc-block-components-notice-banner > svg { width: 18px; height: 18px; padding: 2px; }
.woocommerce form.checkout_coupon { border: 1px solid var(--wp--preset--color--line-strong); border-radius: 8px; padding: 10px; margin: 0 0 16px; }
.woocommerce form.checkout_coupon .form-row { margin: 0; padding: 0; }
.woocommerce form.checkout_coupon #coupon_code { min-height: 40px; }
.woocommerce form.checkout_coupon .button { min-height: 40px; padding: 0 14px; width: 100%; }
/* The form's own boxes are laid out with the coupon (which sits outside it) in one flex container, so the coupon
   comes after the express payment buttons, right above "Your order" */
.woocommerce:has(> form.cfw-checkout) { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 48px; }
.woocommerce:has(> form.cfw-checkout) > *, form.cfw-checkout > * { flex: 1 1 100%; min-width: 0; box-sizing: border-box; }
form.cfw-checkout { display: contents; }
.woocommerce:has(> form.cfw-checkout) > .woocommerce-form-coupon-toggle, .woocommerce:has(> form.cfw-checkout) > form.checkout_coupon { order: 2; }
form.cfw-checkout #order_review_heading { margin-top: 0; }
@media (min-width: 900px) {
  form.cfw-checkout > #customer_details { order: 3; flex: 1 1 0; margin-top: calc(-1 * var(--cfw-coupon-h, 0px)); }
  form.cfw-checkout > .cfw-checkout-side { order: 3; flex: 0 0 380px; }
  form.cfw-checkout #customer_details .col-1, form.cfw-checkout #customer_details .col-2 { float: none; width: 100%; }
  /* Above the order column: as wide as it, alone on its line */
  .woocommerce:has(> form.cfw-checkout) > .woocommerce-form-coupon-toggle, .woocommerce:has(> form.cfw-checkout) > form.checkout_coupon { flex: 0 0 380px; margin-left: calc(100% - 380px); }
}
@media (max-width: 899px) {
  form.cfw-checkout .cfw-checkout-side, form.cfw-checkout #order_review { display: contents; }
  form.cfw-checkout .cfw-checkout-side > *, form.cfw-checkout #order_review > * { flex: 1 1 100%; min-width: 0; }
  form.cfw-checkout #order_review_heading { order: 3; }
  form.cfw-checkout .woocommerce-checkout-review-order-table { order: 4; margin-bottom: 24px; }
  form.cfw-checkout > #customer_details { order: 5; }
  form.cfw-checkout #payment { order: 6; }
}

/* Designer pages: logo, name, count and description, their centerpieces beside them (functions.php) */
.cfw-designer-head { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.cfw-designer-head__intro { display: flex; align-items: center; gap: 20px; min-width: 0; }
.cfw-designer-logo { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; }
.cfw-designer-head h1 { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.cfw-designer-count { margin: 4px 0 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.cfw-designer-desc p { margin: 8px 0 0; max-width: 560px; color: var(--wp--preset--color--muted); }
.cfw-designer-models { display: flex; gap: 10px; flex: none; }
.cfw-designer-model img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--wp--preset--color--line); }
.cfw-designer-model:hover img, .cfw-designer-model:focus-visible img { border-color: var(--wp--preset--color--accent); }
@media (max-width: 1000px) { .cfw-designer-model:nth-child(n+4) { display: none; } }
@media (max-width: 600px) {
  .cfw-designer-head { flex-wrap: wrap; gap: 16px; padding: 16px 0 20px; }
  .cfw-designer-logo { width: 64px; height: 64px; border-radius: 12px; }
  .cfw-designer-model img { width: 72px; height: 72px; }
}
/* Home page's designer cards: the logo keeps its square size inside the row */
.cfw-designer-card .wp-block-image { flex: none; margin: 0; }
.cfw-designer-card .wp-block-image img { width: 72px !important; height: 72px !important; display: block; }

/* Header search: the magnifying glass dark on mint, whatever other styles say */
.cfw-header .wp-block-search__button {
  background-color: var(--wp--preset--color--accent, #68f8b0) !important;
  color: var(--wp--preset--color--base, #0c0316) !important;
  border: 0 !important;
}
.cfw-header .wp-block-search__button svg { fill: currentColor !important; }

/* Header cart: a mint button, as in the mockup */
.cfw-header .wc-block-mini-cart__button {
  background-color: var(--wp--preset--color--accent, #68f8b0) !important;
  color: var(--wp--preset--color--base, #0c0316) !important;
  border-radius: 8px; min-height: 46px; padding: 0 14px !important; font-weight: 700;
}
.cfw-header .wc-block-mini-cart__button svg { fill: currentColor !important; color: inherit !important; }
.cfw-header .wc-block-mini-cart__badge {
  background-color: var(--wp--preset--color--base, #0c0316) !important;
  color: var(--wp--preset--color--accent, #68f8b0) !important;
  border-color: var(--wp--preset--color--accent, #68f8b0) !important;
}

/* Product names in white, mint on hover, so the mint series line stands out under them */
.wp-block-post-title a, .wc-block-product-template .wp-block-post-title a { color: var(--wp--preset--color--text); }
.wp-block-post-title a:hover { color: var(--wp--preset--color--accent); text-decoration: none; }

/* Form fields on the dark background: option menus, quantity, sorting, account and checkout fields */
select, .woocommerce select, .wc-block-components-select select,
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], textarea {
  background-color: var(--wp--preset--color--surface-2);
  color: var(--wp--preset--color--text);
  border: 1px solid var(--wp--preset--color--line-strong);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 12px;
  font: inherit;
}
textarea { padding: 10px 12px; }
/* Dropdowns: WooCommerce's option menu has 0.9em padding above and below, which inside the 42px box and the page's
   tall line height pushed the text below the box (cut off, to 0.1.21) */
select, .woocommerce select, .woocommerce div.product form.cart .variations select {
  height: 42px; padding-top: 0 !important; padding-bottom: 0 !important; padding-right: 36px; line-height: normal !important;
}
select option { background-color: var(--wp--preset--color--surface); color: var(--wp--preset--color--text); }
.woocommerce .quantity input.qty { width: 4.5em; text-align: center; padding: 0 6px; }

/* Product gallery: thumbnails six across, so a listing with many images stays compact */
.woocommerce-product-gallery .flex-control-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px !important; }
.woocommerce-product-gallery .flex-control-thumbs li { width: auto !important; margin: 0 !important; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: 6px; aspect-ratio: 1; object-fit: cover; }
.woocommerce-product-gallery__image img { border-radius: 14px; }

/* Description / Additional information / Reviews tabs on the dark background */
.woocommerce-tabs ul.tabs, .wc-tabs { border-bottom: 1px solid var(--wp--preset--color--line) !important; padding: 0 !important; margin: 0 0 20px !important; display: flex; flex-wrap: wrap; gap: 6px; }
.woocommerce-tabs ul.tabs::before, .woocommerce-tabs ul.tabs li::before, .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce-tabs ul.tabs li { background: transparent !important; border: 0 !important; border-radius: 8px 8px 0 0 !important; margin: 0 !important; padding: 0 !important; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 10px 16px !important; color: var(--wp--preset--color--muted) !important; font-weight: 600; }
.woocommerce-tabs ul.tabs li.active { background: var(--wp--preset--color--surface) !important; border: 1px solid var(--wp--preset--color--line) !important; border-bottom-color: var(--wp--preset--color--surface) !important; }
.woocommerce-tabs ul.tabs li.active a { color: var(--wp--preset--color--text) !important; }
.woocommerce-tabs .panel { color: var(--wp--preset--color--text); }
.woocommerce table.shop_attributes th, .woocommerce table.shop_attributes td { border-color: var(--wp--preset--color--line) !important; background: transparent !important; color: var(--wp--preset--color--text); }
