/*!
 * WooCommerce bridge stylesheet.
 *
 * Cart, single-product gallery/tabs, and the shop loop all use theme
 * template overrides that already output main.css's own bespoke classes
 * (.cart-item, .pdp-tabs, .card, …), so none of those need CSS mapped here.
 *
 * Checkout and My Account are deliberately NOT template-overridden (see
 * inc/woocommerce/hooks-cart-checkout-account.php's file header) — their
 * native WooCommerce structure is close enough to the approved design
 * that restyling WooCommerce's own default classes achieves it without
 * copying whole templates. This file is that mapping: every selector on
 * the left is a real WooCommerce/WordPress default class; every
 * declaration reuses main.css's existing design tokens and component
 * patterns rather than introducing new ones.
 */

/* ===== Checkout — .checkout-layout (main.css §14e) via CSS Grid areas ===== */
.woocommerce-checkout form.checkout{
  display:grid;
  grid-template-columns:1fr 380px;
  grid-template-rows:max-content 1fr;
  gap:48px;
  grid-template-areas:"left rhead" "left rbody";
  padding:48px 0 88px;
  align-items:start;
}
.woocommerce-checkout #customer_details{grid-area:left;}
.woocommerce-checkout #order_review_heading{grid-area:rhead; font-size:19px; margin:0 0 6px;}
.woocommerce-checkout #order_review{grid-area:rbody; position:sticky; top:110px;}
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order-table{
  border:1px solid var(--line); border-radius:8px; padding:28px; background:var(--white);
}
@media (max-width:1080px){
  .woocommerce-checkout form.checkout{grid-template-columns:1fr; grid-template-areas:"left" "rhead" "rbody";}
  .woocommerce-checkout #order_review{position:static;}
}

/* Each fieldset (billing / shipping / additional info) becomes a .checkout-block card */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-additional-fields,
.woocommerce-checkout #payment{
  border:1px solid var(--line); border-radius:8px; padding:30px; margin-bottom:24px; background:var(--white);
}
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3{font-size:19px; margin-bottom:6px;}

/* Form fields -> .field styling */
.woocommerce-checkout .form-row{margin-bottom:20px;}
.woocommerce-checkout .form-row label{display:block; font-size:14px; font-weight:700; margin-bottom:7px;}
.woocommerce-checkout .form-row .required{color:var(--red); text-decoration:none;}
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea{
  width:100%; font-family:var(--sans); font-size:16px; color:var(--ink);
  padding:13px 14px; border:1px solid var(--line); border-radius:3px;
  background:var(--white); outline:none; transition:border-color .15s ease, box-shadow .15s ease;
}
.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus{border-color:var(--red); box-shadow:0 0 0 3px rgba(215,38,47,.12);}

/* Shipping methods + payment methods -> .radio-card */
.woocommerce-checkout ul#shipping_method,
.woocommerce-checkout ul.wc_payment_methods{list-style:none; margin:0; padding:0;}
.woocommerce-checkout ul#shipping_method li,
.woocommerce-checkout ul.wc_payment_methods li.wc_payment_method{
  display:flex; gap:14px; align-items:flex-start; border:1px solid var(--line);
  border-radius:6px; padding:18px 20px; margin-bottom:12px; cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
.woocommerce-checkout ul#shipping_method li:has(input:checked),
.woocommerce-checkout ul.wc_payment_methods li.wc_payment_method:has(input:checked){
  border-color:var(--red); background:var(--red-tint);
}
.woocommerce-checkout ul#shipping_method input,
.woocommerce-checkout ul.wc_payment_methods input{margin-top:3px; width:18px; height:18px; accent-color:var(--red); flex:none;}
.woocommerce-checkout .payment_box{background:var(--mist); border-left:3px solid var(--slate); padding:18px 20px; border-radius:2px; margin-top:8px; font-size:14px;}

/* Order review line items -> .mini-item */
.woocommerce-checkout .woocommerce-checkout-review-order-table{border:none; padding:0; width:100%;}
.woocommerce-checkout .woocommerce-checkout-review-order-table thead{display:none;}
.woocommerce-checkout .woocommerce-checkout-review-order-table tbody tr{
  display:flex; gap:14px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line);
}
.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr{display:flex; justify-content:space-between; padding:9px 0; font-size:15px;}
.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total{border-top:1px solid var(--line); margin-top:12px; padding-top:16px; font-size:20px; font-weight:800;}

.woocommerce-checkout #place_order{width:100%; margin-top:8px;}
.woocommerce-checkout #place_order,
.woocommerce-checkout .checkout-button{
  font-family:var(--sans); font-weight:600; font-size:16px; border-radius:var(--radius);
  cursor:pointer; border:1px solid transparent; padding:15px 28px;
  background:var(--red); color:var(--white); transition:background .15s ease, transform .15s ease;
}
.woocommerce-checkout #place_order:hover{background:var(--red-deep); transform:translateY(-1px);}

/* ===== My Account — .account-layout (main.css §14f) =====
   Scoped with :has() to the logged-in dashboard (nav + content) only —
   the same body.woocommerce-account/.woocommerce wrapper also holds the
   logged-out login/register view (woocommerce/myaccount/form-login.php's
   .signin-card), which must not be squeezed into the 250px nav column. */
.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation){
  display:grid; grid-template-columns:250px 1fr; gap:48px; padding:56px 0 88px; align-items:start;
}
@media (max-width:1080px){
  .woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation){grid-template-columns:1fr; gap:28px;}
}
.woocommerce-MyAccount-navigation ul{list-style:none; margin:0; padding:0; border:1px solid var(--line); border-radius:6px; overflow:hidden; position:sticky; top:110px;}
.woocommerce-MyAccount-navigation li{border-bottom:1px solid var(--line);}
.woocommerce-MyAccount-navigation li:last-child{border-bottom:none;}
.woocommerce-MyAccount-navigation li a{display:flex; align-items:center; gap:11px; padding:14px 18px; font-size:15px; font-weight:600; color:var(--ink-soft); text-decoration:none;}
.woocommerce-MyAccount-navigation li a:hover{background:var(--mist);}
.woocommerce-MyAccount-navigation li.is-active a{background:var(--red-tint); color:var(--red-deep);}
.woocommerce-MyAccount-content{min-width:0;}
.woocommerce-MyAccount-content > table.shop_table{width:100%; border-collapse:collapse;}
.woocommerce-MyAccount-content table.shop_table th{text-align:left; font-size:16.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--slate); padding:0 12px 12px 0; border-bottom:1px solid var(--line);}
.woocommerce-MyAccount-content table.shop_table td{padding:16px 12px 16px 0; font-size:15.5px; font-weight:500; border-bottom:1px solid var(--line);}
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button[type="submit"]{
  font-family:var(--sans); font-weight:600; font-size:15px; border-radius:var(--radius);
  cursor:pointer; border:1px solid transparent; padding:13px 22px;
  background:var(--red); color:var(--white);
}
.woocommerce-MyAccount-content .woocommerce-Address, .woocommerce-MyAccount-content address{
  border:1px solid var(--line); border-radius:8px; padding:26px; background:var(--white);
}
.woocommerce-MyAccount-content form .form-row label{display:block; font-size:14px; font-weight:700; margin-bottom:7px;}
.woocommerce-MyAccount-content form input.input-text,
.woocommerce-MyAccount-content form select{
  width:100%; font-family:var(--sans); font-size:16px; padding:13px 14px; border:1px solid var(--line); border-radius:3px;
}

/* Login/Register forms (rendered on the My Account page when logged out) */
.woocommerce-account .u-columns{display:grid; grid-template-columns:1fr 1fr; gap:64px; padding:64px 0 88px;}
.woocommerce-account .u-column1, .woocommerce-account .u-column2{border:1px solid var(--line); border-radius:8px; padding:38px; background:var(--white);}
@media (max-width:760px){.woocommerce-account .u-columns{grid-template-columns:1fr; gap:32px;}}

/* =============================================================
   Cart / Checkout — WooCommerce Blocks (confirmed live: this
   install renders the block-based Cart/Checkout, not the classic
   shortcode markup the section above targets — see
   POST-MIGRATION-VISUAL-AUDIT.md §5/§12 cause F). WooCommerce's
   own wc-blocks.css/checkout.css already loads before this file
   and fully styles/functions the interactive internals (quantity
   steppers, radio controls, coupon form, payment methods) — this
   section only restyles the confirmed outer wrapper classes to
   match the site's design tokens/spacing/card treatment, it does
   not replace or disable any WooCommerce block functionality.

   Wrapper class names below (.wp-block-woocommerce-cart-*,
   .wp-block-woocommerce-checkout-*) were confirmed by fetching a
   real cart/checkout page with an actual product in session. The
   more deeply-nested per-field/per-line-item classes are rendered
   client-side by React after hydration and could not be captured
   by a static fetch in this environment — those are left to
   WooCommerce's own default block styling for now; see
   PHASE-1-QA.md for the recommended manual browser follow-up.
   ============================================================= */

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout{
  padding:48px 0 88px;
  font-family:var(--sans);
  color:var(--ink);
}

/* Cart: items (left) + order summary (right), matching the original
   two-column cart-layout intent. */
.wp-block-woocommerce-cart .wc-block-cart{
  display:grid; grid-template-columns:1fr 380px; gap:48px; align-items:start;
}
.wp-block-woocommerce-cart-items-block{min-width:0;}
.wp-block-woocommerce-cart-order-summary-block{
  border:1px solid var(--line); border-radius:8px; padding:28px; background:var(--white);
  position:sticky; top:110px;
}
@media (max-width:1080px){
  .wp-block-woocommerce-cart .wc-block-cart{grid-template-columns:1fr;}
  .wp-block-woocommerce-cart-order-summary-block{position:static;}
}

.wc-block-cart__empty-cart__title{font-size:23px; margin-bottom:8px;}

/* Checkout: contact/address/shipping/payment fields (left) + order
   summary (right), matching the original checkout-layout intent. */
.wp-block-woocommerce-checkout .wc-block-checkout__main{min-width:0;}
.wp-block-woocommerce-checkout-fields-block,
.wp-block-woocommerce-checkout-contact-information-block,
.wp-block-woocommerce-checkout-shipping-address-block,
.wp-block-woocommerce-checkout-billing-address-block,
.wp-block-woocommerce-checkout-shipping-method-block,
.wp-block-woocommerce-checkout-payment-block{
  border:1px solid var(--line); border-radius:8px; padding:30px; margin-bottom:24px; background:var(--white);
}
.wp-block-woocommerce-checkout-order-summary-block{
  border:1px solid var(--line); border-radius:8px; padding:28px; background:var(--white);
  position:sticky; top:110px;
}
@media (max-width:1080px){
  .wp-block-woocommerce-checkout-order-summary-block{position:static;}
}

/* Buttons — reuse the same red/radius treatment as .btn-primary and the
   classic-checkout #place_order rule above, applied to WC Blocks' own
   generic button component. Theme CSS is enqueued after wc-blocks.css/
   checkout.css (confirmed via the live <link> order), so these selectors
   win on normal cascade order/specificity without needing !important. */
.wp-block-woocommerce-cart .wc-block-components-button.contained,
.wp-block-woocommerce-checkout .wc-block-components-button.contained,
.wp-block-woocommerce-cart button.wc-block-cart__submit-button,
.wp-block-woocommerce-checkout button.wc-block-components-checkout-place-order-button{
  font-family:var(--sans); font-weight:600; font-size:16px; border-radius:var(--radius);
  background:var(--red); color:var(--white); border:1px solid transparent;
}
.wp-block-woocommerce-cart .wc-block-components-button.contained:hover,
.wp-block-woocommerce-checkout .wc-block-components-button.contained:hover{
  background:var(--red-deep);
}

/* Focus/selected states reuse the same red accent as the classic radio-card
   rule above, applied to WC Blocks' own radio-control component. */
.wp-block-woocommerce-checkout .wc-block-components-radio-control__option--checked,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__option:focus-within{
  border-color:var(--red); background:var(--red-tint);
}

/* Cart summary: breathing room between the Due today row and the checkout button. */
.summary .wc-proceed-to-checkout { margin-top: 16px; }

/* Lost password / reset password: centred card matching the sign-in styling. */
.woocommerce-lost-password main .prose { padding: 64px 0 88px; }
.woocommerce-lost-password main .prose > .woocommerce { max-width: 520px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 40px 40px 24px; box-shadow: 0 10px 30px rgba(11, 12, 14, 0.06); }
.woocommerce-lost-password .woocommerce-ResetPassword > p:first-child { color: var(--slate); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.woocommerce-lost-password .woocommerce-ResetPassword .form-row { float: none; width: 100%; padding: 0; margin: 0 0 20px; }
.woocommerce-lost-password .woocommerce-ResetPassword .form-row label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.woocommerce-lost-password .woocommerce-ResetPassword .input-text { width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink); padding: 13px 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.woocommerce-lost-password .woocommerce-ResetPassword .input-text:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(215, 38, 47, 0.12); }
.woocommerce-lost-password .woocommerce-ResetPassword .clear { display: none; }
.woocommerce-lost-password .woocommerce-ResetPassword .button { width: 100%; font-family: var(--sans); font-weight: 600; font-size: 16px; padding: 15px 28px; border: 1px solid transparent; border-radius: var(--radius); background: var(--red); color: var(--white); cursor: pointer; transition: background 0.15s, transform 0.15s; }
.woocommerce-lost-password .woocommerce-ResetPassword .button:hover { background: var(--red-deep); transform: translateY(-1px); }
@media (max-width: 560px) {
	.woocommerce-lost-password main .prose { padding: 40px 0 56px; }
	.woocommerce-lost-password main .prose > .woocommerce { padding: 28px 22px 12px; }
}

/* Cart page: Apply (promo) button. .btn-ghost:hover set a light background
   under the button's white text, so the label vanished on hover. */
.promo-row .btn-ghost { transition: background 0.15s, color 0.15s, transform 0.15s; }
.promo-row .btn-ghost:hover { background: var(--red); color: var(--white); border-color: transparent; transform: translateY(-1px); }

/* Checkout: coupon form, input + button on one row, button styled like the theme's primary buttons. */
.woocommerce-checkout form.checkout_coupon { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-bottom: 20px; }
.woocommerce-checkout form.checkout_coupon .form-row { margin: 0; padding: 0; float: none; width: auto; }
.woocommerce-checkout form.checkout_coupon .form-row-first { flex: 1 1 260px; }
.woocommerce-checkout form.checkout_coupon .form-row-last { flex: 0 0 auto; }
.woocommerce-checkout form.checkout_coupon .clear { display: none; }
.woocommerce-checkout form.checkout_coupon .input-text { width: 100%; }
.woocommerce-checkout form.checkout_coupon .button { height: 50px; padding: 0 28px; font-family: var(--sans); font-weight: 600; font-size: 16px; border-radius: var(--radius); border: 1px solid transparent; background: var(--red); color: var(--white); cursor: pointer; transition: background 0.15s, transform 0.15s; white-space: nowrap; }
.woocommerce-checkout form.checkout_coupon .button:hover { background: var(--red-deep); color: var(--white); transform: translateY(-1px); }
@media (max-width: 560px) {
	.woocommerce-checkout form.checkout_coupon .form-row-first,
	.woocommerce-checkout form.checkout_coupon .form-row-last { flex: 1 1 100%; }
	.woocommerce-checkout form.checkout_coupon .button { width: 100%; }
}

/* Checkout cards: the h3 inherited a 32px top margin from the prose styles, on top of
   the card's own 30px padding, leaving a big empty band above each heading
   (most visible on the "Ship to a different address?" card). */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 { margin-top: 0; }
.woocommerce-checkout .woocommerce-shipping-fields h3#ship-to-different-address { margin-bottom: 0; }
.woocommerce-checkout .woocommerce-shipping-fields .shipping_address { margin-top: 20px; }

/* Order confirmation ("Order received") page: WooCommerce's own styles are dequeued, so the
   thank-you notice, order overview list and order details table rendered as unstyled text. */
.woocommerce-order-received main .prose { padding: 48px 0 88px; }
.woocommerce-order-received .woocommerce-order { max-width: 860px; margin: 0 auto; }

/* "Thank you" notice */
.woocommerce-order-received .woocommerce-thankyou-order-received { margin: 0 0 24px; padding: 18px 22px; background: var(--mist); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--ink); }

/* Order number / date / total / payment method as a four-up summary strip */
.woocommerce-order-received ul.order_details { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.woocommerce-order-received ul.order_details li { margin: 0; padding: 18px 22px; background: var(--white); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.woocommerce-order-received ul.order_details li strong { display: block; margin-top: 6px; font-size: 17px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }

/* Order details + customer details cards */
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details { margin: 0 0 24px; padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.woocommerce-order-received .woocommerce-order-details__title,
.woocommerce-order-received .woocommerce-column__title { margin: 0 0 16px; font-size: 22px; line-height: 1.25; color: var(--ink); }
.woocommerce-order-received table.order_details { width: 100%; margin: 0; border-collapse: collapse; border: 0; }
.woocommerce-order-received table.order_details th,
.woocommerce-order-received table.order_details td { padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 16px; color: var(--ink); }
.woocommerce-order-received table.order_details thead th { padding-top: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.woocommerce-order-received table.order_details th:last-child,
.woocommerce-order-received table.order_details td:last-child { text-align: right; }
.woocommerce-order-received table.order_details tfoot th { font-weight: 600; }
.woocommerce-order-received table.order_details tfoot tr:last-child th,
.woocommerce-order-received table.order_details tfoot tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.woocommerce-order-received table.order_details td.woocommerce-table__product-name a { font-weight: 600; color: var(--ink); text-decoration: none; }
.woocommerce-order-received table.order_details td.woocommerce-table__product-name a:hover { color: var(--red); }
.woocommerce-order-received table.order_details .product-quantity { color: var(--slate); font-weight: 400; }

/* Billing / shipping address blocks, if shown */
.woocommerce-order-received .woocommerce-customer-details .woocommerce-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.woocommerce-order-received .woocommerce-customer-details .woocommerce-column { float: none; width: auto; }
.woocommerce-order-received .woocommerce-customer-details address { margin: 0; font-style: normal; line-height: 1.6; color: var(--ink-soft); }

@media (max-width: 560px) {
	.woocommerce-order-received main .prose { padding: 32px 0 56px; }
	.woocommerce-order-received ul.order_details { grid-template-columns: 1fr 1fr; }
	.woocommerce-order-received ul.order_details li { padding: 14px 16px; }
	.woocommerce-order-received .woocommerce-order-details,
	.woocommerce-order-received .woocommerce-customer-details { padding: 22px 18px; }
}

/* My account > Addresses: the existing rule
   ".woocommerce-MyAccount-content .woocommerce-Address, .woocommerce-MyAccount-content address"
   gave BOTH the card and the <address> inside it a border + 26px padding, so each address was a
   box inside a box, with an oversized 32px title and the "Add/Edit" link dropped onto its own line. */
.woocommerce-MyAccount-content .woocommerce-Addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address { float: none; width: auto; margin: 0; padding: 26px 28px; }
.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 14px; }
.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address header h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address header a.edit { font-size: 15px; font-weight: 600; color: var(--red); white-space: nowrap; }
.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address header a.edit:hover { color: var(--red-deep); }
.woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address address { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 16px; font-style: normal; line-height: 1.6; color: var(--ink-soft); }

/* Order received: Billing / Shipping address card. The inner .woocommerce-columns block
   inherited 70px top and bottom padding (on top of the card's own 30px), and the phone /
   email lines carried an 18px bottom margin, leaving large empty bands inside the card. */
.woocommerce-order-received .woocommerce-customer-details .woocommerce-columns { padding: 0; margin: 0; }
.woocommerce-order-received .woocommerce-customer-details address p { margin: 8px 0 0; font-size: 15px; }
.woocommerce-order-received .woocommerce-customer-details address p:first-of-type { margin-top: 12px; }
