/* ==========================================================================
   Corpseflowers Court: WooCommerce restyle (presentation only).
   Loads after woocommerce.css. Includes the functional rules that lived in the
   parent theme's Additional CSS (P1/P4/P5), because Additional CSS is stored
   per theme and does not follow a child theme.
   ========================================================================== */

/* ---------- Shared controls ---------- */
.cf .button, .cf button.button, .cf a.button, .cf input.button,
.cf.woocommerce .button, .cf.woocommerce-page .button,
.cf.woocommerce div.product form.cart .button,
.cf .wc-block-components-button:not(.is-link) {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid var(--bone);
  background: var(--bone); color: var(--ink); font: 600 .875rem/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.cf .button:hover, .cf.woocommerce .button:hover, .cf .wc-block-components-button:not(.is-link):hover { background: #fff; color: var(--ink); transform: translateY(-1px); }
.cf .button.alt, .cf.woocommerce .button.alt, .cf.woocommerce div.product form.cart .button.alt { background: var(--bone); color: var(--ink); }
.cf .button.disabled, .cf .button:disabled, .cf .button.wc-variation-selection-needed { opacity: .5 !important; cursor: not-allowed; }
.cf .button.loading { opacity: .75; }

/* generic fields; WooCommerce cart/checkout BLOCKS keep their own field styling (floating labels) */
:is(.cf input[type="text"], .cf input[type="email"], .cf input[type="tel"], .cf input[type="password"],
.cf input[type="number"], .cf input[type="search"], .cf textarea, .cf select:not(.cf-select)):not(:where(.wp-block-woocommerce-checkout *, .wp-block-woocommerce-cart *, .wc-block-checkout *, .wc-block-cart *, .wc-block-components-quantity-selector *)) {
  min-height: 48px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--ink); color: var(--bone); font: 400 1rem/1.3 var(--sans); color-scheme: dark;
}
.cf textarea { min-height: 120px; }

/* ---------- Notices ---------- */
.cf .woocommerce-message, .cf .woocommerce-info, .cf .woocommerce-error, .cf .woocommerce-notices-wrapper .woocommerce-message {
  background: var(--crypt) !important; color: var(--bone) !important; border: 1px solid var(--line-2) !important;
  border-top: 3px solid var(--gilt) !important; border-radius: var(--r); padding: 16px 20px 16px 52px; list-style: none;
}
.cf .woocommerce-error { border-top-color: var(--poppy) !important; }
.cf .woocommerce-message::before, .cf .woocommerce-info::before { color: var(--gilt); }
.cf .woocommerce-message a, .cf .woocommerce-info a { color: var(--gilt) !important; }
.cf .woocommerce-message .button { min-height: 40px; padding: 0 18px; float: right; }
.cf .cf-added-notice { margin: 0 0 12px; color: var(--bone); font: 600 .8125rem/1.4 var(--sans); letter-spacing: .04em; }
.cf .cf-added-notice a, .cf .cf-undo-notice a { color: var(--gilt); text-decoration: underline; }
.cf .cf-undo-notice { margin: 16px 0; color: var(--bone); font: 600 .8125rem/1.4 var(--sans); letter-spacing: .04em; }

/* ---------- Shop archive ---------- */
.cf .cf-shopbar { flex-wrap: wrap; }
.cf .cf-shopbar .woocommerce-notices-wrapper { flex-basis: 100%; }
.cf.woocommerce .woocommerce-result-count { float: none; margin: 0; color: var(--ash); font-size: .875rem; }
.cf.woocommerce .woocommerce-ordering { float: none; margin: 0 0 0 auto; }
.cf .woocommerce-ordering select {
  min-height: 44px; padding: 0 40px 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--ink) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23efe7da' stroke-width='1.5'/></svg>") no-repeat right 16px center;
  color: var(--bone); font: 500 .8125rem/1 var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer;
}
.cf.woocommerce ul.products, .cf .woocommerce ul.products, .cf ul.products {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px);
  margin: 0; padding: 0; list-style: none;
}
.cf ul.products::before, .cf ul.products::after { display: none !important; content: none !important; }
.cf.woocommerce ul.products li.product, .cf .woocommerce ul.products li.product, .cf ul.products li.product {
  float: none !important; width: auto !important; margin: 0 !important; padding: 0; text-align: left; list-style: none;
}
.cf ul.products li.product .cf-pc__img img { margin: 0; box-shadow: none; }
.cf ul.products li.product a img { aspect-ratio: auto; background: transparent; }
.cf .cf-pc__img img { aspect-ratio: auto; }
.cf.woocommerce nav.woocommerce-pagination { margin-top: 48px; }
.cf.woocommerce nav.woocommerce-pagination ul { border: 0; display: inline-flex; gap: 8px; }
.cf.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.cf.woocommerce nav.woocommerce-pagination ul li a, .cf.woocommerce nav.woocommerce-pagination ul li span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--bone); background: transparent;
}
.cf.woocommerce nav.woocommerce-pagination ul li span.current, .cf.woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--bone); color: var(--ink); }
.cf .woocommerce-info.woocommerce-no-products-found { margin-top: 12px; }
.cf .cf-ladder { margin-top: clamp(56px, 7vw, 104px); }

/* ---------- Single product ---------- */
.cf .cf-pdp-wrap { padding-top: 20px; padding-bottom: var(--sec); }
.cf.woocommerce div.product { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(32px, 5vw, 80px); align-items: start; margin: 0; }
.cf.woocommerce div.product > * { grid-column: 1 / -1; }
.cf.woocommerce div.product > div.images, .cf.woocommerce div.product > .woocommerce-product-gallery { grid-column: 1; float: none; width: auto !important; margin: 0 0 32px; position: sticky; top: 100px; }
.cf.woocommerce div.product > div.summary { grid-column: 2; float: none; width: auto; margin: 0 0 32px; }
.cf.woocommerce div.product > span.onsale { position: absolute; top: 12px; left: 12px; z-index: 9; grid-column: auto; }
.cf.woocommerce span.onsale { min-height: 26px; min-width: 0; padding: 0 10px; line-height: 26px; border-radius: 999px; background: var(--ink); color: var(--bone); font: 600 .625rem/26px var(--sans); letter-spacing: .18em; text-transform: uppercase; }

/* gallery: product mockups sit on the bone "specimen plate"; botanical scenes on dark */
.cf.woocommerce div.product div.images .woocommerce-product-gallery__wrapper,
.cf.woocommerce div.product div.images .flex-viewport { background: var(--plate); border-radius: var(--r); overflow: hidden; }
.cf.woocommerce div.product div.images img { mix-blend-mode: multiply; }
.cf.woocommerce div.product.cf-scene div.images .woocommerce-product-gallery__wrapper,
.cf.woocommerce div.product.cf-scene div.images .flex-viewport { background: #120e0b; }
.cf.woocommerce div.product.cf-scene div.images img { mix-blend-mode: normal; }
.cf.woocommerce div.product div.images .flex-control-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cf.woocommerce div.product div.images .flex-control-thumbs li { width: 84px !important; float: none; }
.cf.woocommerce div.product div.images .flex-control-thumbs li img { border: 1px solid var(--line); border-radius: var(--r); background: var(--plate); opacity: .7; }
.cf.woocommerce div.product div.images .flex-control-thumbs li img.flex-active, .cf.woocommerce div.product div.images .flex-control-thumbs li img:hover { opacity: 1; border-color: var(--bone); }
.cf.woocommerce div.product div.images .woocommerce-product-gallery__trigger { background: var(--bone); }

/* summary */
.cf.woocommerce div.product .summary { --acc: var(--gilt); }
.cf.woocommerce div.product.cf-acc-ember .summary { --acc: var(--ember); }
.cf.woocommerce div.product.cf-acc-poppy .summary { --acc: var(--poppy); }
.cf.woocommerce div.product.cf-acc-moth .summary { --acc: var(--moth); }
.cf.woocommerce div.product.cf-acc-verdigris .summary { --acc: var(--verdigris); }
.cf.woocommerce div.product .product_title { font-size: clamp(2.5rem, 4.2vw, 3.75rem); line-height: .98; letter-spacing: -.03em; margin: 0; clear: none; }
.cf.woocommerce div.product .product_title .cf-italic { display: block; font-size: .5em; color: var(--acc); margin-top: .35em; letter-spacing: -.01em; line-height: 1.15; }
.cf.woocommerce div.product p.price, .cf.woocommerce div.product span.price { margin: 36px 0 6px; font: 500 1.375rem/1.2 var(--sans); color: var(--bone); }
.cf.woocommerce div.product p.price del, .cf.woocommerce div.product span.price del { color: var(--ash); opacity: 1; }
.cf.woocommerce div.product p.price ins, .cf.woocommerce div.product span.price ins { text-decoration: none; }
.cf .woocommerce-product-details__short-description { color: var(--bone-2); margin-bottom: 24px; }
.cf .woocommerce-product-details__short-description p { margin: 0 0 .8em; }

/* variations: readable dark selects (was P1 Additional CSS) */
.cf.woocommerce div.product form.cart { margin: 0 0 8px; }
.cf.woocommerce div.product form.cart .variations { margin: 0 0 16px; border: 0; width: 100%; }
.cf.woocommerce div.product form.cart .variations tr { display: grid; gap: 10px; margin-bottom: 18px; }
.cf.woocommerce div.product form.cart .variations th, .cf.woocommerce div.product form.cart .variations td { display: block; padding: 0; line-height: 1.2; text-align: left; }
.cf.woocommerce div.product form.cart .variations label { font: 600 .6875rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--bone-2); }
.cf.woocommerce div.product form.cart .variations select {
  width: 100%; max-width: 100%; min-height: 52px; margin: 0; padding: 0 44px 0 18px; border-radius: 999px;
  color: var(--bone) !important; -webkit-text-fill-color: var(--bone) !important; background-color: var(--ink) !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23efe7da' stroke-width='1.5'/></svg>") !important;
  background-repeat: no-repeat !important; background-position: right 18px center !important; background-size: 12px 8px !important;
  border: 1px solid var(--line-2) !important; font: 500 .9375rem/1 var(--sans); appearance: none; -webkit-appearance: none; color-scheme: dark; cursor: pointer;
}
.cf.woocommerce div.product form.cart .variations select:hover, .cf.woocommerce div.product form.cart .variations select:focus { border-color: var(--bone) !important; }
.cf.woocommerce div.product form.cart .variations select option { color: var(--bone); background: var(--ink); }
/* single-choice attributes (Seam Colors on tees, the one wall-hanging size) are hidden ONLY once a
   value is selected (the product default), so a shopper can never get stuck on a hidden empty select */
.cf.woocommerce div.product form.cart .variations tr:has(select[name="attribute_seam-colors"] option:checked:not([value=""])),
.cf.woocommerce div.product form.cart .variations tr:has(select[name="attribute_size"] option:checked:not([value=""])) { display: none; }
.cf.woocommerce div.product form.cart .reset_variations { display: inline-flex; align-items: center; min-height: 44px; color: var(--ash); font-size: .8125rem; text-decoration: underline; }
.cf.woocommerce div.product form.cart .single_variation_wrap .woocommerce-variation-price .price { margin: 0 0 12px; font-size: 1.125rem; }
.cf.woocommerce div.product form.cart .woocommerce-variation-availability { color: var(--ash); font-size: .875rem; }
.cf.woocommerce div.product form.cart .woocommerce-variation-add-to-cart, .cf.woocommerce div.product form.cart:not(.variations_form) { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: stretch; }
.cf.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.cf.woocommerce div.product form.cart div.quantity .qty, .cf.woocommerce .quantity .qty {
  width: 100%; min-height: 52px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink); color: var(--bone); text-align: center; font: 500 1rem var(--sans);
}
.cf.woocommerce div.product form.cart .button { float: none; width: 100%; min-height: 52px; }
.cf.woocommerce div.product .stock { color: var(--ash); }
.cf.woocommerce div.product .stock.out-of-stock { color: var(--poppy); }

.cf .product_meta { margin-top: 20px; font-size: .8125rem; color: var(--ash); }
.cf .product_meta a { color: var(--bone-2); text-decoration: underline; text-underline-offset: 3px; }

/* tabs: only "The story" (Description) remains, shown as a plain section */
.cf.woocommerce div.product .woocommerce-tabs { grid-column: 1 / -1; margin-top: 8px; padding-top: 40px; border-top: 1px solid var(--line); max-width: 860px; }
.cf.woocommerce div.product .woocommerce-tabs ul.tabs { display: none !important; }
.cf.woocommerce div.product .woocommerce-tabs .panel { margin: 0; padding: 0; color: var(--bone-2); font-size: 1.0625rem; line-height: 1.7; }
.cf.woocommerce div.product .woocommerce-tabs .panel::before { content: "The story"; display: block; font: 500 clamp(1.75rem, 3vw, 2.5rem)/1.1 var(--serif); color: var(--bone); letter-spacing: -.02em; margin-bottom: 18px; }
.cf.woocommerce div.product .woocommerce-tabs .panel ul { padding-left: 1.2em; }
.cf.woocommerce div.product .woocommerce-tabs .panel strong { color: var(--bone); }

/* empty Woo chrome hidden on live already (P5) */
.cf.single-product .woocommerce-product-rating, .cf.single-product a.woocommerce-review-link,
.cf.single-product #reviews, .cf.single-product .woocommerce-noreviews, .cf.single-product #review_form_wrapper,
.cf.single-product .sku_wrapper, .cf.single-product .woocommerce-product-attributes-item--weight { display: none !important; }

/* upsells (if any) use the Court card grid */
.cf.woocommerce div.product .up-sells { margin-top: 48px; }
.cf.woocommerce div.product .up-sells > h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 28px; }

/* sticky add bar (mobile): a jump link to Woo's own form */
.cf .cf-stickybuy .woocommerce-Price-amount { font: inherit; }
.cf .cf-stickybuy a.cf-btn { text-decoration: none; }

/* ---------- Cart / checkout (Woo blocks + classic) ---------- */
.cf .cf-entry .wp-block-woocommerce-cart, .cf .cf-entry .wp-block-woocommerce-checkout { color: var(--bone-2); }
.cf .wc-block-components-title, .cf .wc-block-cart__totals-title, .cf .wc-block-components-checkout-step__title,
.cf .wc-block-components-checkout-step__heading, .cf .wc-block-components-totals-item__label, .cf .wc-block-components-totals-item__value,
.cf .wc-block-components-product-name, .cf .wc-block-components-order-summary-item__description,
.cf .wc-block-components-product-price, .cf .wc-block-components-formatted-money-amount,
.cf .wc-block-cart-items__header, .cf .wc-block-components-panel__button { color: var(--bone) !important; }
.cf .wc-block-components-product-name { font: 500 1.125rem/1.25 var(--serif); text-decoration: none; }
.cf .wc-block-cart-items, .cf .wc-block-cart-items td, .cf .wc-block-cart-items th, .cf .wc-block-components-totals-wrapper,
.cf .wc-block-components-panel { border-color: var(--line) !important; }
.cf .wc-block-components-sidebar-layout .wc-block-components-main, .cf .wc-block-components-sidebar { color: var(--bone-2); }
.cf .wc-block-components-sidebar .wc-block-components-panel, .cf .wp-block-woocommerce-checkout-order-summary-block { background: var(--crypt); border-color: var(--line) !important; }
.cf .wc-block-components-quantity-selector { border-color: var(--line-2) !important; border-radius: 999px; }
.cf .wc-block-components-quantity-selector input, .cf .wc-block-components-quantity-selector button { color: var(--bone) !important; background: transparent; }
.cf .wc-block-cart-item__remove-link { color: var(--ash) !important; }
.cf .wc-block-components-product-metadata, .cf .wc-block-components-product-details { color: var(--ash); }
.cf .wc-block-components-checkbox__label, .cf .wc-block-components-radio-control__label, .cf .wc-block-checkout__terms { color: var(--bone-2); }
.cf .wc-block-components-checkout-place-order-button, .cf .wc-block-cart__submit-button { min-height: 56px; border-radius: 999px !important; }
/* text fields stay white (as on live), so their labels must be dark */
.cf .wc-block-components-text-input label, .cf .wc-block-components-combobox label, .cf .wc-block-components-combobox-control label,
.cf .wc-block-components-select label, .cf .wc-block-components-country-input label, .cf .wc-block-components-state-input label,
.cf .wc-block-components-country-input .wc-block-components-combobox-control__label, .cf .wc-block-components-state-input .wc-block-components-combobox-control__label {
  color: #161310 !important; -webkit-text-fill-color: #161310 !important; opacity: 1 !important;
}
.cf .wc-block-components-text-input input::placeholder, .cf .wc-block-components-combobox input::placeholder { color: #161310 !important; }
.cf .wc-block-components-text-input input, .cf .wc-block-components-combobox input, .cf .wc-block-components-select select { color: #161310 !important; -webkit-text-fill-color: #161310 !important; background: #fff !important; }
/* empty bag */
.cf.woocommerce-cart .wc-empty-cart-message svg, .cf.woocommerce-cart .cart-empty::before, .cf.woocommerce-cart h2.with-empty-cart-icon::before { display: none !important; }
.cf.woocommerce-cart .wc-block-cart__empty-cart__title, .cf.woocommerce-cart h2.with-empty-cart-icon, .cf.woocommerce-cart .cart-empty { font-size: 0 !important; color: transparent !important; background: transparent !important; border: 0 !important; }
.cf.woocommerce-cart .wc-block-cart__empty-cart__title::after, .cf.woocommerce-cart h2.with-empty-cart-icon::after, .cf.woocommerce-cart .cart-empty::after {
  content: "The bag is empty."; display: block; font: italic 400 clamp(1.5rem, 3vw, 2.25rem)/1.2 var(--serif); color: var(--bone);
}
.cf .wp-block-woocommerce-empty-cart-block .wp-block-separator { border-color: var(--line); }
.cf .wp-block-woocommerce-empty-cart-block h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 32px 0 20px; }

/* classic cart / checkout / account tables and forms */
.cf.woocommerce table.shop_table, .cf .woocommerce table.shop_table { border-color: var(--line); border-radius: var(--r); color: var(--bone-2); }
.cf.woocommerce table.shop_table th, .cf.woocommerce table.shop_table td { border-color: var(--line) !important; }
.cf.woocommerce form .form-row label { color: var(--bone-2); }
.cf.woocommerce form .form-row .input-text, .cf.woocommerce form .form-row select { background: var(--ink); color: var(--bone); border: 1px solid var(--line-2); }
.cf.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0 0 32px; border-top: 1px solid var(--line); }
.cf.woocommerce-account .woocommerce-MyAccount-navigation li { border-bottom: 1px solid var(--line); }
.cf.woocommerce-account .woocommerce-MyAccount-navigation li a { display: flex; align-items: center; min-height: 48px; color: var(--bone-2); }
.cf.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { color: var(--bone); }
.cf.woocommerce form.login, .cf.woocommerce form.register, .cf.woocommerce form.lost_reset_password { border-color: var(--line); border-radius: var(--r); }
.cf .woocommerce a.remove { color: var(--ash) !important; }
.cf .woocommerce a.remove:hover { background: var(--poppy); color: #fff !important; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cf.woocommerce ul.products, .cf ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf.woocommerce div.product { grid-template-columns: minmax(0, 1fr); }
  .cf.woocommerce div.product .product_title { overflow-wrap: break-word; } /* 1.0.9: no 390px overflow */
  .cf.woocommerce div.product > div.images, .cf.woocommerce div.product > .woocommerce-product-gallery, .cf.woocommerce div.product > div.summary { grid-column: 1; position: static; }
}
@media (max-width: 640px) {
  .cf.woocommerce ul.products, .cf ul.products { gap: 28px 12px; }
  .cf.woocommerce div.product form.cart .woocommerce-variation-add-to-cart, .cf.woocommerce div.product form.cart:not(.variations_form) { grid-template-columns: 1fr; }
  .cf.woocommerce div.product div.images .flex-control-thumbs li { width: 64px !important; }
  .cf.woocommerce .woocommerce-ordering { margin-left: 0; }
  .cf .woocommerce-message .button { float: none; display: flex; margin-top: 10px; }
}
@media (max-width: 480px) {
  .cf.woocommerce table.cart .quantity .qty, .cf .woocommerce a.remove, .cf .wc-block-components-quantity-selector__button,
  .cf .wc-block-cart-item__remove-link { min-width: 44px !important; min-height: 44px !important; }
}

/* block quantity stepper: undo the generic field styling on its inner input */
.cf .wc-block-components-quantity-selector { width: auto; max-width: 140px; }
.cf .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  min-height: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none; width: 40px; min-width: 40px;
}
.cf .wc-block-cart .wc-block-components-product-name { word-break: break-word; }
.cf .wc-block-components-panel__button, .cf .wc-block-components-totals-coupon__button { background: transparent !important; }
.cf.woocommerce div.product div.images .flex-control-thumbs li img { mix-blend-mode: normal; }
.cf.woocommerce div.product.cf-scene div.images .flex-control-thumbs li img { background: #120e0b; }
/* checkout block selects (country/state) stay white like the other block fields */
.cf .wc-blocks-components-select__container, .cf .wc-blocks-components-select__select, .cf .wc-block-components-select select {
  background: #fff !important; color: #161310 !important; -webkit-text-fill-color: #161310 !important; border-radius: 4px; color-scheme: light;
}
.cf .wc-blocks-components-select__label { color: #161310 !important; -webkit-text-fill-color: #161310 !important; }
.cf .wc-blocks-components-select__expand { fill: #161310; }

/* 1.0.1 (staging QC, Oct 28 2026)
   - Shop/category loop: Woo's ".woocommerce ul.products li.product a img { height:auto }" outranked the card
     rule, so card images grew ~5x taller than the 4:5 frame and the product sat out of view (blank cream cards).
   - Single product: if any other code prints Woo's own product title as well, only the Court title shows.
   - Single-choice attributes that have no default are auto-picked by cf.js and their row hidden. */
.cf ul.products li.product a .cf-pc__img img, .cf.woocommerce ul.products li.product a .cf-pc__img img { height: 100%; max-height: none; }
.cf.woocommerce div.product .summary h1.product_title ~ h1.product_title { display: none; }
.cf.woocommerce div.product .summary h1.product_title:not(.cf-ptitle) { display: none; } /* 1.0.7 fallback: only the Court title shows */
.cf.woocommerce div.product form.cart .variations tr.cf-single { display: none; }
