/*
Theme Name: Kenny Denton — Wild Light
Description: Custom child theme for Kenny Denton Photography. Dark, atmospheric, image-first design built on Blocksy.
Author: Riptide AI Consulting
Template: blocksy
Version: 1.0.0
Text Domain: kd-wildlight
*/

/* === DESIGN TOKENS === */
:root {
  --kd-bg: #0B0D10;
  --kd-bg-elevated: #14181D;
  --kd-border: #1F2630;
  --kd-text: #F2F4F7;
  --kd-text-muted: #9AA3AE;
  --kd-text-dim: #6B7280;
  --kd-accent: #D9A86B;
  --kd-accent-hover: #E8BC85;
  --kd-blue: #5C7A99;
  --kd-font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --kd-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --kd-font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --kd-max-width: 1440px;
  --kd-content-width: 1100px;
}

/* === RESET / FOUNDATIONS === */
html { scroll-behavior: smooth; }

body,
body.wp-singular {
  background: var(--kd-bg) !important;
  color: var(--kd-text);
  font-family: var(--kd-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .page-title {
  font-family: var(--kd-font-display);
  color: var(--kd-text);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }

p { color: var(--kd-text-muted); }
.entry-content p { font-size: 1.05rem; line-height: 1.7; }

a { color: var(--kd-accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--kd-accent-hover); }

/* === HEADER === */
header.ct-header,
.ct-header[data-id="header"] {
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--kd-border);
}

.ct-header [data-id="logo"] a {
  font-family: var(--kd-font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--kd-text);
  text-transform: uppercase;
}

.ct-header nav a,
.menu a {
  font-family: var(--kd-font-body);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kd-text-muted) !important;
  font-weight: 500;
}
.ct-header nav a:hover,
.menu a:hover { color: var(--kd-text) !important; }

/* === HERO SECTION === */
.kd-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1.5rem, 5vw, 5rem) clamp(3rem, 8vh, 6rem);
  margin: 0 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
  background: var(--kd-bg);
}
.kd-hero__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.kd-hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(11,13,16,0.2) 0%,
    rgba(11,13,16,0.4) 50%,
    rgba(11,13,16,0.92) 100%);
}
.kd-hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.kd-hero__eyebrow {
  font-family: var(--kd-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--kd-accent);
  margin-bottom: 1.5rem;
  display: block;
}
.kd-hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.05;
  margin: 0 0 1.5rem;
  color: var(--kd-text);
}
.kd-hero__lead {
  font-size: 1.15rem;
  color: var(--kd-text);
  opacity: 0.85;
  max-width: 560px;
  margin-bottom: 2.5rem;
}
.kd-hero__cta {
  display: inline-block;
  padding: 1rem 2.2rem;
  border: 1px solid var(--kd-accent);
  color: var(--kd-accent);
  font-family: var(--kd-font-body);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all .25s ease;
}
.kd-hero__cta:hover {
  background: var(--kd-accent);
  color: var(--kd-bg);
}

/* === SECTIONS === */
.kd-section {
  max-width: var(--kd-max-width);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 5rem);
}
.kd-section--narrow {
  max-width: var(--kd-content-width);
}
.kd-section__eyebrow {
  font-family: var(--kd-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--kd-accent);
  margin-bottom: 1.5rem;
  display: block;
}
.kd-section__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 0 0 1.5rem;
  max-width: 800px;
}
.kd-section__lead {
  font-size: 1.1rem;
  color: var(--kd-text-muted);
  max-width: 640px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* === FEATURED PRINTS GRID === */
.kd-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  margin: 3rem 0 0;
}
.kd-print-card {
  position: relative;
  display: block;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--kd-bg-elevated);
  border: 1px solid var(--kd-border);
  text-decoration: none;
  transition: border-color .3s ease;
}
.kd-print-card:hover { border-color: var(--kd-accent); }
.kd-print-card__image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .8s ease;
}
.kd-print-card:hover .kd-print-card__image {
  transform: scale(1.04);
}
.kd-print-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11,13,16,0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.kd-print-card__title {
  font-family: var(--kd-font-display);
  font-size: 1.4rem;
  color: var(--kd-text);
  margin: 0 0 0.4rem;
}
.kd-print-card__meta {
  font-family: var(--kd-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kd-text-muted);
}

/* === COLLECTIONS BLOCK === */
.kd-collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  background: var(--kd-border);
  margin: 4rem 0;
}
.kd-collection-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  text-decoration: none;
  isolation: isolate;
}
.kd-collection-tile::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(11,13,16,0.1) 0%,
    rgba(11,13,16,0.85) 100%);
  z-index: 1;
  transition: opacity .3s ease;
}
.kd-collection-tile:hover::before {
  background: linear-gradient(180deg,
    rgba(11,13,16,0.0) 0%,
    rgba(11,13,16,0.7) 100%);
}
.kd-collection-tile__content {
  position: relative; z-index: 2;
  color: var(--kd-text);
}
.kd-collection-tile__name {
  font-family: var(--kd-font-display);
  font-size: 2rem;
  margin: 0 0 0.4rem;
  color: var(--kd-text);
}
.kd-collection-tile__count {
  font-family: var(--kd-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kd-accent);
}

/* === ABOUT TEASER === */
.kd-about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 768px) {
  .kd-about-teaser { grid-template-columns: 1fr; }
}
.kd-about-teaser__image {
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
}
.kd-about-teaser__text p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.kd-about-teaser__signature {
  font-family: var(--kd-font-display);
  font-style: italic;
  color: var(--kd-text);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* === EMAIL CAPTURE === */
.kd-email-capture {
  background: var(--kd-bg-elevated);
  border: 1px solid var(--kd-border);
  padding: clamp(2.5rem, 5vw, 5rem);
  margin: 5rem auto;
  max-width: var(--kd-content-width);
  text-align: center;
}
.kd-email-capture__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 1rem;
}
.kd-email-capture__lead {
  color: var(--kd-text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.kd-email-capture__form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--kd-border);
}
.kd-email-capture__input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 1rem 1.25rem;
  color: var(--kd-text);
  font-family: var(--kd-font-body);
  font-size: 1rem;
  outline: none;
}
.kd-email-capture__input::placeholder { color: var(--kd-text-dim); }
.kd-email-capture__button {
  background: var(--kd-accent);
  color: var(--kd-bg);
  border: 0;
  padding: 1rem 1.75rem;
  font-family: var(--kd-font-body);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s ease;
}
.kd-email-capture__button:hover { background: var(--kd-accent-hover); }

/* === FOOTER === */
footer.site-footer,
.ct-footer {
  background: var(--kd-bg) !important;
  border-top: 1px solid var(--kd-border);
  padding: 4rem clamp(1.5rem, 5vw, 5rem) 2rem !important;
  color: var(--kd-text-muted);
}
.ct-footer .menu a,
footer .menu a {
  color: var(--kd-text-muted) !important;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}
.ct-footer .menu a:hover,
footer .menu a:hover { color: var(--kd-accent) !important; }

/* === WOOCOMMERCE OVERRIDES === */
.woocommerce ul.products,
ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 2rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  text-align: left;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--kd-font-display) !important;
  font-size: 1.3rem !important;
  font-weight: 400 !important;
  color: var(--kd-text) !important;
  padding: 1rem 0 0.3rem !important;
}
.woocommerce ul.products li.product .price {
  font-family: var(--kd-font-mono) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.08em !important;
  color: var(--kd-text-muted) !important;
}
.woocommerce ul.products li.product .price ins { background: transparent; color: var(--kd-accent); }
.woocommerce ul.products li.product img {
  aspect-ratio: 4/5;
  object-fit: cover;
  margin: 0 !important;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.button {
  background: transparent !important;
  border: 1px solid var(--kd-accent) !important;
  color: var(--kd-accent) !important;
  font-family: var(--kd-font-body) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  padding: 0.85rem 1.75rem !important;
  border-radius: 0 !important;
  transition: all .25s ease !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.button:hover {
  background: var(--kd-accent) !important;
  color: var(--kd-bg) !important;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .kd-section { padding: 3rem 1.25rem; }
  .kd-hero { min-height: 80vh; padding: 0 1.25rem 3rem; }
}

/* === BLOCKSY OVERRIDES — hide default page title bar on custom-hero pages === */
.page-template-default .hero-section,
.page-template-default header.entry-header,
.page .hero-section[data-type="type-1"],
body.kd-home .hero-section,
.kd-home header.entry-header { display: none !important; }

/* Strip Blocksy container padding so kd_hero goes full-bleed */
body.page #main-container .ct-container,
body.page #main-container .ct-container-narrow,
body.page #main-container .entry-content {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Kill the empty <p> tags that wpautop wraps around shortcodes */
.entry-content > p:empty,
.kd-section > p:empty,
.kd-featured-grid > p:empty,
.kd-collections > p:empty { display: none !important; }

/* Force Blocksy palette to dark on the whole site */
:root {
  --theme-palette-color-1: #D9A86B !important;  /* primary -> our accent */
  --theme-palette-color-2: #E8BC85 !important;  /* primary hover */
  --theme-palette-color-3: #F2F4F7 !important;  /* heading -> our text */
  --theme-palette-color-4: #F2F4F7 !important;  /* link */
  --theme-palette-color-5: #1F2630 !important;  /* border */
  --theme-palette-color-6: #14181D !important;  /* surface */
  --theme-palette-color-7: #0B0D10 !important;  /* page bg */
  --theme-palette-color-8: #0B0D10 !important;  /* header bg */
  --theme-text-color: #9AA3AE !important;
  --theme-headings-color: #F2F4F7 !important;
  --theme-link-initial-color: #D9A86B !important;
  --theme-link-hover-color: #E8BC85 !important;
  --theme-border-color: #1F2630 !important;
}

/* Make sure body bg is the dark color, not Blocksy's default near-white */
body, body.wp-singular, body.home, #main-container {
  background-color: #0B0D10 !important;
}

/* Header logo image sizing */
.ct-header .site-logo-container img {
  max-height: 64px !important;
  width: auto !important;
  max-width: 280px !important;
  object-fit: contain;
  height: auto !important;
}

/* Footer styling on dark bg */
.ct-footer {
  background: #0B0D10 !important;
  border-top: 1px solid var(--kd-border);
  color: var(--kd-text-muted);
}
.ct-footer a { color: var(--kd-text-muted) !important; }
.ct-footer a:hover { color: var(--kd-accent) !important; }

/* WooCommerce shop page tweaks */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-loop-product__title {
  font-family: var(--kd-font-display) !important;
  color: var(--kd-text) !important;
  font-weight: 400 !important;
}
.woocommerce ul.products li.product .price,
.product .price, .price {
  color: var(--kd-accent) !important;
  font-family: var(--kd-font-body) !important;
  font-weight: 500 !important;
}
.woocommerce-Price-amount { color: var(--kd-accent) !important; }

/* Buttons sitewide on Woo */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce-page .button,
button.single_add_to_cart_button {
  background: transparent !important;
  border: 1px solid var(--kd-accent) !important;
  color: var(--kd-accent) !important;
  border-radius: 0 !important;
  padding: .9rem 1.8rem !important;
  font-family: var(--kd-font-body) !important;
  text-transform: uppercase !important;
  letter-spacing: .15em !important;
  font-size: .8rem !important;
  font-weight: 500 !important;
  transition: all .25s ease !important;
}
.woocommerce button.button:hover,
.woocommerce a.button:hover,
button.single_add_to_cart_button:hover {
  background: var(--kd-accent) !important;
  color: var(--kd-bg) !important;
}

/* Shop product cards */
.woocommerce ul.products li.product {
  background: var(--kd-bg-elevated);
  border: 1px solid var(--kd-border);
  padding: 1rem !important;
  transition: border-color .25s ease;
}
.woocommerce ul.products li.product:hover { border-color: var(--kd-accent); }

/* Headings inside content */
.entry-content h1,
.entry-content h2,
.entry-content h3 { color: var(--kd-text) !important; font-family: var(--kd-font-display) !important; }
.entry-content p, .entry-content li { color: var(--kd-text-muted); }

/* Single product page */
.product .entry-title { color: var(--kd-text) !important; }
.product .product_meta { color: var(--kd-text-muted); }

/* Hide site title text — the custom logo image already contains the brand */
.site-branding .site-title,
.site-description,
.site-branding[data-logo="text-only"] { display: none !important; }
.site-branding p.site-title,
.site-branding .ct-site-title { display: none !important; }

/* Section title centering for collections section etc. */
.kd-section { text-align: left; }

/* Reduce header height a touch */
[data-header*="type-1"] .ct-header [data-row*="middle"] { 
  --height: 80px !important; 
}
[data-header*="type-1"] { --header-height: 80px !important; }

/* Make sure the empty <p> wrappers wpautop creates around block shortcodes don't add extra space */
.entry-content > p { margin: 0; }
.entry-content > p:has(> .kd-section),
.entry-content > p:has(> .kd-hero),
.entry-content > p:has(> .kd-email-capture) {
  display: contents;
}

/* Subtle scroll cue under hero */
.kd-hero { margin-bottom: 0 !important; }

/* Spacing for sections that come right after hero */
.kd-hero + p + .kd-section,
.kd-hero + .kd-section { padding-top: clamp(4rem, 8vw, 7rem); }

/* ============ V2 FIXES ============ */

/* === FIX: WooCommerce notices (cart empty, success, error) are invisible === */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner,
.wc-empty-cart-message,
.cart-empty {
  background: #14181D !important;
  color: #F2F4F7 !important;
  border: 1px solid #1F2630 !important;
  border-radius: 0 !important;
  padding: 1.5rem !important;
}
.woocommerce-message::before,
.woocommerce-info::before,
.cart-empty::before { color: #D9A86B !important; }
.woocommerce-message a,
.woocommerce-info a { color: #D9A86B !important; }

/* WooCommerce cart/checkout page text */
.woocommerce, .woocommerce-page,
.woocommerce h1, .woocommerce h2, .woocommerce h3,
.woocommerce p, .woocommerce td, .woocommerce th,
.woocommerce label, .woocommerce input, .woocommerce select { color: #F2F4F7; }
.woocommerce table.shop_table { 
  background: #14181D !important; 
  border: 1px solid #1F2630 !important;
  color: #F2F4F7 !important;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td {
  border-color: #1F2630 !important;
  color: #F2F4F7 !important;
}
.woocommerce form .form-row label,
.woocommerce-checkout label { color: #F2F4F7 !important; }
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.select2-selection,
.select2-selection--single {
  background: #0B0D10 !important;
  color: #F2F4F7 !important;
  border: 1px solid #1F2630 !important;
  border-radius: 0 !important;
  padding: 0.8rem !important;
}
.woocommerce input.input-text:focus { border-color: #D9A86B !important; outline: none !important; }
.select2-selection__rendered { color: #F2F4F7 !important; }
.select2-dropdown { background: #14181D !important; border-color: #1F2630 !important; }
.select2-results__option { color: #F2F4F7 !important; }
.select2-results__option--highlighted { background: #D9A86B !important; color: #0B0D10 !important; }

/* === FIX: Shipping page heading hierarchy === */
.entry-content h2 {
  font-size: 1.6rem !important;
  margin-top: 2.5rem !important;
  margin-bottom: 0.8rem !important;
  color: #F2F4F7 !important;
  letter-spacing: -0.005em;
}
.entry-content h3 {
  font-size: 1.25rem !important;
  margin-top: 1.8rem !important;
  margin-bottom: 0.6rem !important;
  color: #F2F4F7 !important;
  font-family: var(--kd-font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
}
/* But keep kd_section title big */
.kd-section .kd-section__title {
  font-size: clamp(2rem, 4vw, 3.5rem) !important;
  margin-top: 0 !important;
}

/* === FIX: FAQ as accordion (CSS-only using details/summary if we restructure) === */
.kd-faq__item {
  border-bottom: 1px solid #1F2630;
  padding: 1.5rem 0;
}
.kd-faq__item summary {
  cursor: pointer;
  font-family: var(--kd-font-display);
  font-size: 1.3rem;
  color: #F2F4F7;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}
.kd-faq__item summary::-webkit-details-marker { display: none; }
.kd-faq__item summary::after {
  content: "+";
  font-family: var(--kd-font-mono);
  font-size: 1.5rem;
  color: #D9A86B;
  transition: transform .25s ease;
  flex-shrink: 0;
}
.kd-faq__item[open] summary::after { content: "−"; }
.kd-faq__item .kd-faq__answer {
  padding: 1rem 0 0.5rem;
  color: #9AA3AE;
  line-height: 1.7;
  max-width: 720px;
}

/* === FIX: Header logo brightness === */
.ct-header .site-logo-container img {
  filter: brightness(1.15);
  max-height: 64px !important;
  max-width: 280px !important;
  width: auto !important;
  object-fit: contain;
}

/* === FIX: Mobile off-canvas menu cleanup — hide non-primary items === */
#offcanvas .ct-panel-inner ul li.page-item-7,   /* Cart */
#offcanvas .ct-panel-inner ul li.page-item-8,   /* Checkout */
#offcanvas .ct-panel-inner ul li.page-item-9,   /* My account */
#offcanvas .ct-panel-inner ul li.page-item-19,  /* Shipping */
#offcanvas .ct-panel-inner ul li.page-item-20,  /* FAQ */
#offcanvas .ct-panel-inner ul li.page-item-21,  /* Privacy */
#offcanvas .ct-panel-inner ul li.page-item-22 { /* ToS */
  display: none !important;
}

/* === FIX: Better hero CTA — fill style for primary === */
.kd-hero__cta {
  background: rgba(217, 168, 107, 0.08);
  border: 1px solid var(--kd-accent);
  font-weight: 600 !important;
}

/* === IMPROVE: Shop hero — add atmosphere with a subtle background and proper hero block === */
body.post-type-archive-product .ct-container,
body.tax-product_cat .ct-container { max-width: 100% !important; padding: 0 !important; }
body.post-type-archive-product .hero-section,
body.tax-product_cat .hero-section {
  background: linear-gradient(180deg, #0B0D10 0%, #14181D 100%) !important;
  border-bottom: 1px solid #1F2630;
  --container-padding: 6rem 1.5rem 4rem !important;
  display: block !important;
}
body.post-type-archive-product .hero-section .entry-header,
body.tax-product_cat .hero-section .entry-header {
  display: block !important;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
body.post-type-archive-product .hero-section .page-title,
body.tax-product_cat .hero-section .page-title {
  font-family: var(--kd-font-display) !important;
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  color: #F2F4F7 !important;
  margin: 0 0 1rem !important;
}
/* Add an eyebrow tag and subtitle via JS later — for now style the wrapper */
body.post-type-archive-product .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header {
  text-align: center;
  padding: 2rem 1.5rem 0;
  max-width: 720px;
  margin: 0 auto;
}

/* === SHOP — category subnav above products === */
.kd-shop-subnav {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid #1F2630;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.kd-shop-subnav a {
  font-family: var(--kd-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9AA3AE;
  padding: 0.75rem 1.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .2s ease;
}
.kd-shop-subnav a:hover { color: #F2F4F7; }
.kd-shop-subnav a.is-active {
  color: #D9A86B;
  border-bottom-color: #D9A86B;
}

/* === IMPROVE: Product cards — hide category number that was showing === */
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding-bottom: 0 !important; margin-bottom: 0.3rem !important; }
.woocommerce ul.products li.product > .button { display: none !important; } /* hide loop add-to-cart, we'll show on hover or via overlay */

/* Show button only on hover (desktop) — full width below price on mobile */
@media (min-width: 768px) {
  .woocommerce ul.products li.product { position: relative; }
  .woocommerce ul.products li.product:hover > .button,
  .woocommerce ul.products li.product:focus-within > .button { display: inline-flex !important; }
}
@media (max-width: 767px) {
  .woocommerce ul.products li.product > .button { display: inline-flex !important; width: 100%; }
}

/* The "18" / "19" stray number was the category name — fixed by re-categorizing,
   but also hide WooCommerce default category display on cards just in case */
.woocommerce ul.products li.product .product-category { display: none !important; }

/* === IMPROVE: Single product page === */
body.single-product .ct-breadcrumbs {
  font-family: var(--kd-font-mono);
  letter-spacing: 0.15em;
}
body.single-product .woocommerce-product-details__short-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #9AA3AE;
  padding-top: 1rem;
}
body.single-product .product_meta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1F2630;
  font-family: var(--kd-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
body.single-product .product_meta a { color: #D9A86B !important; }
body.single-product .summary .price {
  font-size: 1.8rem !important;
  font-family: var(--kd-font-display) !important;
}
body.single-product .quantity input { background: #0B0D10 !important; color: #F2F4F7 !important; border: 1px solid #1F2630 !important; }

/* Trust badge under add-to-cart */
.kd-trust-badges {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1F2630;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.kd-trust-badge {
  font-family: var(--kd-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9AA3AE;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kd-trust-badge::before {
  content: "→";
  color: #D9A86B;
  font-size: 1rem;
}

/* === FOOTER — make it richer === */
.ct-footer {
  padding: 4rem 0 0 !important;
  border-top: 1px solid #1F2630;
}

/* === Contact form === */
.kd-contact-form {
  display: grid;
  gap: 1.2rem;
  max-width: 640px;
  margin: 2rem 0;
}
.kd-contact-form label {
  font-family: var(--kd-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9AA3AE;
  display: block;
  margin-bottom: 0.4rem;
}
.kd-contact-form input,
.kd-contact-form textarea,
.kd-contact-form select {
  width: 100%;
  background: #0B0D10;
  border: 1px solid #1F2630;
  color: #F2F4F7;
  padding: 0.9rem 1rem;
  font-family: var(--kd-font-body);
  font-size: 1rem;
  border-radius: 0;
  transition: border-color .2s ease;
}
.kd-contact-form input:focus,
.kd-contact-form textarea:focus,
.kd-contact-form select:focus {
  border-color: #D9A86B;
  outline: none;
}
.kd-contact-form textarea { min-height: 180px; resize: vertical; }
.kd-contact-form button {
  background: transparent;
  border: 1px solid #D9A86B;
  color: #D9A86B;
  padding: 1rem 2.4rem;
  font-family: var(--kd-font-body);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  justify-self: start;
  border-radius: 0;
}
.kd-contact-form button:hover {
  background: #D9A86B;
  color: #0B0D10;
}
.kd-contact-form .kd-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 640px) {
  .kd-contact-form .kd-form-row-2 { grid-template-columns: 1fr; }
}
.kd-form-message {
  padding: 1rem 1.2rem;
  background: rgba(217, 168, 107, 0.08);
  border: 1px solid #D9A86B;
  color: #F2F4F7;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.kd-form-message.is-error {
  background: rgba(218, 0, 28, 0.08);
  border-color: rgba(218, 0, 28, 0.5);
}

/* === SHOP CARDS — make the card image a defined ratio === */
.woocommerce ul.products li.product img,
.woocommerce-loop-product__link img {
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100% !important;
  height: auto !important;
  margin-bottom: 1rem;
}

/* === SECTION SPACING ON HOME — kill the dead space === */
.kd-section { padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 5vw, 5rem) !important; }
.kd-section + .kd-section { padding-top: 0 !important; }

/* === Logo bg cleanup for header === */
.ct-header .site-logo-container { display: inline-block; }

/* ============================================================
   POLISH ROUND — fixes for hero variants, placeholder cards, 
   variable product price-from display, etc.
   ============================================================ */

/* Hero variant: no image (used on FAQ, About, Contact, Shipping etc.) */
.kd-hero.kd-hero--noimage {
  min-height: auto !important;
  padding: 64px 24px 32px !important;
  background: transparent !important;
}
.kd-hero.kd-hero--noimage .kd-hero__image { display: none; }
.kd-hero.kd-hero--noimage .kd-hero__content {
  position: static !important;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
}

/* Hero center alignment */
.kd-hero.kd-hero--center .kd-hero__content {
  text-align: center;
}
.kd-hero.kd-hero--center .kd-hero__eyebrow {
  display: inline-block;
}

/* Make sure hero on info pages has consistent breathing room */
.kd-hero.kd-hero--noimage .kd-hero__title {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}
.kd-hero.kd-hero--noimage .kd-hero__lead {
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--kd-muted, #9AA3AE);
  max-width: 620px;
}
.kd-hero.kd-hero--center .kd-hero__lead {
  margin-left: auto;
  margin-right: auto;
}

/* About page placeholder card */
.kd-about-wrap {
  max-width: 720px;
  margin: 32px auto 64px;
  padding: 0 24px;
}
.kd-about-card,
.kd-placeholder-card {
  background: #14181D;
  border: 1px solid #1F2630;
  border-radius: 12px;
  padding: 40px 36px;
  color: #F2F4F7;
}
.kd-about-card .kd-eyebrow,
.kd-placeholder-card .kd-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: #D9A86B;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.kd-about-card h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: #F2F4F7;
}
.kd-about-card p {
  color: #9AA3AE;
  line-height: 1.65;
  margin-bottom: 16px;
}
.kd-about-card ul.kd-about-facts {
  list-style: none;
  padding: 24px 0 8px;
  margin: 24px 0;
  border-top: 1px solid #1F2630;
}
.kd-about-card ul.kd-about-facts li {
  padding: 8px 0;
  color: #F2F4F7;
  border-bottom: 1px solid #1F2630;
}
.kd-about-card ul.kd-about-facts li:last-child { border-bottom: 0; }
.kd-about-card ul.kd-about-facts strong {
  display: inline-block;
  width: 130px;
  color: #D9A86B;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kd-about-cta-row {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.kd-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}
.kd-btn-primary {
  background: #D9A86B;
  color: #0B0D10 !important;
  border-color: #D9A86B;
}
.kd-btn-primary:hover {
  background: #E8BC85;
  border-color: #E8BC85;
}
.kd-btn-ghost {
  background: transparent;
  color: #F2F4F7 !important;
  border-color: #1F2630;
}
.kd-btn-ghost:hover {
  border-color: #D9A86B;
  color: #D9A86B !important;
}

/* Contact form layout */
.kd-contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  max-width: 1100px;
  margin: 24px auto 80px;
  padding: 0 24px;
}
@media (max-width: 860px) {
  .kd-contact-layout { grid-template-columns: 1fr; gap: 40px; }
}
.kd-contact-form-wrap form {
  background: transparent;
}
.kd-contact-meta {
  background: #14181D;
  border: 1px solid #1F2630;
  border-radius: 12px;
  padding: 32px 28px;
}
.kd-contact-meta h3 {
  font-family: 'Fraunces', serif;
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: #F2F4F7;
}
.kd-contact-meta p {
  color: #9AA3AE;
  margin: 0 0 16px;
  line-height: 1.55;
  font-size: 0.95rem;
}
.kd-contact-meta strong {
  display: block;
  color: #F2F4F7;
  margin-bottom: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'JetBrains Mono', monospace;
}
.kd-contact-meta a {
  color: #D9A86B;
  text-decoration: none;
}
.kd-contact-meta a:hover { color: #E8BC85; }

/* Prose section (Shipping & Returns) */
.kd-prose {
  max-width: 720px;
  margin: 0 auto 80px;
  padding: 0 24px;
  color: #C8CDD6;
  line-height: 1.7;
}
.kd-prose h3 {
  font-family: 'Fraunces', serif;
  color: #F2F4F7;
  font-size: 1.35rem;
  margin: 36px 0 12px;
}
.kd-prose p {
  margin: 0 0 16px;
}
.kd-prose a {
  color: #D9A86B;
}

/* Variable product price-from display */
.woocommerce ul.products li.product .price del,
.woocommerce-page ul.products li.product .price del { display: none; }
.woocommerce ul.products li.product .price ins {
  background: none;
  text-decoration: none;
  color: #D9A86B;
}
.woocommerce ul.products li.product .price {
  color: #D9A86B;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
}
.woocommerce ul.products li.product .price .from {
  color: #9AA3AE;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-right: 4px;
}

/* Variation form styling */
.single-product .variations {
  width: 100%;
  margin-bottom: 16px;
}
.single-product .variations th,
.single-product .variations td {
  padding: 8px 0;
  vertical-align: middle;
}
.single-product .variations th label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9AA3AE;
}
.single-product .variations select {
  width: 100%;
  background: #14181D;
  color: #F2F4F7;
  border: 1px solid #1F2630;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}
.single-product .variations select:focus {
  border-color: #D9A86B;
  outline: none;
}
.single-product .single_variation_wrap .price {
  font-size: 1.5rem;
  color: #D9A86B;
  font-family: 'Fraunces', serif;
  margin-bottom: 12px;
}
.single-product .reset_variations {
  color: #9AA3AE !important;
  font-size: 0.75rem;
  margin-left: 8px;
}

/* Better breadcrumb */
.woocommerce-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9AA3AE;
}
.woocommerce-breadcrumb a {
  color: #9AA3AE;
  text-decoration: none;
}
.woocommerce-breadcrumb a:hover { color: #D9A86B; }

/* Hide empty WooCommerce notices wrapper (Blocksy bug — renders a blue band even when no notices) */
.blocksy-woo-messages-default:empty,
.blocksy-woo-messages-default:has(.woocommerce:empty),
.woocommerce-notices-wrapper:empty,
.woocommerce-notices-wrapper:has(> .woocommerce:empty) {
  display: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}
