/* ════════════════════════════════════════════════════════════════
   Nordic Golf Drive — WooCommerce styling (single product, cart,
   checkout, my-account). Plain CSS (not Tailwind-compiled); uses the
   theme design tokens. Loaded only on WC pages (see inc/enqueue.php).
   Tokens: ink #111 · subtle #6b6b6b · line #e8e8e8 · paper #fafafa
           accent #8a9f5a · accent-deep #6b8040
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout: give WC pages room (the page.php wrapper is narrow) ── */
/* Cart/checkout/account article width is set in page.php (max-w-[1500px], matching
   the hero/header). Don't override it here. */
.woocommerce-cart article > .ngd-content,
.woocommerce-checkout article > .ngd-content,
.woocommerce-account article > .ngd-content { max-width: none; }

/* ── Buttons — match the theme pill style ──────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button,
.woocommerce-page .button,
.woocommerce #place_order,
.woocommerce button.single_add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  background: #8AA05A !important; color: #fff !important;
  border: 1px solid #8AA05A !important; border-radius: 8px !important;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 30px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  text-decoration: none;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce #place_order:hover,
.woocommerce button.single_add_to_cart_button:hover { background: #6b8040 !important; border-color: #6b8040 !important; color: #fff !important; }

/* Secondary / outline buttons */
.woocommerce a.button.wc-backward,
.woocommerce .cart .button[name="update_cart"],
.woocommerce button[name="update_cart"] { background: #fff !important; color: #111 !important; border-color: #e8e8e8 !important; }
.woocommerce a.button.wc-backward:hover,
.woocommerce button[name="update_cart"]:hover { background: #111 !important; color: #fff !important; border-color: #111 !important; }
.woocommerce button[name="update_cart"]:disabled { opacity: .45; }

/* ── Notices ───────────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top: none; border-radius: 12px; padding: 16px 20px 16px 48px;
  font-size: 14px; box-shadow: 0 1px 10px rgba(0,0,0,.05); position: relative;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { left: 18px; top: 18px; }
.woocommerce-message { background: #f3f6ec; color: #3f4d24; }
.woocommerce-message::before { color: #6b8040; }
.woocommerce-info { background: #f1f5f9; color: #334155; }
.woocommerce-info::before { color: #64748b; }
.woocommerce-error { background: #fef2f2; color: #991b1b; list-style: none; }
.woocommerce-error::before { color: #dc2626; }
.woocommerce-message .button,
.woocommerce-info .button { padding: 8px 18px; font-size: 11px; }

/* ── Form fields ───────────────────────────────────────────────── */
.woocommerce form .form-row label,
.woocommerce-account .woocommerce label { font-size: 13px; color: #6b6b6b; margin-bottom: 6px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection,
.woocommerce-account input.input-text,
.woocommerce-checkout input.input-text {
  border: 1px solid #e8e8e8; border-radius: 10px; padding: 12px 14px;
  font-size: 15px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; box-shadow: none;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: #111; outline: none; box-shadow: 0 0 0 3px rgba(138,159,90,.15);
}
/* select2 single-selection styling consolidated below (see #84/#75 block). */

/* ── Quantity stepper ──────────────────────────────────────────── */
.woocommerce .quantity { display: inline-flex; align-items: center; border: 1px solid #e8e8e8; border-radius: 8px; overflow: hidden; }
.woocommerce .quantity input.qty {
  width: 52px; height: 44px; text-align: center; border: 0; background: transparent;
  font-size: 15px; font-weight: 600; -moz-appearance: textfield;
}
.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* SINGLE PRODUCT styling moved to the Tailwind source (input.css → main.css)
   as .ngd-product-* component classes — see custom templates in
   woocommerce/single-product/. */

/* ════════════ CART (#53) ════════════ */
.woocommerce-cart table.shop_table { border: none; border-collapse: separate; border-spacing: 0; }
.woocommerce-cart table.shop_table thead th { border: none; border-bottom: 1px solid #e8e8e8; padding: 14px 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b6b6b; }
.woocommerce-cart table.shop_table td { border: none; border-bottom: 1px solid #f0f0f0; padding: 18px 12px; vertical-align: middle; }
.woocommerce-cart table.shop_table img { width: 72px; border-radius: 10px; background: #fafafa; }
.woocommerce-cart table.shop_table td.product-name a { color: #111; font-weight: 600; text-decoration: none; }
.woocommerce-cart table.shop_table td.product-name a:hover { color: #6b8040; }
/* Keep prices on one line (thousand separator is a space → was wrapping) */
.woocommerce-cart td.product-price,
.woocommerce-cart td.product-subtotal { white-space: nowrap; }
.woocommerce-cart td.product-price .woocommerce-Price-amount,
.woocommerce-cart td.product-subtotal .woocommerce-Price-amount { white-space: nowrap; }

/* Remove (×) button — bigger + more visible, last column (#107) */
.woocommerce-cart th.product-remove,
.woocommerce-cart td.product-remove { text-align: right; width: 70px; }
.woocommerce-cart td.product-remove { vertical-align: middle; }
.woocommerce-cart .product-remove a.remove {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 40px; height: 40px; line-height: 1; font-size: 26px; border-radius: 999px;
  color: #dc2626 !important; background: #fef2f2 !important; border: 1px solid #fca5a5; text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.woocommerce-cart .product-remove a.remove:hover { background: #dc2626 !important; color: #fff !important; border-color: #dc2626; transform: scale(1.05); }
.woocommerce-cart .cart_totals h2 { font-family: 'Nunito Sans'; font-weight: 800; font-size: 1.4rem; margin-bottom: 16px; }
.woocommerce-cart .cart_totals table { border-radius: 14px; overflow: hidden; border: 1px solid #e8e8e8; }
.woocommerce-cart .cart_totals table th { background: #fafafa; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { width: 100%; font-size: 14px; padding: 16px; }

/* Inline layout — items left, totals right (#61) */
.ngd-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; transition: opacity .2s ease; }
@media (max-width: 900px) { .ngd-cart-layout { grid-template-columns: 1fr; gap: 28px; } }
.ngd-cart-layout.ngd-cart-loading { opacity: .5; pointer-events: none; }
.ngd-cart-layout .cart-collaterals { width: 100%; float: none; margin: 0; }
.ngd-cart-layout .cart-collaterals .cart_totals { float: none; width: 100%; }
.ngd-cart-layout .cross-sells { display: none; }

/* Cart quantity stepper sizing inside the table */
.woocommerce-cart .product-quantity .ngd-qty-stepper { max-width: 130px; }

/* Coupon row — input + button same height, wider input (#60).
   WooCommerce core forces `width:80px` on .input-text via a higher-specificity
   selector (`.woocommerce #content table.cart td.actions .input-text`) and floats
   .coupon (which shrink-wraps it). Both are overridden below, so the field is
   wide enough to actually read the code being typed. */
.woocommerce-cart td.actions { padding: 18px 0 0 !important; border: none !important; }
.woocommerce-cart td.actions .coupon,
.woocommerce #content table.cart td.actions .coupon,
.woocommerce-page #content table.cart td.actions .coupon {
  display: flex; gap: 10px; align-items: stretch;
  float: none; width: 100%; max-width: 460px;
}
.woocommerce-cart td.actions .coupon input#coupon_code,
.woocommerce #content table.cart td.actions .coupon input#coupon_code,
.woocommerce-page #content table.cart td.actions .coupon input#coupon_code {
  flex: 1 1 auto; width: auto !important; min-width: 0; height: 50px; padding: 0 16px;
  border: 1px solid #e8e8e8; border-radius: 8px; font-size: 15px; box-sizing: border-box;
}
.woocommerce-cart td.actions .coupon button,
.woocommerce #content table.cart td.actions .coupon .button,
.woocommerce-page #content table.cart td.actions .coupon .button {
  height: 50px; white-space: nowrap; flex: 0 0 auto; width: auto;
}

/* ════════════ CHECKOUT — custom template (form-checkout.php / payment.php) ════════════ */
.woocommerce-checkout h3 { font-family: 'Nunito Sans', system-ui, sans-serif; font-weight: 800; }

/* Two-column: customer details (card) left, order summary (card) right */
.ngd-checkout-grid { display: block; }
@media (min-width: 992px) {
  .ngd-checkout-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 40px; align-items: start; }
  .ngd-checkout-aside { position: sticky; top: 130px; }
}
.ngd-checkout-main, .ngd-checkout-aside { min-width: 0; }

/* Customer-details card; billing then shipping stacked full width */
.ngd-checkout #customer_details { display: block; border: 1px solid #e8e8e8; border-radius: 16px; padding: 24px 26px; background: #fff; }
.ngd-checkout #customer_details .col-1,
.ngd-checkout #customer_details .col-2 { width: 100% !important; float: none !important; }
.ngd-checkout #customer_details .col-2 { margin-top: 8px; }
.ngd-checkout .woocommerce-billing-fields h3,
.ngd-checkout .woocommerce-shipping-fields h3,
.ngd-checkout .woocommerce-additional-fields h3 { margin: 0 0 16px; font-size: 1.15rem; }

/* Order summary card */
.ngd-checkout-aside-title { margin: 0 0 16px; font-size: 1.3rem; }
.ngd-checkout #order_review { background: #fafafa; border: 1px solid #e8e8e8; border-radius: 16px; padding: 22px; }
.ngd-checkout #order_review table.shop_table { background: transparent; border: none; margin: 0; }
.ngd-checkout #order_review table.shop_table th,
.ngd-checkout #order_review table.shop_table td { border-color: #ececec; padding: 11px 4px; }
.ngd-checkout #order_review .cart-subtotal th, .ngd-checkout #order_review .order-total th { font-weight: 600; }
.ngd-checkout #order_review .order-total .amount { font-size: 1.15rem; }

/* Payment methods as selectable cards */
.ngd-payment { background: transparent; }
.ngd-payment ul.payment_methods { list-style: none; margin: 18px 0 16px; padding: 0; border: none; }
.ngd-payment ul.payment_methods li { border: 1px solid #e8e8e8; border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; background: #fff; transition: border-color .15s ease, background .15s ease; }
.ngd-payment ul.payment_methods li:has(input:checked) { border-color: #8AA05A; background: #f6f8f0; }
.ngd-payment ul.payment_methods li label { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ngd-payment ul.payment_methods li img { max-height: 24px; width: auto; margin-left: auto; }
.ngd-payment div.payment_box { background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; margin-top: 10px; font-size: 13px; color: #6b6b6b; }
.ngd-payment div.payment_box::before { display: none; }
.ngd-place-order { width: 100%; font-size: 14px; padding: 16px; margin-top: 14px; }
.ngd-payment .woocommerce-terms-and-conditions-wrapper { margin: 8px 0 4px; font-size: 13px; }

/* Terms checkbox — Tailwind Forms styles it via :where() (0 specificity), which
   other rules override and collapse the box. Force a visible, branded checkbox. */
.woocommerce-checkout .form-row.terms .checkbox,
.woocommerce-checkout .woocommerce-form__label-for-checkbox.checkbox { display: flex !important; align-items: flex-start; gap: 10px; cursor: pointer; }
.woocommerce-checkout input#terms,
.woocommerce-checkout .form-row input.input-checkbox {
  -webkit-appearance: none; appearance: none;
  display: inline-block !important;
  width: 20px; height: 20px; min-width: 20px; flex: 0 0 20px;
  margin: 1px 0 0; padding: 0;
  border: 2px solid #cfd8bd; border-radius: 5px; background: #fff;
  cursor: pointer; vertical-align: middle; transition: background .15s ease, border-color .15s ease;
}
.woocommerce-checkout input#terms:hover,
.woocommerce-checkout .form-row input.input-checkbox:hover { border-color: #8AA05A; }
.woocommerce-checkout input#terms:checked,
.woocommerce-checkout .form-row input.input-checkbox:checked {
  background-color: #8AA05A; border-color: #8AA05A;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E");
  background-size: 100% 100%; background-repeat: no-repeat; background-position: center;
}
.woocommerce-checkout input#terms:focus,
.woocommerce-checkout .form-row input.input-checkbox:focus { outline: none; box-shadow: 0 0 0 3px rgba(138,160,90,.2); }

/* #94 — shop / category archive hero band */
.ngd-shop-hero { background: linear-gradient(180deg, #f6f8f0 0%, #ffffff 100%); border-bottom: 1px solid #eef1e6; position: relative; overflow: hidden; }
.ngd-shop-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 999px; background: radial-gradient(circle, rgba(138,160,90,.12), rgba(138,160,90,0) 70%); pointer-events: none; }
.ngd-shop-hero .eyebrow { color: #8AA05A; }

/* #82 / #83 — neutralise WooCommerce's default dark-grey #payment box (#ebe9eb,
   set via the #payment ID so a class can't override it). Match the light column. */
.ngd-checkout #payment,
.woocommerce-checkout #payment { background: transparent !important; border-radius: 0; }
.ngd-checkout #payment::before,
.woocommerce-checkout #payment::before { display: none !important; }
.ngd-checkout #payment .form-row.place-order,
.woocommerce-checkout #payment .place-order { background: transparent !important; padding: 0; margin: 0; border: 0; }

/* #81 — order-notes textarea border should match the other (light) field boxes. */
.ngd-checkout #order_comments,
.woocommerce-checkout #order_comments { border: 1px solid #e8e8e8 !important; border-radius: 10px; }

/* #84 / #75 — country / state select (select2) must fill its row and align like
   the other inputs (was mis-sized / mis-positioned on checkout & edit-address). */
.woocommerce-page .select2-container { width: 100% !important; }
/* The generic form-field rule adds padding:12px to .select2-selection which,
   combined with line-height, pushed the text to the bottom of an over-tall box.
   Reset padding and vertically centre via flex. */
.woocommerce-page .select2-container--default .select2-selection--single {
  height: 48px !important; min-height: 48px !important; padding: 0 !important;
  border: 1px solid #e8e8e8 !important; border-radius: 10px !important;
  display: flex !important; align-items: center !important;
}
.woocommerce-page .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.2 !important; padding: 0 36px 0 14px !important; margin: 0 !important; color: #111;
}
.woocommerce-page .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 0 !important; bottom: 0 !important; height: auto !important; right: 12px;
}
.woocommerce-page form .form-row.address-field,
.woocommerce-page #billing_country_field,
.woocommerce-page #shipping_country_field,
.woocommerce-page #billing_state_field,
.woocommerce-page #shipping_state_field { width: 100%; float: none; clear: both; }

/* MY ACCOUNT styling moved to the Tailwind source (input.css → main.css) as
   .ngd-account-* classes — see custom templates in woocommerce/myaccount/. */
.woocommerce-account.woocommerce-login .woocommerce { max-width: 460px; margin: 0 auto; }
.woocommerce form.login,
.woocommerce form.register { border: 1px solid #e8e8e8; border-radius: 16px; padding: 28px; }

/* Order details / addresses */
.woocommerce table.shop_table { border-radius: 14px; }
.woocommerce .woocommerce-customer-details address { border: 1px solid #e8e8e8; border-radius: 12px; padding: 16px; }
