/*
Theme Name: Clearwater Commerce
Theme URI: https://cwgenetics.com
Author: Clearwater Genetics
Description: Branded WooCommerce storefront for Clearwater Genetics.
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: clearwater-commerce
*/

:root {
  --cw-bg: #141b29;
  --cw-bg-deep: #0c111b;
  --cw-panel: #1b2435;
  --cw-panel-soft: rgba(27, 36, 53, 0.76);
  --cw-green: #39de84;
  --cw-green-deep: #1fac62;
  --cw-blue: #8ddcf7;
  --cw-purple: #cf91f2;
  --cw-gold: #ffb14f;
  --cw-text: #f0eef5;
  --cw-muted: rgba(232, 230, 240, 0.74);
  --cw-border: rgba(57, 222, 132, 0.18);
  --cw-border-soft: rgba(255, 255, 255, 0.08);
  --cw-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --cw-body: "DM Sans", system-ui, sans-serif;
  --cw-max: 1240px;
  --cw-radius: 16px;
  --cw-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cw-text);
  background:
    radial-gradient(circle at 15% 5%, rgba(57, 222, 132, 0.08), transparent 30rem),
    radial-gradient(circle at 88% 22%, rgba(141, 220, 247, 0.07), transparent 28rem),
    var(--cw-bg);
  font-family: var(--cw-body);
  font-size: 16px;
  line-height: 1.65;
}
body.cw-menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 {
  margin-top: 0;
  color: #fff;
  font-family: var(--cw-display);
  font-weight: 300;
  letter-spacing: 0.035em;
  line-height: 1.03;
}
p { margin-top: 0; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.cw-shell { width: min(calc(100% - 40px), var(--cw-max)); margin-inline: auto; }
.cw-section { padding: 84px 0; }
.cw-section--tight { padding: 58px 0; }
.cw-section--line { border-top: 1px solid var(--cw-border); }
.cw-kicker {
  margin-bottom: 12px;
  color: var(--cw-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cw-section-heading {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: clamp(38px, 6vw, 72px);
}
.cw-lede { max-width: 720px; color: var(--cw-muted); font-size: clamp(17px, 2vw, 20px); }

.cw-site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid var(--cw-border);
  background: rgba(12, 17, 27, 0.93);
  backdrop-filter: blur(18px);
}
.cw-nav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cw-logo { display: inline-flex; align-items: center; min-width: 210px; }
.cw-logo img { width: 270px; max-height: 48px; object-fit: contain; object-position: left center; }
.cw-nav-links { display: flex; align-items: center; gap: 28px; }
.cw-nav-links a {
  color: var(--cw-muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 160ms ease;
}
.cw-nav-links a:hover, .cw-nav-links a:focus-visible { color: #fff; }
.cw-cart-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(57, 222, 132, 0.35);
  border-radius: 999px;
  color: #fff !important;
  background: rgba(57, 222, 132, 0.08);
}
.cw-menu-button {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--cw-border-soft);
  border-radius: 12px;
  color: #fff;
  background: var(--cw-panel);
}

.cw-hero {
  position: relative;
  overflow: hidden;
  min-height: 670px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--cw-border);
}
.cw-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(141, 220, 247, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 220, 247, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  pointer-events: none;
}
.cw-hero::after {
  content: "";
  position: absolute;
  width: 44rem; height: 44rem;
  right: -18rem; top: -17rem;
  border: 1px solid rgba(57, 222, 132, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(57, 222, 132, 0.018), 0 0 0 8rem rgba(141, 220, 247, 0.018);
}
.cw-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: clamp(40px, 7vw, 100px);
  padding: 92px 0;
}
.cw-hero h1 { max-width: 820px; margin-bottom: 22px; font-size: clamp(58px, 9vw, 122px); }
.cw-hero h1 span { color: var(--cw-green); }
.cw-hero-copy p { max-width: 680px; margin-bottom: 30px; color: var(--cw-muted); font-size: 19px; }
.cw-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cw-button, .button, button.button, input.button, .wp-element-button {
  display: inline-flex !important;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 21px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: #07140e !important;
  background: var(--cw-green) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.cw-button:hover, .button:hover, button.button:hover, input.button:hover, .wp-element-button:hover {
  color: #06130d !important;
  background: #6aeda3 !important;
  transform: translateY(-2px);
}
.cw-button--outline {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}
.cw-button--outline:hover { color: #fff !important; background: rgba(255, 255, 255, 0.08) !important; }
.cw-button--purple { color: #13091b !important; background: var(--cw-purple) !important; }
.cw-hero-aside {
  padding: 26px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius);
  background: rgba(14, 22, 34, 0.72);
  box-shadow: var(--cw-shadow);
}
.cw-hero-aside strong { display: block; margin-bottom: 5px; color: #fff; font-family: var(--cw-display); font-size: 26px; font-weight: 400; }
.cw-hero-aside p { margin-bottom: 16px; font-size: 14px; }
.cw-signal-list { display: grid; gap: 0; }
.cw-signal { padding: 15px 0; border-top: 1px solid var(--cw-border-soft); }
.cw-signal small { display: block; color: var(--cw-green); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.cw-signal span { color: var(--cw-muted); font-size: 14px; }

.cw-line-grid, .cw-product-grid, ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.cw-line-card, .cw-product-card, ul.products li.product {
  position: relative;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  overflow: hidden;
  min-height: 220px;
  padding: 22px !important;
  border: 1px solid var(--cw-border-soft);
  border-radius: var(--cw-radius);
  background:
    radial-gradient(circle at 100% 0, rgba(57, 222, 132, 0.1), transparent 54%),
    var(--cw-panel-soft);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.cw-line-card:hover, .cw-product-card:hover, ul.products li.product:hover {
  z-index: 2;
  border-color: rgba(57, 222, 132, 0.4);
  background-color: rgba(31, 43, 62, 0.95);
  transform: translateY(-4px);
}
.cw-line-card { display: flex; flex-direction: column; justify-content: space-between; }
.cw-line-card small { color: var(--cw-green); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.cw-line-card h3 { margin: 24px 0 6px; font-size: 30px; }
.cw-line-card span { color: var(--cw-muted); font-size: 14px; }
.cw-product-card { display: flex; flex-direction: column; }
.cw-product-art {
  display: grid;
  min-height: 96px;
  margin: -22px -22px 19px;
  place-items: center;
  border-bottom: 1px solid var(--cw-border-soft);
  color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(141, 220, 247, 0.08), rgba(207, 145, 242, 0.08)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.025) 14px 15px);
  font-family: var(--cw-display);
  font-size: 40px;
  letter-spacing: 0.08em;
}
.cw-product-card h3 { margin-bottom: 8px; font-size: 24px; }
.cw-product-card p { color: var(--cw-muted); font-size: 13px; }
.cw-product-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; }
.cw-product-meta strong, .price { color: #fff !important; font-family: var(--cw-display); font-size: 24px !important; font-weight: 400 !important; }

.cw-proof-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.cw-proof-card { padding: 26px; border: 1px solid var(--cw-border-soft); border-radius: var(--cw-radius); background: rgba(12, 17, 27, 0.46); }
.cw-proof-card h3 { margin-bottom: 10px; font-size: 28px; }
.cw-proof-card p { margin: 0; color: var(--cw-muted); }
.cw-contact-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; padding: 36px; border: 1px solid rgba(141, 220, 247, 0.2); border-radius: 22px; background: linear-gradient(135deg, rgba(141, 220, 247, 0.08), rgba(57, 222, 132, 0.05)); }
.cw-contact-panel h2 { margin-bottom: 8px; font-size: clamp(34px, 5vw, 58px); }
.cw-contact-panel p { margin: 0; color: var(--cw-muted); }

.cw-content { min-height: 60vh; padding: 72px 0 90px; }
.cw-content-header { margin-bottom: 36px; }
.cw-content-header h1, .woocommerce-products-header__title { font-size: clamp(46px, 7vw, 82px); }
.woocommerce .woocommerce-breadcrumb { margin-bottom: 18px; color: var(--cw-muted); }
.woocommerce .woocommerce-result-count { color: var(--cw-muted); }
.woocommerce .woocommerce-ordering select, .woocommerce select, select {
  min-height: 46px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--cw-border-soft);
  border-radius: 10px;
  color: var(--cw-text);
  background: var(--cw-panel);
}
ul.products li.product img { display: none !important; }
ul.products li.product .woocommerce-loop-product__title { min-height: 64px; padding: 18px 0 0 !important; font-size: 25px !important; }
ul.products li.product::before {
  content: "CLEARWATER";
  display: grid;
  min-height: 92px;
  margin: -22px -22px 0;
  place-items: center;
  border-bottom: 1px solid var(--cw-border-soft);
  color: rgba(255,255,255,.6);
  background: linear-gradient(135deg, rgba(57,222,132,.08), rgba(141,220,247,.08));
  font-family: var(--cw-display);
  font-size: 23px;
  letter-spacing: .16em;
}
ul.products li.product .button { width: 100%; margin-top: 16px !important; }
.woocommerce span.onsale { min-width: auto; min-height: auto; padding: 7px 10px; border-radius: 999px; line-height: 1; background: var(--cw-green); }
.woocommerce div.product { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: 48px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { float: none; width: auto; }
.woocommerce div.product div.images { min-height: 360px; border: 1px solid var(--cw-border-soft); border-radius: var(--cw-radius); background: linear-gradient(135deg, rgba(57,222,132,.08), rgba(141,220,247,.06)); }
.woocommerce div.product div.images img { border-radius: var(--cw-radius); }
.woocommerce div.product .product_title { font-size: clamp(42px,6vw,72px); }
.woocommerce div.product p.price { font-size: 34px !important; }
.woocommerce-product-details__short-description, .woocommerce div.product .summary { color: var(--cw-muted); }
.quantity .qty { min-height: 48px; border: 1px solid var(--cw-border-soft); border-radius: 10px; color: #fff; background: var(--cw-panel); }
.woocommerce-tabs, .related.products { grid-column: 1 / -1; }
.woocommerce-tabs ul.tabs::before, .woocommerce-tabs ul.tabs li { border-color: var(--cw-border-soft) !important; }
.woocommerce-tabs ul.tabs li { background: var(--cw-panel) !important; }
.woocommerce-tabs ul.tabs li a { color: var(--cw-muted) !important; }
.woocommerce-tabs ul.tabs li.active a { color: #fff !important; }
.woocommerce table.shop_table { overflow: hidden; border-color: var(--cw-border-soft); border-radius: var(--cw-radius); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--cw-border-soft); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce input.input-text, .woocommerce textarea, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--cw-border-soft);
  border-radius: 10px;
  color: #fff;
  background: var(--cw-panel);
}
.select2-container--default .select2-selection--single { min-height: 48px; border-color: var(--cw-border-soft); border-radius: 10px; background: var(--cw-panel); }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding-top: 9px; color: #fff; }
.woocommerce-info, .woocommerce-message, .woocommerce-error { border-radius: 12px; color: var(--cw-text); background: var(--cw-panel); }
.woocommerce-info { border-top-color: var(--cw-blue); }
.woocommerce-message { border-top-color: var(--cw-green); }
.woocommerce-error { border-top-color: #e05050; }
.wc-block-components-sidebar-layout { color: var(--cw-text); }
.wc-block-components-totals-wrapper, .wc-block-components-order-summary, .wc-block-checkout__form { border-color: var(--cw-border-soft) !important; }

.cw-site-footer { border-top: 1px solid var(--cw-border); background: var(--cw-bg-deep); }
.cw-footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr .7fr; gap: 38px; padding: 58px 0 36px; }
.cw-footer-brand img { width: 280px; margin-bottom: 18px; }
.cw-footer-brand p { max-width: 430px; color: var(--cw-muted); }
.cw-footer-title { margin-bottom: 14px; color: var(--cw-green); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cw-footer-links { display: grid; gap: 9px; }
.cw-footer-links a { color: var(--cw-muted); font-size: 14px; }
.cw-footer-links a:hover { color: #fff; }
.cw-footer-bottom { padding: 22px 0 34px; border-top: 1px solid var(--cw-border-soft); color: var(--cw-muted); font-size: 12px; }
.cw-disclaimer { max-width: 980px; margin: 16px 0 0; color: rgba(232,230,240,.58); }

.cw-age-gate {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 12, 19, 0.96);
  backdrop-filter: blur(18px);
}
.cw-age-gate[hidden] { display: none; }
.cw-age-box { width: min(100%, 520px); padding: 34px; border: 1px solid var(--cw-border); border-radius: 22px; background: var(--cw-panel); box-shadow: var(--cw-shadow); text-align: center; }
.cw-age-box img { width: 290px; margin-bottom: 22px; }
.cw-age-box h2 { margin-bottom: 12px; font-size: 40px; }
.cw-age-box p { color: var(--cw-muted); }
.cw-age-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }

@media (max-width: 980px) {
  .cw-nav-links {
    position: fixed;
    inset: 77px 0 auto;
    display: none;
    padding: 30px 20px;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--cw-border);
    background: rgba(12,17,27,.99);
  }
  .cw-nav-links.is-open { display: flex; }
  .cw-menu-button { display: inline-grid; place-items: center; }
  .cw-hero-grid { grid-template-columns: 1fr; align-items: start; }
  .cw-hero { min-height: auto; }
  .cw-hero-aside { max-width: 680px; }
  .cw-line-grid, .cw-product-grid, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cw-proof-grid { grid-template-columns: 1fr; }
  .cw-footer-grid { grid-template-columns: 1fr 1fr; }
  .woocommerce div.product { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cw-shell { width: min(calc(100% - 28px), var(--cw-max)); }
  .cw-nav { min-height: 68px; }
  .cw-logo { min-width: 0; }
  .cw-logo img { width: 215px; }
  .cw-nav-links { inset-block-start: 69px; }
  .cw-hero-grid { padding: 68px 0; }
  .cw-hero h1 { font-size: clamp(52px, 17vw, 78px); }
  .cw-hero-copy p { font-size: 17px; }
  .cw-actions { display: grid; }
  .cw-button { width: 100%; }
  .cw-section { padding: 62px 0; }
  .cw-section--tight { padding: 46px 0; }
  .cw-line-grid, .cw-product-grid, ul.products { grid-template-columns: 1fr; }
  .cw-line-card, .cw-product-card, ul.products li.product { min-height: 190px; }
  .cw-contact-panel { grid-template-columns: 1fr; padding: 26px; }
  .cw-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cw-age-box { padding: 26px 20px; }
  .cw-age-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
