/* ═══════════════════════════════════════════════════════════════════════
 * KamiKaze V8 — Single Product Page enhancements (preview-cookie gated).
 * Layered ON TOP of Elessi's existing PDP — only color + spacing tweaks
 * + new injected blocks. Doesn't fight the existing template.
 * ═══════════════════════════════════════════════════════════════════════ */

/* Title + price hierarchy */
body.kmk-v8.single-product .product_title,
body.kmk-v8.single-product .entry-summary > .product_title { font-size:clamp(20px, 3vw, 28px) !important; font-weight:800 !important; line-height:1.2 !important; margin-bottom:10px !important; }
body.kmk-v8.single-product .summary .price,
body.kmk-v8.single-product .summary > .price { font-size:clamp(22px, 2.6vw, 30px) !important; font-weight:800 !important; color:var(--kmk-red, #e30000) !important; }
body.kmk-v8.single-product .summary .price del { color:#888 !important; font-weight:600; font-size:0.7em; margin-right:8px; }
body.kmk-v8.single-product .summary .price ins { text-decoration:none; }

/* Add to Cart button — V8 red */
body.kmk-v8.single-product .single_add_to_cart_button,
body.kmk-v8.single-product button.single_add_to_cart_button { background:var(--kmk-red, #e30000) !important; color:#fff !important; padding:14px 28px !important; font-weight:800 !important; text-transform:uppercase !important; letter-spacing:0.06em !important; border:0 !important; border-radius:6px !important; transition:background .15s !important; box-shadow:0 4px 12px rgba(227,0,0,0.25) !important; }
body.kmk-v8.single-product .single_add_to_cart_button:hover { background:var(--kmk-red-d, #b50000) !important; }

/* Fitment tag on PDP — uses the compact loop style; sits right above trust badges */
body.kmk-v8.single-product .kmk-fits { margin:14px 0 6px !important; }

/* Trust badges row under Add-to-Cart */
.kmk-pdp-trust { display:grid; grid-template-columns:repeat(2, 1fr); gap:8px; margin:18px 0 12px; padding:14px; background:#f7f7f7; border:1px solid #ececec; border-radius:6px; }
@media (min-width:720px) { .kmk-pdp-trust { grid-template-columns:repeat(4, 1fr); } }
.kmk-pdp-trust > div { display:flex; align-items:center; gap:8px; font-size:11px; font-weight:600; color:#0b0b0b; line-height:1.3; }
.kmk-pdp-trust svg { width:18px; height:18px; flex-shrink:0; color:var(--kmk-red, #e30000); }

/* WhatsApp "Ask about fitment" button */
.kmk-pdp-wa { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:13px 18px; background:#fff; border:2px solid #25D366; color:#25D366 !important; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; font-size:13px; border-radius:6px; margin:10px 0; transition:all .15s; text-decoration:none !important; }
.kmk-pdp-wa:hover { background:#25D366; color:#fff !important; }
.kmk-pdp-wa svg { width:20px; height:20px; flex-shrink:0; }
.kmk-pdp-wa svg path { fill:currentColor; }

/* Mobile sticky add-to-cart bar */
.kmk-sticky-cart { display:none; }
@media (max-width:1023px) {
  body.kmk-v8.single-product .kmk-sticky-cart {
    display:flex; align-items:center; gap:10px;
    position:fixed; left:0; right:0; bottom:0; z-index:990;
    background:#0b0b0b; color:#fff;
    padding:10px 14px;
    border-top:2px solid var(--kmk-red, #e30000);
    box-shadow:0 -4px 16px rgba(0,0,0,0.4);
    transform:translateY(100%); transition:transform .25s ease;
    /* sit above the mobile bottom bar (Shop/Bikes/Account/Cart) */
    padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));
  }
  body.kmk-v8.single-product .kmk-sticky-cart.active { transform:translateY(0); }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-img { width:48px; height:48px; border-radius:6px; flex-shrink:0; background:#1a1a1a; overflow:hidden; }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-img img { width:100%; height:100%; object-fit:cover; }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-info { flex:1; min-width:0; }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-title { font-size:12px; font-weight:700; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff; }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-price { font-size:14px; font-weight:800; color:var(--kmk-yellow, #ffe200); margin-top:2px; }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-btn { background:var(--kmk-red, #e30000); color:#fff !important; padding:11px 16px; border-radius:6px; font-weight:800; font-size:12px; text-transform:uppercase; letter-spacing:0.04em; border:0; cursor:pointer; flex-shrink:0; text-decoration:none !important; white-space:nowrap; }
  body.kmk-v8.single-product .kmk-sticky-cart .ksc-btn:hover { background:var(--kmk-red-d, #b50000); }
  /* Add bottom padding to body so the sticky bar doesn't cover the regular bottom bar */
  body.kmk-v8.single-product { padding-bottom:140px; }
}

/* Variation rows tighter */
body.kmk-v8.single-product .variations { margin-bottom:14px !important; }
body.kmk-v8.single-product .variations th { font-weight:700 !important; }

/* ─── Native variation swatches (replaces the Variation Swatches plugin) ─── */
/* Hide the original <select> entirely. WC reads $('select').val() — visibility doesn't matter. */
body.kmk-v8.single-product .variations select,
body.kmk-v8.single-product .variations td.value select,
body.kmk-v8.single-product .variations td.value .nasa-selectric-wrapper,
body.kmk-v8.single-product .variations td.value .selectric-wrapper { display:none !important; }
body.kmk-v8.single-product .variations td.value > .reset_variations { display:inline-block !important; margin-top:6px; }

/* Belt-and-braces: kill any leftover "mobile-app" popup chrome that the dequeue should have prevented. */
body.kmk-v8.single-product .ns-variants-first,
body.kmk-v8.single-product .ns-begin-wrap,
body.kmk-v8.single-product .ns-open-var-form,
body.kmk-v8.single-product .ns_btn-fixed,
body.kmk-v8.single-product .nasa-add-to-cart-fixed { display:none !important; }
/* Force the variations form to render inline (not as a transform-translated popup). */
body.kmk-v8.single-product .nasa-single-product-in-mobile form.cart.variations_form,
body.kmk-v8.single-product form.cart.variations_form {
  position: static !important;
  visibility: visible !important;
  transform: none !important;
  -webkit-transform: none !important;
  max-height: none !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  display: block !important;
  z-index: auto !important;
}
/* Swatch container */
.kmk-swatches { list-style:none; margin:0 0 4px; padding:0; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.kmk-swatch { cursor:pointer; transition:all .15s; user-select:none; -webkit-tap-highlight-color:transparent; line-height:1.2; }
.kmk-swatch:focus { outline:2px solid var(--kmk-yellow, #ffe200); outline-offset:2px; }
/* Color circle swatch */
.kmk-swatches-color .kmk-swatch.is-color { display:inline-flex; flex-direction:column; align-items:center; gap:4px; }
.kmk-swatch.is-color .kmk-swatch-fill {
  display:block; width:32px; height:32px; border-radius:50%;
  border:2px solid #ddd; box-shadow:inset 0 0 0 2px #fff;
  background-clip:padding-box;
  transition:border-color .15s, transform .15s;
}
.kmk-swatch.is-color .kmk-swatch-label { font-size:10px; color:#666; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; }
.kmk-swatch.is-color:hover .kmk-swatch-fill { transform:scale(1.06); }
.kmk-swatch.is-color.active .kmk-swatch-fill { border-color:var(--kmk-red, #e30000); box-shadow:inset 0 0 0 2px #fff, 0 0 0 2px var(--kmk-red, #e30000); }
.kmk-swatch.is-color.active .kmk-swatch-label { color:var(--kmk-red, #e30000); }
/* Button (text) swatch */
.kmk-swatch.is-button {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:40px; padding:8px 14px;
  border:1.5px solid #ddd; border-radius:5px;
  background:#fff; color:#0b0b0b;
  font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em;
}
.kmk-swatch.is-button:hover { border-color:#0b0b0b; }
.kmk-swatch.is-button.active { background:var(--kmk-red, #e30000); border-color:var(--kmk-red, #e30000); color:#fff; }
/* Disabled / unavailable swatch (combination not in stock) */
.kmk-swatch.disabled { opacity:0.35; cursor:not-allowed; position:relative; }
.kmk-swatch.disabled::after { content:''; position:absolute; left:50%; top:50%; width:140%; height:1.5px; background:#999; transform:translate(-50%,-50%) rotate(-30deg); pointer-events:none; }
.kmk-swatch.is-color.disabled::after { width:120%; }

/* Tabs (description / additional info / reviews) — clean V8 look */
body.kmk-v8.single-product .woocommerce-tabs { margin-top:32px; }
body.kmk-v8.single-product .woocommerce-tabs ul.tabs li.active a,
body.kmk-v8.single-product .woocommerce-tabs ul.tabs li.active { color:var(--kmk-red, #e30000) !important; border-color:var(--kmk-red, #e30000) !important; }

/* Quantity input refresh */
body.kmk-v8.single-product .quantity .qty,
body.kmk-v8.single-product .quantity input.qty { border:1px solid #ddd !important; border-radius:5px !important; height:46px !important; font-weight:700 !important; }
