/* Shop parts in the site's dark style: the add-to-cart form on the designed product pages, WooCommerce's notices,
   and the cart, checkout and account pages. inc/shop.php loads this file on shop pages only, after app.css, wp.css
   and WooCommerce's own styles. Colours come from app.css; no blue, green or purple. */

/* WooCommerce's colour settings, set to the site palette. */
:root {
  --woocommerce: var(--sun);
  --wc-primary: var(--sun);
  --wc-primary-text: var(--ink);
  --wc-secondary: var(--surface);
  --wc-secondary-text: var(--paper);
  --wc-highlight: var(--sun);
  --wc-highligh-text: var(--ink);
  --wc-content-bg: var(--ink);
  --wc-subtext: var(--stone);
  --wc-green: var(--sun);
  --wc-blue: var(--sun);
  --wc-red: var(--ember);
  --wc-destructive: var(--ember);
  --wc-form-color-background: transparent;
  --wc-form-color-text: var(--paper);
  --wc-form-border-color: #55504a;
  --wc-form-border-radius: 0;
  --wc-separator-color: var(--line);
}

/* Buttons: the prototype's .btn.solid (yellow, square). */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  background: var(--sun); color: var(--ink); border: 1px solid var(--sun); border-radius: 0;
  font: 600 16px/1.2 var(--body); text-decoration: none;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover {
  background: var(--paper); border-color: var(--paper); color: var(--ink);
}
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled],
.woocommerce button.button.alt:disabled, .woocommerce button.button.alt:disabled[disabled],
.woocommerce button.button:disabled:hover, .woocommerce button.button.alt:disabled:hover {
  background: var(--sun); border-color: var(--sun); color: var(--ink); opacity: 0.45; padding: 0 22px;
}

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
  background: var(--surface); color: var(--paper); border-top: 3px solid var(--sun); border-radius: 0;
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--sun); }
.woocommerce-error { border-top-color: var(--ember); }
.woocommerce-error::before { color: var(--ember); }
.woocommerce-message a:not(.button), .woocommerce-info a:not(.button), .woocommerce-error a:not(.button) { color: var(--sun); }
.woocommerce-message .button, .woocommerce-info .button, .woocommerce-error .button { min-height: 40px; margin-left: 16px; }
.ag-notices { margin-top: 24px; }
.ag-notices > :last-child { margin-bottom: 0; }

/* Designed product pages: WooCommerce's form in the prototype's field style (.field in app.css) */
.ag-buy form.cart { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; }
/* Shop release (14 Nov): the plugin's pickers take the full width of their column. The Fable set page shows its seven
   cards in its own row, so the plugin's list of a fixed set (no picker) stays out of the buy box; a browser without
   :has() gets small thumbnails instead. */
.ag-form .ag-printpick, .ag-form .ag-cardset { align-self: stretch; width: 100%; }
.ag-form .ag-cardset:not(:has(.ag-card-add)) { display: none; }
.ag-form .ag-card > img { max-width: 64px; }
.ag-buy table.variations { width: 100%; margin: 0; border: 0; border-collapse: collapse; }
.ag-buy table.variations tbody, .ag-buy table.variations tr, .ag-buy table.variations th, .ag-buy table.variations td {
  display: block; padding: 0; border: 0; background: none; text-align: left;
}
.ag-buy table.variations tr + tr { margin-top: 14px; }
.ag-buy table.variations th { padding-bottom: 6px; font-weight: 400; }
.ag-buy table.variations label, .ag-buy .quantity label { font-size: 14px; color: var(--stone); line-height: 1.4; }
.ag-buy .quantity label.screen-reader-text {
  position: static !important; display: block; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none;
  white-space: normal; margin-bottom: 6px;
}
.ag-buy select, .woocommerce .ag-buy .quantity .qty {
  min-height: 50px; padding: 12px 14px; background: transparent; border: 1px solid #55504a; border-radius: 0;
  color: var(--paper); font: inherit;
}
.ag-buy select { width: 100%; max-width: 380px; }
.ag-buy select option { background: var(--surface); color: var(--paper); }
.woocommerce .ag-buy .quantity .qty { width: 120px; text-align: left; }
.ag-buy .reset_variations { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--stone); }
.ag-buy .single_variation_wrap { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.ag-buy .single_variation:empty { display: none; }
.ag-buy .single_variation .price { font-size: 20px; color: var(--paper); font-variant-numeric: tabular-nums; }
.ag-buy .single_variation .stock { margin: 4px 0 0; font-size: 14px; color: var(--stone); }
.ag-buy .single_variation .stock.out-of-stock { color: var(--ember); }
.ag-buy .variations_button { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ag-buy .single_add_to_cart_button.disabled, .ag-buy .single_add_to_cart_button.disabled:hover {
  opacity: 0.45; cursor: not-allowed; background: var(--sun); border-color: var(--sun); color: var(--ink);
}
.ag-buy p.stock { margin: 0; font-size: 14px; color: var(--stone); }
.ag-buy p.stock.out-of-stock { color: var(--ember); }

/* Cart, checkout and account pages (template-parts/single-page.php). The page title is already in the page head. */
.woocommerce-cart .entry > h1:first-child, .woocommerce-checkout .entry > h1:first-child,
.woocommerce-account .entry > h1:first-child { display: none; }
.woocommerce-page .entry a:not(.button) { color: var(--paper); }
.woocommerce-page .entry a:not(.button):hover { color: var(--sun); }

/* Tables: cart, totals, order review */
.woocommerce table.shop_table { border: 1px solid var(--line); border-radius: 0; border-collapse: collapse; color: var(--paper); margin-bottom: 32px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border: 0; border-top: 1px solid var(--line); padding: 12px 14px; }
.woocommerce table.shop_table thead th { border-top: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); }
.woocommerce table.shop_table tfoot th, .woocommerce table.shop_table tfoot td { border-top: 1px solid var(--line); }
.woocommerce table.shop_table .amount { font-variant-numeric: tabular-nums; }
/* Column titles and prices stay on one line ("PRIC E", "$35. 00" broke in the cart with the long card lists; 14 Nov) */
.woocommerce table.shop_table thead th, .woocommerce table.shop_table .amount { white-space: nowrap; }
.woocommerce-cart table.cart img, .woocommerce-checkout table.cart img { width: 72px; height: 72px; object-fit: contain; background: #F2EFE8; }
.woocommerce-cart table.cart .product-name a { text-decoration: none; }
.woocommerce-cart table.cart .product-name .variation, .woocommerce td.product-name dl.variation { margin: 4px 0 0; font-size: 14px; color: var(--stone); }
.woocommerce td.product-name dl.variation dt, .woocommerce td.product-name dl.variation dd p { color: var(--stone); }
.woocommerce a.remove { color: var(--stone) !important; font-weight: 400; }
.woocommerce a.remove:hover { color: var(--ink) !important; background: var(--sun); }
.woocommerce-cart table.cart td.actions .coupon .input-text, .woocommerce form .input-text, .woocommerce-page form .input-text {
  min-height: 48px; padding: 10px 14px; background: transparent; color: var(--paper); border: 1px solid #55504a; border-radius: 0; font: inherit;
}
.woocommerce-cart table.cart td.actions .coupon .input-text { width: 180px; margin-right: 8px; }
.woocommerce-cart table.cart td.actions .coupon { display: flex; align-items: center; }
.woocommerce .quantity .qty { min-height: 44px; width: 80px; }
.woocommerce .cart-collaterals .cart_totals h2, .woocommerce-checkout #order_review_heading { margin-top: 0; }
.woocommerce .cart-collaterals .cart_totals table th { color: var(--stone); font-weight: 500; }
.woocommerce-cart .cart-collaterals .cart_totals p small, .woocommerce-cart .cart-collaterals .cart_totals table small,
.woocommerce-checkout .cart-collaterals .cart_totals table small { color: var(--stone); }
.woocommerce ul#shipping_method { margin: 0; padding: 0; list-style: none; }
.woocommerce ul#shipping_method li { margin: 0 0 6px; }
.woocommerce-shipping-destination, .woocommerce-shipping-contents { font-size: 14px; color: var(--stone); }
.woocommerce .wc-proceed-to-checkout a.checkout-button { display: flex; min-height: 56px; font-size: 18px; }

/* Forms: checkout, shipping calculator, login */
.woocommerce form .form-row label { font-size: 14px; color: var(--stone); line-height: 1.6; margin-bottom: 4px; }
.woocommerce form .form-row .input-text, .woocommerce form .form-row select, .woocommerce form .form-row textarea {
  min-height: 50px; padding: 12px 14px; background-color: transparent; color: var(--paper); border: 1px solid #55504a; border-radius: 0;
}
.woocommerce form .form-row textarea { min-height: 120px; }
.woocommerce form .form-row select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3EFE7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.woocommerce form .form-row select option, .woocommerce select option { background: var(--surface); color: var(--paper); }
.woocommerce form .form-row .input-text:focus, .woocommerce form .form-row select:focus { border-color: var(--sun); }
.woocommerce form .form-row .required { color: var(--sun); }
.woocommerce form .form-row .woocommerce-input-wrapper .description { background: var(--surface); color: var(--paper); border: 1px solid var(--line); }
.woocommerce form .form-row .woocommerce-input-wrapper .description::before { border-color: var(--surface) transparent transparent transparent; }
.woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register, .woocommerce form.lost_reset_password {
  border: 1px solid var(--line); border-radius: 0; padding: 24px; max-width: 560px;
}
.woocommerce-checkout .woocommerce-billing-fields h3, .woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 { margin-top: 0; }
.woocommerce .col2-set { margin-bottom: 40px; }
.woocommerce-terms-and-conditions { border: 1px solid var(--line); background: var(--surface); box-shadow: none; }
.woocommerce form .form-row input[type="checkbox"], .woocommerce form .form-row input[type="radio"] { accent-color: var(--sun); }

/* Payment box (checkout) */
.woocommerce-checkout #payment, .woocommerce-cart #payment { background: var(--surface); border: 1px solid var(--line); border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--line); }
.woocommerce-checkout #payment ul.payment_methods li { max-width: none; }
.woocommerce-checkout #payment ul.payment_methods li.woocommerce-notice { margin: 0; background: transparent; }
.woocommerce-checkout #payment div.payment_box { background: var(--ink); color: var(--soft); }
.woocommerce-checkout #payment div.payment_box::before { border-color: transparent transparent var(--ink) transparent; }
.woocommerce-checkout #payment .woocommerce-privacy-policy-text p { color: var(--stone); font-size: 14px; }
.woocommerce-checkout #payment #place_order { float: none; width: 100%; min-height: 56px; font-size: 18px; margin-top: 8px; }

/* Country and state pickers (selectWoo). The list opens at the end of the page, outside .woocommerce. */
.select2-container--default .select2-selection--single {
  height: 50px; background: transparent; border: 1px solid #55504a; border-radius: 0;
}
.select2-container--default .select2-selection--single .select2-selection__rendered,
:where(.woocommerce) .select2-container .select2-selection--single .select2-selection__rendered { color: var(--paper); line-height: 34px; padding-left: 14px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 48px; right: 6px; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: var(--stone); }
.select2-dropdown, :where(.woocommerce) .select2-container .select2-dropdown { background: var(--surface); color: var(--paper); border: 1px solid var(--line); border-radius: 0; }
.select2-container--default .select2-search--dropdown .select2-search__field { background: transparent; color: var(--paper); border: 1px solid #55504a; }
.select2-container--default .select2-results__option[aria-selected="true"], .select2-container--default .select2-results__option[data-selected="true"] { background: var(--line); color: var(--paper); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--sun); color: var(--ink); }

/* Account page */
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-account .woocommerce-MyAccount-navigation a { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); display: inline-flex; align-items: center; text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce form.login .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 8px; margin-right: 16px; }
.woocommerce .lost_password a { color: var(--stone); }

@media (max-width: 768px) {
  .woocommerce table.shop_table_responsive tr td, .woocommerce-page table.shop_table_responsive tr td { background: none; }
  .woocommerce-cart table.cart td.actions .coupon { flex-wrap: wrap; gap: 8px; }
  .woocommerce-cart table.cart td.actions .coupon .input-text { width: 100%; margin-right: 0; }
}
