/* =============================================================================
   WOOCOMMERCE — SINGLE PRODUCT branding only
   Loaded only on is_product() (handle: cc-woocommerce). Woo's own stylesheets
   remain enabled, so this file LAYERS branding over Woo's default single-product
   layout — it does not rebuild layout. EVERY selector is scoped under
   .single-product so nothing reaches the shop archive, cart or checkout.

   Reuses the theme system:
   - tokens: --space-*, --radius-*, --font-heading, --font-body, --color-muted
   - palette: #092246 navy · #f4c430 / #ffd429 gold · #f5f2eb cream
   - add-to-cart button mirrors the theme .btn (gold fill, navy text, navy slide)
   ============================================================================= */

/* ── Spacing around the product block ──────────────────────────────────────── */

.single-product .mc-container {
  padding-block: clamp(40px, 5vw, 72px);
}

/* ── Gallery image ─────────────────────────────────────────────────────────── */

.single-product div.product .woocommerce-product-gallery__image img {
  border-radius: var(--radius-lg, 12px);
  background: #f5f2eb;
}

/* ── Title ─────────────────────────────────────────────────────────────────── */

.single-product div.product .product_title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #092246;
  margin: 0 0 var(--space-4, 16px);
}

/* ── Price ─────────────────────────────────────────────────────────────────── */

.single-product div.product .summary .price,
.single-product div.product p.price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #092246;
  margin: 0 0 var(--space-4, 16px);
}

.single-product div.product .price del,
.single-product div.product .price del .woocommerce-Price-amount {
  color: var(--color-muted, #6b6b6b);
  font-weight: 400;
  font-size: 0.7em;
}

.single-product div.product .price ins {
  text-decoration: none;
}

/* ── Star rating ───────────────────────────────────────────────────────────── */

.single-product div.product .star-rating span::before {
  color: #f4c430;
}

/* ── Short description ─────────────────────────────────────────────────────── */

.single-product div.product .woocommerce-product-details__short-description {
  color: rgba(9, 34, 70, 0.78);
  line-height: 1.65;
  margin-bottom: var(--space-6, 24px);
}

/* ── Add-to-cart: quantity + button (mirrors theme .btn) ───────────────────── */

.single-product div.product form.cart .quantity .qty {
  padding: 12px;
  border: 1px solid rgba(9, 34, 70, 0.18);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  color: #092246;
}

.single-product div.product form.cart .quantity .qty:focus {
  border-color: #f2c94c;
  box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.22);
  outline: none;
}

.single-product .button,
.single-product .single_add_to_cart_button {
  position: relative;
  border: 0;
  border-radius: 6px;
  background: #f4c430;
  color: #092246;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s ease, transform 0.25s ease;
}

.single-product .single_add_to_cart_button {
  min-height: 52px;
  padding: 14px 28px;
}

.single-product .button::before,
.single-product .single_add_to_cart_button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #092246;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
  z-index: -1;
}

.single-product .button:hover,
.single-product .single_add_to_cart_button:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.single-product .button:hover::before,
.single-product .single_add_to_cart_button:hover::before {
  transform: scaleX(1);
}

/* ── Stock + meta ──────────────────────────────────────────────────────────── */

.single-product div.product .stock {
  font-weight: 700;
  color: #1f7a3d;
}

.single-product div.product .stock.out-of-stock {
  color: #c33;
}

.single-product div.product .product_meta {
  margin-top: var(--space-6, 24px);
  font-size: 0.85rem;
  color: var(--color-muted, #6b6b6b);
}

/* ── Tabs (pill style) ─────────────────────────────────────────────────────── */

.single-product div.product .woocommerce-tabs ul.tabs {
  margin: 0 0 var(--space-6, 24px);
  padding: 0 0 var(--space-2, 8px);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
  border-bottom: 1px solid rgba(9, 34, 70, 0.12);
}

.single-product div.product .woocommerce-tabs ul.tabs::before {
  display: none;
}

.single-product div.product .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 999px;
}

.single-product div.product .woocommerce-tabs ul.tabs li::before,
.single-product div.product .woocommerce-tabs ul.tabs li::after {
  display: none;
}

.single-product div.product .woocommerce-tabs ul.tabs li a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #092246;
}

.single-product div.product .woocommerce-tabs ul.tabs li.active a {
  background: #f4c430;
}

.single-product div.product .woocommerce-tabs .panel {
  color: rgba(9, 34, 70, 0.82);
  line-height: 1.7;
}

.single-product div.product .woocommerce-tabs h2 {
  font-family: var(--font-heading);
  color: #092246;
  letter-spacing: -0.03em;
}

/* ── Related / upsell headings ─────────────────────────────────────────────── */

.single-product .related.products > h2,
.single-product .upsells.products > h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #092246;
  margin: 0 0 var(--space-6, 24px);
}

/* =============================================================================
   WOOCOMMERCE — CART & CHECKOUT (classic) — dark theme
   Loaded on is_cart() / is_checkout() (same cc-woocommerce handle). EVERY rule
   is scoped under .woocommerce-cart / .woocommerce-checkout so the light
   .single-product branding above is untouched. Layers the site dark theme over
   Woo's classic [woocommerce_cart] / [woocommerce_checkout] templates:
     - surfaces #111 / #171717, text #f5f5f5, headings #fff
     - palette #092246 navy · #f4c430 gold (hardcoded, as elsewhere here)
     - buttons mirror the theme .btn (gold fill, navy text, navy slide, 6px)
   ============================================================================= */

/* ── Page surface + base text ─────────────────────────────────────────────── */
/* Body AND the content wrappers (.site-main / .section) — Woo's content sits in
   a .section whose default background (var(--section-bg-colour, #fff) / cream)
   would otherwise paint over the dark body. !important beats those section bgs. */
body.woocommerce-cart,
body.woocommerce-checkout,
.woocommerce-cart main.site-main,
.woocommerce-checkout main.site-main,
.woocommerce-cart .section,
.woocommerce-checkout .section {
  background-color: #111111 !important;
}

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
  color: #f5f5f5;
}

.woocommerce-cart h1,
.woocommerce-cart h2,
.woocommerce-cart h3,
.woocommerce-checkout h1,
.woocommerce-checkout h2,
.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading {
  color: #ffffff;
}

.woocommerce-cart .woocommerce a:not(.button),
.woocommerce-checkout .woocommerce a:not(.button) {
  color: #f4c430;
}

/* ── Tables: cart, totals, order review ───────────────────────────────────── */
.woocommerce-cart table.cart,
.woocommerce-cart .cart_totals table,
.woocommerce-checkout .shop_table {
  background: #171717 !important;
  border: 1px solid #2a2a2a !important;
  color: #f5f5f5 !important;
}

.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td,
.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td,
.woocommerce-checkout .shop_table th,
.woocommerce-checkout .shop_table td,
.woocommerce-checkout .shop_table tfoot tr:last-child td {
  border-color: #2a2a2a !important;
  color: #f5f5f5 !important;
}

.woocommerce-cart table.cart thead th {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #ffffff !important;
}

.woocommerce-cart table.cart td.product-name a:hover,
.woocommerce-checkout .shop_table td.product-name a:hover {
  color: #f4c430 !important;
}

/* ── Cart totals: dark card so the heading + amounts read on the dark page ─── */
.woocommerce-cart .cart_totals {
  background: #171717;
  padding: 24px;
  border-radius: 8px;
}

.woocommerce-cart .cart_totals .amount,
.woocommerce-cart .cart_totals strong,
.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td,
.woocommerce-checkout .order-total th,
.woocommerce-checkout .order-total td,
.woocommerce-checkout .order-total .amount {
  color: #f5f5f5 !important;
}

/* Grand total in brand gold for hierarchy. */
.woocommerce-cart .cart_totals .order-total .amount,
.woocommerce-checkout .order-total .amount {
  color: #f4c430 !important;
}

/* Remove-item "×" */
.woocommerce-cart table.cart td.product-remove a.remove {
  color: #f4c430 !important;
}

/* ── Inputs: qty, coupon, billing fields ──────────────────────────────────── */
.woocommerce-cart input.qty,
.woocommerce-cart .coupon input[type="text"],
.woocommerce-checkout .input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-selection {
  background: #1a1a1a !important;
  color: #f5f5f5 !important;
  border: 1px solid #333333 !important;
  border-radius: 6px !important;
}

.woocommerce-cart input.qty:focus,
.woocommerce-cart .coupon input[type="text"]:focus,
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
  border-color: #f4c430 !important;
  box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.25) !important;
  outline: none;
}

.woocommerce-cart ::placeholder,
.woocommerce-checkout ::placeholder {
  color: #9a9a9a;
}

.woocommerce-cart label,
.woocommerce-checkout label,
.woocommerce-checkout .woocommerce-input-wrapper {
  color: #f5f5f5;
}

/* Coupon is hidden on the cart — vouchers are applied at checkout only. */
.woocommerce-cart .coupon {
  display: none;
}

/* ── Checkout payment + order-review surfaces ─────────────────────────────── */
.woocommerce-checkout #payment,
.woocommerce-checkout .woocommerce-checkout-review-order {
  background: #171717 !important;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

.woocommerce-checkout #payment .payment_box {
  background: #1d1d1d !important;
  color: #f5f5f5 !important;
}

.woocommerce-checkout #payment .payment_box::before {
  border-bottom-color: #1d1d1d !important;
}

.woocommerce-checkout #payment .wc_payment_method label {
  color: #f5f5f5;
}

/* ── Buttons — mirror the theme .btn (gold fill, navy text, navy slide) ────── */
.woocommerce-cart .button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
  position: relative;
  border: none !important;
  border-radius: 6px;
  background-color: #f4c430 !important;
  color: #092246;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s ease, transform 0.25s ease;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 22px;
  line-height: normal;
  text-align: center;
}

.woocommerce-cart .button::before,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::before,
.woocommerce-checkout #place_order::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #092246;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
  z-index: -1;
}

.woocommerce-cart .button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover {
  background-color: #f4c430 !important;
  color: #ffffff;
  transform: translateY(-2px);
}

.woocommerce-cart .button:hover::before,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover::before,
.woocommerce-checkout #place_order:hover::before {
  transform: scaleX(1);
}

/* ── Secondary buttons: "Update cart" + "Apply coupon" ─────────────────────
   Navy, so only "Proceed to checkout" reads as the gold primary action. Their
   ::before sweep is disabled (a navy slide on a navy button is invisible). */
.woocommerce-cart button[name="update_cart"],
.woocommerce-cart input[name="update_cart"],
.woocommerce-cart button[name="apply_coupon"],
.woocommerce-cart input[name="apply_coupon"] {
  background-color: #092246 !important;
  color: #ffffff !important;
  border: 1px solid #092246 !important;
  border-radius: 6px !important;
  padding: 12px 22px;
  line-height: normal;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease,
    transform 0.25s ease, opacity 0.25s ease;
}

.woocommerce-cart button[name="update_cart"]::before,
.woocommerce-cart input[name="update_cart"]::before,
.woocommerce-cart button[name="apply_coupon"]::before,
.woocommerce-cart input[name="apply_coupon"]::before {
  display: none;
}

.woocommerce-cart button[name="update_cart"]:hover,
.woocommerce-cart input[name="update_cart"]:hover,
.woocommerce-cart button[name="apply_coupon"]:hover,
.woocommerce-cart input[name="apply_coupon"]:hover {
  background-color: #0c2c5c !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Update cart sits disabled until a quantity changes — make that intentional
   (dimmed navy) rather than the browser's default greyed-out look. */
.woocommerce-cart button[name="update_cart"]:disabled,
.woocommerce-cart input[name="update_cart"]:disabled,
.woocommerce-cart button[name="update_cart"][disabled],
.woocommerce-cart input[name="update_cart"][disabled] {
  opacity: 0.45 !important;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Woo notices on the dark surface ──────────────────────────────────────── */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .cart-empty,
.woocommerce-checkout .woocommerce-info {
  background: #171717;
  color: #f5f5f5;
  border-top-color: #f4c430;
}
