/* =========================================================
   K-Pop Demon Hunters – Neon Theme Layer (TT5 child)
   Author: Rebel Wire Media
   ========================================================= */

/* ---------- Variables ---------- */
:root{
  --bg:#0b0e16;
  --neon-pink:#ff3ed1;
  --neon-blue:#3db2ff;
  --neon-green:#33ffa6;
  --muted:#9aa3b2;
  --white:#fff;
}

/* ---------- Global Background / Texture ---------- */
body{
  background: var(--bg);
  background-image:
    radial-gradient(1200px 800px at 20% 10%, rgba(61,178,255,.10), transparent 60%),
    radial-gradient(900px 600px at 80% 15%, rgba(255,62,209,.12), transparent 55%);
}

/* ---------- Neon Text Utilities ---------- */
.neon-text-pink  { color: var(--white); text-shadow: 0 0 8px rgba(255,62,209,.85), 0 0 24px rgba(255,62,209,.45); }
.neon-text-blue  { color: var(--white); text-shadow: 0 0 8px rgba(61,178,255,.85), 0 0 24px rgba(61,178,255,.45); }
.neon-text-green { color: var(--white); text-shadow: 0 0 8px rgba(51,255,166,.85), 0 0 24px rgba(51,255,166,.45); }

/* ---------- Hero Title ---------- */
.kdh-hero-title{
  font-family: var(--wp--preset--font-family--rajdhani);
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.05;
  font-size: 75px !important;
  max-width: fit-content;
}

/* ---------- Neon Button Variant ---------- */
.is-style-kdh-neon-btn .wp-element-button{
  background: transparent;
  color: var(--white);
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 12px rgba(255,62,209,.6), inset 0 0 12px rgba(255,62,209,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.is-style-kdh-neon-btn .wp-element-button:hover{
  transform: translateY(-1px);
  border-color: var(--neon-blue);
  box-shadow: 0 0 16px rgba(61,178,255,.8), inset 0 0 14px rgba(61,178,255,.45);
}

/* ---------- Cards / Dividers / Header ---------- */
.kdh-card{
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 0 0 1px rgba(61,178,255,.15), 0 0 32px rgba(61,178,255,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.kdh-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,62,209,.35);
  box-shadow: 0 0 0 1px rgba(255,62,209,.30), 0 0 42px rgba(255,62,209,.18);
}

.kdh-divider{
  height: 2px; border: 0;
  background: linear-gradient(90deg, transparent, rgba(255,62,209,.65), rgba(61,178,255,.65), transparent);
  filter: drop-shadow(0 0 8px rgba(255,62,209,.6));
  margin-block: 48px;
}

.kdh-header{
  padding-block: 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
}
.kdh-logo img{ filter: drop-shadow(0 0 10px rgba(61,178,255,.85)); }

/* ---------- Woo Blocks (General Dark Mode Tweaks) ---------- */
.woocommerce a,
.woocommerce p,
.wc-block-grid__product-title{ color: var(--white); }

.wc-block-components-product-image img{ border-radius: 12px; width:auto; }

.wc-block-grid__product .wp-block-button__link{
  background: transparent; border:1.5px solid var(--neon-blue); color: var(--white);
  box-shadow: 0 0 10px rgba(61,178,255,.5); border-radius: 999px;
}
.wc-block-grid__product .wp-block-button__link:hover{
  border-color: var(--neon-pink); box-shadow: 0 0 12px rgba(255,62,209,.65);
}

/* ---------- Shop Section (Front Page) ---------- */
.kdh-shop-heading{
  font-family: var(--wp--preset--font-family--rajdhani);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  color: var(--white);
  text-shadow:
    0 0 6px rgba(255,62,209,.9),
    0 0 16px rgba(255,62,209,.6),
    0 0 28px rgba(61,178,255,.5);
  margin-block: 0rem 1.5rem;
}
.kdh-shop-underline{
  width: 120px; height: 4px; margin: 0 auto 2rem auto;
  background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-blue), transparent);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255,62,209,.75), 0 0 20px rgba(61,178,255,.65);
}
.kdh-shop-section{ text-align: center; }

/* Grid layout */
.kdh-products-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 1rem;
}
.kdh-products-grid { margin-inline: auto; max-width: min(1200px, 92vw); }
.kdh-products-grid > * { display: block; }

.kdh-products-grid .wc-block-grid__product {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 0 0 1px rgba(61,178,255,.15), 0 0 32px rgba(61,178,255,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.kdh-products-grid .wc-block-grid__product:hover{
  transform: translateY(-2px);
  border-color: rgba(255,62,209,.35);
  box-shadow: 0 0 0 1px rgba(255,62,209,.30), 0 0 42px rgba(255,62,209,.18);
}
.kdh-products-grid img {
  width: 100%; height: 320px; object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 18px rgba(61,178,255,.25);
}
.kdh-products-grid .wc-block-grid__product-title,
.kdh-product-title{
  font-family: var(--wp--preset--font-family--rajdhani);
  font-weight: 800;
  letter-spacing: .03em;
  font-size: 1.25rem;
  margin: 8px 0 4px;
  text-wrap: balance;
}
.kdh-products-grid .wc-block-grid__product-price,
.kdh-price{
  color: var(--white);
  text-shadow: 0 0 6px rgba(255,62,209,.65);
  font-weight: 700;
  margin: 0 0 12px;
}
.kdh-products-grid .wp-block-button__link,
.kdh-btn{
  background: transparent;
  border: 2px solid var(--neon-blue);
  color: var(--white);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(61,178,255,.55), inset 0 0 10px rgba(61,178,255,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.kdh-products-grid .wp-block-button__link:hover,
.kdh-btn:hover{
  transform: translateY(-1px);
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255,62,209,.7), inset 0 0 12px rgba(255,62,209,.45);
}

/* =========================================================
   SINGLE PRODUCT (WooCommerce: classic templates + blocks)
   ========================================================= */

/* (keeping your single product styles unchanged here) */

/***** KDH — FINAL FRONT PAGE OVERRIDES (place at very bottom) *****/

/* HERO title fix */
body.home .kdh-hero-title{
  font-size: clamp(2rem, 6vw, 75px) !important;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  line-height: 1.1;
  word-break: keep-all;
  text-wrap: balance;
}
body.home .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){
  max-width: min(1100px, 90vw);
  margin-left: auto;
  margin-right: auto;
}

/* Unified button style */
.kdh-actions .wp-element-button,
.kdh-actions .button,
.kdh-actions .wp-block-button__link,
.kdh-actions .added_to_cart,
.kdh-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  width: 100%;
  min-height: 44px;
  padding: 10px 18px;

  font-family: var(--wp--preset--font-family--rajdhani);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;

  border-radius: 999px;
  background: transparent;
  border: 2px solid var(--neon-blue) !important;
  color: var(--white) !important;
  text-decoration: none;

  box-shadow: 0 0 10px rgba(61,178,255,.55),
              inset 0 0 10px rgba(61,178,255,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.kdh-actions .wp-element-button:hover,
.kdh-actions .button:hover,
.kdh-actions .wp-block-button__link:hover,
.kdh-actions .added_to_cart:hover,
.kdh-btn:hover{
  transform: translateY(-1px);
  border-color: var(--neon-pink) !important;
  box-shadow: 0 0 14px rgba(255,62,209,.7),
              inset 0 0 12px rgba(255,62,209,.45);
}

/* Buttons layout */
.kdh-actions{
  display: grid !important;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-top: .75rem;
  width: 100%;
}
@media (min-width: 600px){
  .kdh-actions{ grid-template-columns: 1fr 1fr; }
}
.kdh-actions > *{ min-width: 0; }

.kdh-products-grid .wp-block-button__link{ border-width: 2px !important; }

@media (max-width: 480px){
  body.home .kdh-hero-title{ letter-spacing: .04em; }
}
/* ---- Add-to-Cart: match kdh-btn styling, no layout changes ---- */
.kdh-product .add_to_cart_button,
.kdh-product .added_to_cart,
.kdh-product .wp-element-button,
.kdh-product .wp-block-button__link.add_to_cart_button,
.kdh-product .single_add_to_cart_button {
  display: inline-flex;            /* centers text vertically & horizontally */
  align-items: center;
  justify-content: center;
  padding: 10px 18px;              /* same as .kdh-btn */
  min-height: 44px;                /* consistent button height */
  font-family: var(--wp--preset--font-family--rajdhani);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  border-radius: 999px;

  background: transparent;
  border: 2px solid var(--neon-blue);   /* match Learn more border */
  color: var(--white);
  text-decoration: none;

  box-shadow: 0 0 10px rgba(61,178,255,.55),
              inset 0 0 10px rgba(61,178,255,.35);
  transition: transform .12s ease,
              box-shadow .12s ease,
              border-color .12s ease;

  /* Don’t change layout: no width, no flex/grid changes to parents */
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
}

/* Hover: neon flip like Learn more */
.kdh-product .add_to_cart_button:hover,
.kdh-product .added_to_cart:hover,
.kdh-product .wp-element-button:hover,
.kdh-product .wp-block-button__link.add_to_cart_button:hover,
.kdh-product .single_add_to_cart_button:hover {
  transform: translateY(-1px);
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255,62,209,.7),
              inset 0 0 12px rgba(255,62,209,.45);
}

/* Woo Blocks default 1.5px border -> ensure 2px for Add to cart */
.kdh-product .wp-block-button__link.add_to_cart_button { border-width: 2px; }
/* ==== Fix: stack buttons in the card on all sizes, keep inside box ==== */

/* Make each card a simple vertical stack with a safe padding box */
.kdh-product{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow: visible; /* keep neon glows, but content layout stays inside */
}

/* Actions: always stacked, centered, and constrained to the card */
.kdh-product .kdh-actions{
  display: flex !important;
  flex-direction: column !important;   /* STACK at all breakpoints */
  gap: 12px;
  width: 100%;
  max-width: 420px;                     /* keeps buttons from touching edges */
  margin: 12px auto 0 auto;
  box-sizing: border-box;
}

/* Flatten any WP/Woo wrapper so it doesn't create side-by-side rows */
.kdh-product .kdh-actions .wp-block-buttons{ display: contents; }

/* Buttons: full width of the action area, equal height, centered text */
.kdh-product .kdh-actions .wp-element-button,
.kdh-product .kdh-actions .button,
.kdh-product .kdh-actions .wp-block-button__link,
.kdh-product .kdh-actions .added_to_cart,
.kdh-product .kdh-actions .add_to_cart_button,
.kdh-product .kdh-actions .single_add_to_cart_button,
.kdh-product .kdh-btn{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  width: 100% !important;              /* span the action area */
  min-height: 44px;
  padding: 10px 18px;
  box-sizing: border-box;
  float: none !important;               /* prevent legacy float layouts */

  font-family: var(--wp--preset--font-family--rajdhani);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;

  background: transparent;
  border: 2px solid var(--neon-blue) !important;
  color: var(--white) !important;
  border-radius: 999px;
  text-decoration: none;

  box-shadow: 0 0 10px rgba(61,178,255,.55),
              inset 0 0 10px rgba(61,178,255,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.kdh-product .kdh-actions .wp-element-button:hover,
.kdh-product .kdh-actions .button:hover,
.kdh-product .kdh-actions .wp-block-button__link:hover,
.kdh-product .kdh-actions .added_to_cart:hover,
.kdh-product .kdh-actions .add_to_cart_button:hover,
.kdh-product .kdh-actions .single_add_to_cart_button:hover,
.kdh-product .kdh-btn:hover{
  transform: translateY(-1px);
  border-color: var(--neon-pink) !important;
  box-shadow: 0 0 14px rgba(255,62,209,.7),
              inset 0 0 12px rgba(255,62,209,.45);
}
/* === Single Product: Neon Price Badge (classic + blocks) === */
body.single-product .summary .price,
body.single-product .wc-block-components-product-price{
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--neon-blue);
  background: rgba(255,255,255,0.04);
  box-shadow:
    0 0 10px rgba(61,178,255,.55),
    0 0 24px rgba(255,62,209,.25),
    inset 0 0 10px rgba(61,178,255,.22);
  color: var(--white);
  text-shadow:
    0 0 8px rgba(255,62,209,.85),
    0 0 20px rgba(61,178,255,.50);
  font-weight: 800;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  letter-spacing: .02em;
  line-height: 1.15;
  margin-bottom: 1rem; /* adds a bit more breathing room */
}

/* Currency symbol: extra pop */
body.single-product .summary .price .woocommerce-Price-currencySymbol,
body.single-product .wc-block-components-product-price .wc-block-formatted-money-amount__currency-symbol{
  color: var(--neon-pink);
  text-shadow:
    0 0 10px rgba(255,62,209,.9),
    0 0 20px rgba(61,178,255,.5);
  font-weight: 900;
}

/* Sale price: keep old price dim, new price glowing */
body.single-product .summary .price del,
body.single-product .wc-block-components-product-price del{
  opacity: .55;
  text-decoration: line-through;
  margin-right: .6rem;
}
body.single-product .summary .price ins,
body.single-product .wc-block-components-product-price ins{
  text-decoration: none;
}

/* Optional: subtle pulse to draw the eye (respects reduced motion) */
@media (prefers-reduced-motion: no-preference){
  body.single-product .summary .price,
  body.single-product .wc-block-components-product-price{
    animation: kdhPricePulse 3.2s ease-in-out infinite;
  }
}
@keyframes kdhPricePulse{
  0%   { box-shadow: 0 0 10px rgba(61,178,255,.55), inset 0 0 10px rgba(61,178,255,.22); }
  50%  { box-shadow: 0 0 16px rgba(255,62,209,.50), 0 0 30px rgba(61,178,255,.45), inset 0 0 14px rgba(61,178,255,.30); }
  100% { box-shadow: 0 0 10px rgba(61,178,255,.55), inset 0 0 10px rgba(61,178,255,.22); }
}
/* === Single Product: Neon "Add to cart" styling (no layout changes) === */

/* Common button look (classic + blocks + grouped/variable) */
body.single-product .single_add_to_cart_button,
body.single-product .added_to_cart,
body.single-product .ajax_add_to_cart,
body.single-product .wp-block-woocommerce-product-button .wp-block-button__link,
body.single-product .wp-block-woocommerce-add-to-cart .wp-block-button__link,
body.single-product .wc-block-components-product-button .wp-block-button__link {
  display: inline-flex;                 /* center text vertically & horizontally */
  align-items: center;
  justify-content: center;
  padding: 10px 18px;                   /* same as .kdh-btn */
  min-height: 44px;
  border-radius: 999px;

  background: transparent;
  border: 2px solid var(--neon-blue);
  color: var(--white);
  text-decoration: none;

  font-family: var(--wp--preset--font-family--rajdhani);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;

  box-shadow: 0 0 10px rgba(61,178,255,.55),
              inset 0 0 10px rgba(61,178,255,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

/* Hover/active glow */
body.single-product .single_add_to_cart_button:hover,
body.single-product .added_to_cart:hover,
body.single-product .ajax_add_to_cart:hover,
body.single-product .wp-block-woocommerce-product-button .wp-block-button__link:hover,
body.single-product .wp-block-woocommerce-add-to-cart .wp-block-button__link:hover,
body.single-product .wc-block-components-product-button .wp-block-button__link:hover {
  transform: translateY(-1px);
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255,62,209,.7),
              inset 0 0 12px rgba(255,62,209,.45);
}

/* Ensure Woo Blocks' thinner border doesn't override */
body.single-product .wp-block-woocommerce-product-button .wp-block-button__link,
body.single-product .wp-block-woocommerce-add-to-cart .wp-block-button__link {
  border-width: 2px !important;
}

/* Disabled state (e.g., variable product before selection) */
body.single-product .single_add_to_cart_button.disabled,
body.single-product .single_add_to_cart_button:disabled,
body.single-product .wp-block-woocommerce-product-button .wp-block-button__link[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 0 6px rgba(61,178,255,.25), inset 0 0 8px rgba(61,178,255,.2);
  border-color: rgba(61,178,255,.45);
}

/* Optional: align quantity input height to the button without moving layout */
body.single-product .quantity .qty {
  min-height: 44px;
  padding: .55rem .7rem;
  line-height: 1.2;
  border-radius: 10px;
}
/* === Single Product: Tabs — subtle neon treatment (classic + blocks) === */

/* Classic Woo tabs (button row) */
body.single-product .woocommerce-tabs ul.tabs{
  border: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
body.single-product .woocommerce-tabs ul.tabs li{
  list-style: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(61,178,255,.28);
  border-radius: 999px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.single-product .woocommerce-tabs ul.tabs li a{
  display: block;
  padding: .55rem .9rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: .02em;
}
body.single-product .woocommerce-tabs ul.tabs li:hover,
body.single-product .woocommerce-tabs ul.tabs li.active{
  border-color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255,62,209,.25);
}

/* Classic Woo panels: dashed border */
body.single-product .woocommerce-tabs .woocommerce-Tabs-panel{
  border: 2px dashed var(--neon-pink);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 0 20px rgba(61,178,255,.10);
  padding: clamp(16px, 3vw, 24px) !important;
  margin-top: 14px;
}

/* Blocks-based tabs (button row) */
body.single-product .wc-block-product-tabs [role="tab"]{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(61,178,255,.28);
  border-radius: 999px;
  padding: .55rem .9rem;
  color: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.single-product .wc-block-product-tabs [role="tab"][aria-selected="true"],
body.single-product .wc-block-product-tabs [role="tab"]:hover{
  border-color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255,62,209,.25);
}

/* Blocks-based panels: dashed border */
body.single-product .wp-block-woocommerce-product-tabs .wc-block-product-tabs__panel,
body.single-product .wc-block-product-tabs .wc-block-product-tabs__panel{
  border: 2px dashed var(--neon-pink);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 0 20px rgba(61,178,255,.10);
  padding: clamp(16px, 3vw, 24px) !important;
  margin-top: 14px;
}
body.single-product .woocommerce-tabs ul.tabs li.active,
body.single-product .wc-block-product-tabs [role="tab"][aria-selected="true"]{
  border-style: dashed;
}
/* Filter bar */
.kdh-filterbar{ margin: 0 auto 24px; max-width: min(1200px, 92vw); }
.kdh-filterbar__grid{
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}
.kdh-filterbar label span{
  display:block; font-weight:700; font-family: var(--wp--preset--font-family--rajdhani);
  margin-bottom: 6px;
}
.kdh-filterbar select, .kdh-filterbar input[type="number"]{
  width:100%; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(61,178,255,.35); color: var(--white);
  border-radius: 12px; padding:.55rem .7rem;
  box-shadow: inset 0 0 12px rgba(61,178,255,.18);
}
.kdh-filterbar__actions{ display:flex; gap:10px; }

/* Grid responsiveness (1 → 2 → 3 columns) */
.kdh-products-grid.kdh-3{
  display:grid; gap:24px; margin-inline:auto; max-width:min(1200px,92vw);
  grid-template-columns: 1fr;            /* phones */
}
@media (min-width: 640px){ .kdh-products-grid.kdh-3{ grid-template-columns: repeat(2,1fr);} }
@media (min-width: 900px){ .kdh-products-grid.kdh-3{ grid-template-columns: repeat(3,1fr);} }

/* Pagination */
.kdh-pagination{ margin:24px auto; text-align:center; }
.kdh-pagination .page-numbers{
  display:inline-block; margin:0 6px; padding:8px 12px; border-radius:999px;
  border:1px solid rgba(61,178,255,.35); color:#fff; text-decoration:none;
}
.kdh-pagination .current{ border-color: var(--neon-pink); box-shadow:0 0 8px rgba(255,62,209,.3); }
/* Home products grid: 1 → 2 → 3 → 4 → 5 columns */
body.home .kdh-products-grid{
  display: grid;
  gap: 24px;
  margin-inline: auto;
  max-width: min(1400px, 95vw);   /* allow 5 cards to fit */
  grid-template-columns: 1fr;     /* phones */
}
@media (min-width: 640px){
  body.home .kdh-products-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px){
  body.home .kdh-products-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px){
  body.home .kdh-products-grid{ grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1400px){
  body.home .kdh-products-grid{ grid-template-columns: repeat(5, 1fr); } /* desktop-wide */
}

/* If any grid still carries kdh-3, override it on desktop-wide */
@media (min-width: 1400px){
  body.home .kdh-products-grid.kdh-3{ grid-template-columns: repeat(5, 1fr); }
}

/* Optional: slightly shorter card images when 5-up so they don’t feel too tall */
@media (min-width: 1400px){
  body.home .kdh-products-grid img{ height: 300px; }
}
/* =========================================
   SINGLE PRODUCT — fix title splitting on mobile
   Stop mid-word breaks and size sanely on phones
   ========================================= */

/* 1) Nuke any emergency wrap rules on product titles */
body.single-product h1.product_title,
body.single-product h1.wp-block-post-title,
body.single-product .entry-title,
body.single-product .wc-block-components-product-breadcrumb + h1 {
  /* make it use the full row */
  display: block;
  width: 100% !important;
  max-width: none !important;

  /* STOP splitting inside words */
  word-break: keep-all !important;      /* only break at spaces/hyphens */
  overflow-wrap: normal !important;     /* undo break-word/anywhere */
  white-space: normal !important;

  /* allow real hyphenation if a word is still too long */
  hyphens: auto;
  -webkit-hyphens: auto;

  line-height: 1.12;
  letter-spacing: .02em;
}

/* 2) Tighter size on small screens so the browser never has to “emergency break” */
@media (max-width: 600px){
  body.single-product h1.product_title,
  body.single-product h1.wp-block-post-title,
  body.single-product .entry-title,
  body.single-product .wc-block-components-product-breadcrumb + h1 {
    font-size: clamp(1.2rem, 5.2vw, 2rem) !important;
  }
}

/* 3) Just in case the theme sets a global emergency wrap on all headings */
:root, .wp-site-blocks, body {
  --kdh-no-emergency-wrap: normal;
}
body.single-product h1,
body.single-product [class*="post-title"] {
  overflow-wrap: var(--kdh-no-emergency-wrap) !important;
}
/* ================================
   SINGLE PRODUCT – attribute selects
   Readable in both closed + open states
   ================================ */

/* Base selects (classic + blocks) */
body.single-product form.variations select,
body.single-product .wc-block-components-product-variations select{
  background: rgba(255,255,255,.06);
  color: #fff;                       /* visible when closed */
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: .55rem .7rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,.25);
}

/* Placeholder/resting label (first empty option) */
body.single-product form.variations select:has(option[value=""][selected]),
body.single-product .wc-block-components-product-variations select:has(option[value=""][selected]){
  color: #cbd5e1;                    /* lighter until a value is chosen */
}

/* Native dropdown options (when the list opens) */
body.single-product form.variations select option,
body.single-product .wc-block-components-product-variations select option{
  background: #0b0e16;
  color: #fff;
}
body.single-product form.variations select option[value=""],
body.single-product .wc-block-components-product-variations select option[value=""]{
  color: #9aa3b2;                    /* “Choose an option” */
}

/* Select2 styling (used by some Woo installs) */
body.single-product .select2-container--default .select2-selection--single{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  height: 42px;
}
body.single-product .select2-container--default .select2-selection--single .select2-selection__rendered{
  color: #fff;                       /* closed state text */
  line-height: 42px;
  padding: 0 .7rem;
}
body.single-product .select2-container--default .select2-selection--single .select2-selection__placeholder{
  color: #cbd5e1;
}
body.single-product .select2-container--open .select2-selection--single{
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255,62,209,.35);
}
/* Opened dropdown panel + options */
body.single-product .select2-dropdown{
  background: #0b0e16;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 0 16px rgba(61,178,255,.25);
}
body.single-product .select2-results__option{ color:#fff; }
body.single-product .select2-results__option--highlighted[aria-selected],
body.single-product .select2-results__option--selected{
  background: rgba(61,178,255,.22);
  color:#fff;
}
/* ================================
   Single product – attribute dropdown (closed + open)
   ================================ */

/* Closed state (native select) – make text readable */
body.single-product table.variations td.value select,
body.single-product form.variations select[name^="attribute_"]{
  color: #fff !important;                         /* readable text when closed */
  background-color: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 12px;
  padding: .55rem .7rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,.25);
  opacity: 1 !important;                          /* some themes dim selects */
}

/* Opened list (native) */
body.single-product form.variations select option{
  background: #0b0e16;
  color: #fff;
}

/* If your site uses Select2 for attributes, match closed/opened states */
body.single-product .select2-container--default .select2-selection--single{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 12px;
  height: 42px;
}
body.single-product .select2-container--default .select2-selection--single
.select2-selection__rendered{ color:#fff !important; line-height:42px; padding:0 .7rem; }
body.single-product .select2-container--default .select2-selection--single
.select2-selection__placeholder{ color:#cbd5e1 !important; }
body.single-product .select2-dropdown{
  background:#0b0e16; border:1px solid rgba(255,255,255,.18);
  box-shadow:0 0 16px rgba(61,178,255,.25);
}
body.single-product .select2-results__option{ color:#fff; }
body.single-product .select2-results__option--highlighted[aria-selected],
body.single-product .select2-results__option--selected{
  background: rgba(61,178,255,.22); color:#fff;
}
/* Single-product attribute select: closed + open (native) */
body.single-product form.variations select[name^="attribute_"]{
  color:#fff !important;
  background: rgba(255,255,255,.06) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:12px; padding:.55rem .7rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,.25);
  color-scheme: dark;                   /* hint native dropdown to be dark */
}
body.single-product form.variations select[name^="attribute_"]:focus{
  outline:0; border-color:var(--neon-pink);
  box-shadow:0 0 14px rgba(255,62,209,.35);
}
/* Where supported, keep open options dark */
body.single-product form.variations select[name^="attribute_"] option{
  background:#0b0e16; color:#fff;
}
/* Closed state */
body.single-product .select2-container--default .select2-selection--single{
  background: rgba(255,255,255,.06) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:12px; height:42px;
}
body.single-product .select2-selection__rendered{ color:#fff !important; line-height:42px; padding:0 .7rem; }
body.single-product .select2-selection__placeholder{ color:#cbd5e1 !important; }
/* Opened panel */
body.single-product .select2-dropdown{
  background:#0b0e16; border:1px solid rgba(255,255,255,.18);
  box-shadow:0 0 16px rgba(61,178,255,.25);
}
body.single-product .select2-results__option{ color:#fff; }
body.single-product .select2-results__option--highlighted[aria-selected],
body.single-product .select2-results__option--selected{ background:rgba(61,178,255,.22); color:#fff; }
/* Chain attribute select — white background + dark text (closed + open) */
body.single-product select#chain[name="attribute_chain"]{
  background: #fff !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,.25) !important;
  border-radius: 12px;
  padding: .55rem .7rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  opacity: 1 !important; /* some themes dim selects */
}
body.single-product select#chain[name="attribute_chain"] option{
  background: #fff;   /* open list (supported browsers) */
  color: #111;
}
/* placeholder option */
body.single-product select#chain[name="attribute_chain"] option[value=""]{
  color: #667085;
}
/* ===== KDH page grids (STL / Physical pages) — auto-fit columns ===== */
.kdh-page-grid .kdh-products-grid{
  /* Responsive grid that never makes cards too skinny */
  --kdh-card-min: 260px;                     /* change to 240–280 if you want */
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(var(--kdh-card-min), 1fr));
  margin-inline: auto;
  max-width: min(1500px, 96vw);              /* a bit wider so five-up fits comfortably */
}

/* Make sure constrained layouts don’t shrink our section */
.is-layout-constrained > .kdh-shop-section{
  max-width: min(1500px, 96vw);
  margin-left: auto; margin-right: auto;
}

/* Cards: keep actions pinned to the bottom and buttons full-width */
.kdh-page-grid .kdh-product{ display:flex; flex-direction:column; }
.kdh-page-grid .kdh-actions{ margin-top: auto; width: 100%; }
.kdh-page-grid .kdh-actions .wp-element-button,
.kdh-page-grid .kdh-actions .button,
.kdh-page-grid .kdh-actions .added_to_cart,
.kdh-page-grid .kdh-btn{ width:100%; }

/* Image height that scales a touch on huge screens */
.kdh-page-grid .kdh-product img{
  height: clamp(260px, 22vw, 320px);
  object-fit: cover;
}

/* Neon section headings spacing */
.kdh-shop-heading{ margin-block: .25rem 1.25rem; }
.kdh-shop-underline{ margin-bottom: 1.75rem; }
/* ===== KDH Affiliate Links Accordion ===== */
.kdh-accordion{ max-width:min(1100px,95vw); margin-inline:auto; }
.kdh-acc{ margin-bottom: 12px; }

/* Toggle button */
.kdh-acc__toggle{
  width: 100%; text-align: left; display:flex; align-items:center; gap:.75rem;
  background: rgba(255,255,255,.04); color:#fff;
  border:1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding:.7rem .9rem; cursor:pointer;
  box-shadow: 0 0 0 1px rgba(61,178,255,.15), 0 0 16px rgba(61,178,255,.08);
}
.kdh-acc__toggle:hover{
  border-color: rgba(255,62,209,.45);
  box-shadow: 0 0 0 1px rgba(255,62,209,.30), 0 0 22px rgba(255,62,209,.18);
}
.kdh-acc__title{
  font: 800 1.05rem var(--wp--preset--font-family--rajdhani, system-ui);
  letter-spacing:.03em; text-transform:uppercase;
}
.kdh-acc__count{
  margin-left: auto; font-weight:700; color:#fff;
  border:1px solid rgba(61,178,255,.45); border-radius:999px; padding:.1rem .5rem;
  box-shadow: 0 0 8px rgba(61,178,255,.35) inset;
}
.kdh-acc__chev{ transition: transform .15s ease; }
.kdh-acc__toggle[aria-expanded="true"] .kdh-acc__chev{ transform: rotate(180deg); }

/* Panel */
.kdh-acc__panel{
  margin-top:8px; padding:12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
}

/* Links list */
.kdh-aff-links{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.kdh-aff-item{ display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }

/* Neon button style for links */
.kdh-aff-link.kdh-btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-height: 40px; padding:8px 14px; border-radius:999px;
  background: transparent; color:#fff; text-decoration:none;
  border:2px solid var(--neon-blue, #3db2ff);
  box-shadow: 0 0 10px rgba(61,178,255,.55), inset 0 0 10px rgba(61,178,255,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.kdh-aff-link.kdh-btn:hover{
  transform: translateY(-1px);
  border-color: var(--neon-pink, #ff3ed1);
  box-shadow: 0 0 14px rgba(255,62,209,.7), inset 0 0 12px rgba(255,62,209,.45);
}
.kdh-aff-price{ color:#fff; font-weight:700; text-shadow:0 0 6px rgba(255,62,209,.5); }
/* ===== Amazon Outfit Grid — Neon Glue (v2) ===== */
.amx-page{ 
  max-width: min(1200px, 92vw);
  margin: 0 auto;
  padding: clamp(12px, 3vw, 24px);
}

/* Section spacing */
.amx-section{ margin-block: clamp(28px, 6vw, 56px); }

/* Sub-note under headings */
.amx-note{
  color: var(--muted, #9aa3b2);
  text-align: center;
  margin: -.35rem auto 1.25rem;
  font-size: .95rem;
  max-width: 70ch;
}

/* Responsive grid (1 → 2 → 3 → 4 columns) */
.amx-grid{
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(1, minmax(240px, 1fr));
}
@media (min-width: 600px){  .amx-grid{ grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (min-width: 900px){  .amx-grid{ grid-template-columns: repeat(3, minmax(240px, 1fr)); } }
@media (min-width: 1200px){ .amx-grid{ grid-template-columns: repeat(4, minmax(240px, 1fr)); } }

/* Cards inherit neon look from .kdh-card; keep vertical rhythm consistent */
.amx-card{ 
  display:flex; flex-direction:column; gap:.75rem; 
  padding: 18px;  /* matches your kdh-card padding */
}
.amx-card p{ margin:0; } /* guard against extra <p> margins in editors */

/* Titles: center, balance lines, consistent height so buttons align */
.amx-name{
  font-family: var(--wp--preset--font-family--rajdhani, system-ui);
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--white, #fff);
  text-align: center;
  text-wrap: balance;
  min-height: 3.2em;              /* ~2 lines at default size */
  display:flex; align-items:center; justify-content:center;
}

/* Buttons: full width, same height, neon vibe already from .kdh-btn */
.amx-cta{ margin-top:auto; }
.amx-cta .kdh-btn{ width:100%; min-height:44px; }

/* Disclaimer */
.amx-disclaimer{
  color: var(--muted, #9aa3b2);
  font-size: .85rem;
  text-align: center;
  margin-top: .9rem;
}

/* Optional: soft neon outline on cards only on hover for extra polish */
.amx-card:hover{
  box-shadow: 0 0 0 1px rgba(255,62,209,.30), 0 0 42px rgba(255,62,209,.18);
  border-color: rgba(255,62,209,.35);
}
/* Keep CTA buttons fully inside the card */
.amx-card{ 
  position: relative;
  overflow: hidden;          /* clips neon/glow that pokes out */
  border-radius: 18px;       /* matches kdh-card radius so clip looks clean */
  min-width: 0;              /* prevents flex/grid overflows from long text */
}
.amx-cta{ 
  margin-top: auto; 
  width: 100%;
}
.amx-cta .kdh-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  box-sizing: border-box;     /* include border in width calc */
}

/* If Woo renders buttons instead of <a.kdh-btn>, keep them inside too */
.kdh-actions .wp-element-button,
.kdh-actions .button,
.kdh-actions .added_to_cart{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
