/* Catalog Workshop - Luv Tile v2
   Dense, rectilinear, showroom and specification oriented.
   Border radius max 6px for ordinary containers.
   No text-shadow anywhere.
*/

:root {
  --ink: #15202b;
  --ink-soft: #3c5060;
  --ink-faint: #6b828e;
  --brand: #05275c;
  --blue: #0066b2;
  --code-blue: #004f94;
  --accent: #008594;
  --bg: #f4f7f9;
  --white: #ffffff;
  --rule: #cdd5da;
  --rule-dark: #8fa5b0;
  --shadow-sm: 0 1px 4px rgba(0,20,50,.10);
  --shadow-md: 0 2px 10px rgba(0,20,50,.12);
  --radius: 4px;
  --content: 1600px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.content-width {
  width: min(calc(100% - 48px), var(--content));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--brand);
  font-weight: 800;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---- HEADER ---- */
.cw-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  border-bottom: 2px solid var(--rule);
}

.cw-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.cw-brand {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 8px 0;
  flex-shrink: 0;
}
.cw-brand img {
  height: 46px;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

.cw-primary-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.cw-primary-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.cw-primary-nav a:hover { background: var(--bg); }

.cw-header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.cw-phone {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: .3px;
  white-space: nowrap;
}
.cw-phone:hover { text-decoration: underline; }

.cw-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  padding: 0;
}
.cw-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .15s, opacity .15s;
}

/* ---- FILTER BAR ---- */
.cw-filter-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.cw-filter-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 42px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cw-filter-inner::-webkit-scrollbar { display: none; }
.cw-filter-label-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-right: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cw-filter-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  padding: 0 14px;
  height: 42px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .12s, border-color .12s;
}
.cw-filter-tab:hover { color: var(--brand); }
.cw-filter-tab.active {
  color: var(--brand);
  border-bottom-color: var(--accent);
}

/* ---- MOBILE MENU ---- */
.cw-mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--white);
  border-top: 1px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  z-index: 20;
  display: grid;
}
.cw-mobile-menu[hidden] { display: none; }
.cw-mobile-menu a {
  display: block;
  padding: 14px 24px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.cw-mobile-menu a:last-child { border-bottom: 0; }
.cw-mobile-menu a:hover { background: var(--bg); }

/* ---- HERO BANNER ---- */
.cw-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 40px 0;
}

.cw-hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}

.cw-hero-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cw-hero-h1 {
  margin: 0 0 14px;
  font: 700 clamp(42px, 4.2vw, 68px)/1.0 Georgia, 'Times New Roman', serif;
  color: var(--brand);
  letter-spacing: -1.5px;
}

.cw-hero-sub {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 540px;
}

.cw-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}
.cw-stat {
  display: flex;
  flex-direction: column;
  padding: 0 20px 0 0;
}
.cw-stat strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
}
.cw-stat span {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.cw-stat-rule {
  width: 1px;
  height: 32px;
  background: var(--rule-dark);
  margin-right: 20px;
  flex-shrink: 0;
}

.cw-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.cw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.cw-btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.cw-btn-primary:hover { background: var(--code-blue); border-color: var(--code-blue); }
.cw-btn-outline {
  background: transparent;
  border-color: var(--rule-dark);
  color: var(--ink);
}
.cw-btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.cw-btn-green {
  background: #0a7d4b;
  border-color: #0a7d4b;
  color: var(--white);
}
.cw-btn-green:hover { background: #096040; border-color: #096040; }
.cw-btn-lg { min-height: 50px; padding: 12px 28px; font-size: 15px; }

.cw-view-all-btn {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.cw-view-all-btn:hover { text-decoration: underline; }

/* ---- HERO SWATCH GRID ---- */
.cw-hero-swatch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  aspect-ratio: 1;
  max-width: 400px;
}
.cw-hero-swatch-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- SECTION HEADINGS ---- */
.cw-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--rule);
}
.cw-section-title {
  margin: 0;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink);
}

/* ---- CATEGORIES SECTION ---- */
.cw-categories-section {
  background: var(--white);
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--rule);
}

.cw-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cw-cat-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow .15s, border-color .15s;
}
.cw-cat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--rule-dark);
}
.cw-cat-image {
  overflow: hidden;
  flex-shrink: 0;
}
.cw-cat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.cw-cat-card:hover .cw-cat-image img { transform: scale(1.03); }
.cw-cat-info {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.cw-cat-info strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  display: block;
}
.cw-cat-info p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.cw-cat-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}

/* ---- PRODUCTS SECTION ---- */
.cw-products-section {
  background: var(--bg);
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.cw-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cw-product-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.cw-product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--rule-dark);
}
.cw-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.cw-card-image {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--bg);
}
.cw-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.cw-product-card:hover .cw-card-image img { transform: scale(1.03); }
.cw-status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 2px;
}
.cw-status-badge.new {
  background: #c8f0ed;
  color: #005650;
  border: 1px solid #80d4cf;
}
.cw-status-badge.stock {
  background: #0066b2;
  color: var(--white);
}
.cw-card-data {
  padding: 12px 14px;
  border-top: 2px solid var(--rule);
}
.cw-card-code {
  font-size: 15px;
  font-weight: 900;
  color: var(--code-blue);
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: .5px;
}
.cw-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.cw-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.cw-spec-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 2px 6px;
  border-radius: 2px;
}
.cw-card-size {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
}

.cw-empty-state {
  text-align: center;
  padding: 40px;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ---- CONTACT BAND ---- */
.cw-contact-band {
  padding: 28px 0;
  background: var(--white);
  border-top: 1px solid var(--rule);
}
.cw-contact-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.cw-contact-label {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
}
.cw-contact-heading {
  font-size: 26px;
  margin: 0 0 6px;
  font-weight: 900;
}
.cw-contact-heading a { color: inherit; text-decoration: none; }
.cw-contact-heading a:hover { text-decoration: underline; }
.cw-contact-detail { margin: 2px 0; font-size: 14px; color: var(--ink-soft); }
.cw-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- CATEGORY VIEW ---- */
#category-view {
  background: var(--bg);
  min-height: 60vh;
  padding: 24px 0 48px;
}

.cw-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.cw-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.cw-breadcrumb a:hover { text-decoration: underline; }
.cw-breadcrumb span { color: var(--ink-faint); }

.cw-cat-header { margin-bottom: 20px; }
.cw-cat-h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 42px); font-weight: 900; color: var(--brand); }
.cw-cat-desc { margin: 0; font-size: 15px; color: var(--ink-soft); }

.cw-inline-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cw-filter-btn {
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.cw-filter-btn:hover { border-color: var(--rule-dark); color: var(--ink); }
.cw-filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

/* ---- PRODUCT DETAIL VIEW ---- */
#product-view {
  background: var(--white);
  padding-top: 24px;
}

.cw-detail-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: 48px;
}

.cw-gallery-main {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 4/3;
}
.cw-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cw-gallery-main img.is-strip { object-fit: contain; background: var(--bg); }
.cw-gallery-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255,255,255,.88);
  padding: 5px 10px;
  border-radius: 2px;
}
.cw-thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.cw-thumb {
  height: 90px;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .12s;
}
.cw-thumb.active { border-color: var(--accent); }
.cw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cw-spec-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: #d9f5f3;
  color: #015c58;
  border-radius: 2px;
  border: 1px solid #80d4cf;
  margin-bottom: 16px;
}
.cw-code-block { margin-bottom: 8px; }
.cw-code-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.cw-spec-code {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 900;
  font-family: 'Courier New', Courier, monospace;
  color: var(--code-blue);
  letter-spacing: .5px;
  line-height: 1;
}
.cw-spec-name {
  margin: 8px 0 4px;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 700;
  color: var(--ink);
}
.cw-spec-kind {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

.cw-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.cw-spec-table th,
.cw-spec-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--rule);
}
.cw-spec-table th {
  font-weight: 800;
  color: var(--ink-soft);
  width: 120px;
  background: var(--bg);
}
.cw-spec-table td { color: var(--ink); }

.cw-spec-note {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 8px 12px;
  border-left: 3px solid var(--rule);
}

.cw-sample-box {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
  background: #f0fafb;
}
.cw-sample-box p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
}
.cw-sample-box p strong { color: var(--ink); }
.cw-request-sample { width: 100%; }

/* ---- POOL PREVIEW ---- */
.cw-pool-preview {
  background: var(--bg);
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}
.cw-preview-header { margin-bottom: 20px; }
.cw-preview-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.cw-preview-header h2 { margin: 0 0 8px; }
.cw-preview-header p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 600px; }

.cw-pool-stage {
  position: relative;
  aspect-ratio: 800 / 377;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #d4e8ed;
}
.pool-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pool-base { z-index: 0; object-fit: fill; }
.pool-strip { z-index: 1; inset: auto; left: 0; top: 28.4%; height: 33.7%; object-fit: fill; }
.pool-top-feather { z-index: 2; inset: auto; left: 0; top: 19.1%; height: 19.1%; object-fit: fill; }
.pool-water-feather { z-index: 3; inset: auto; left: 0; top: 57.6%; height: 20.2%; object-fit: fill; }

.cw-preview-chip {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255,255,255,.9);
  padding: 5px 10px;
  border-radius: 2px;
}

.cw-viz-note {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 10px;
  text-align: center;
}

/* ---- RELATED SECTION ---- */
.cw-related-section {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.cw-related-section .cw-section-title { margin-bottom: 16px; }
.cw-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ---- SAMPLE BAND ---- */
.cw-sample-band {
  padding: 32px 0 48px;
  border-top: 1px solid var(--rule);
}
.cw-sample-band-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 28px;
  background: var(--brand);
  border-radius: var(--radius);
  color: var(--white);
}
.cw-band-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.65);
  margin-bottom: 4px;
}
.cw-band-heading {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
}
.cw-sample-band p { margin: 0; font-size: 14px; color: rgba(255,255,255,.8); }

/* ---- GUIDE VIEW ---- */
#guide-view {
  background: var(--white);
  padding: 24px 0 48px;
}
.cw-guide-header { margin-bottom: 32px; }
.cw-guide-header h1 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 900;
  margin: 0 0 10px;
  color: var(--brand);
}
.cw-guide-intro { font-size: 16px; color: var(--ink-soft); max-width: 680px; margin: 0; line-height: 1.6; }
.cw-guide-body { max-width: 800px; }
.cw-guide-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.cw-guide-section:last-child { border-bottom: 0; }
.cw-guide-section h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--brand);
}
.cw-guide-section p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.cw-guide-section p:last-child { margin-bottom: 0; }
.cw-guide-footer {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---- BOTTOM NAV ---- */
.cw-bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 64px;
  background: var(--white);
  border-top: 2px solid var(--rule);
}
.cw-bottom-nav a,
.cw-bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
.cw-bottom-nav a:last-child,
.cw-bottom-nav button { border-right: 0; }
.cw-bottom-nav b { font-size: 22px; display: block; }
.cw-sample-count {
  position: absolute;
  top: 6px;
  right: calc(50% - 24px);
  min-width: 18px;
  padding: 1px 4px;
  background: var(--accent);
  color: var(--white);
  font-size: 9px;
  font-weight: 900;
  font-style: normal;
  border-radius: 2px;
}

/* ---- SAMPLE DRAWER ---- */
.cw-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,25,54,.5);
}
.cw-overlay[hidden] { display: none; }

.cw-sample-drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(480px, 96vw);
  height: 100vh;
  background: var(--white);
  box-shadow: -8px 0 24px rgba(0,20,50,.18);
  transform: translateX(105%);
  transition: transform .22s;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.cw-sample-drawer.open { transform: none; }

.cw-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.cw-drawer-header small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
}
.cw-drawer-header h2 { margin: 4px 0 0; font-size: 20px; }
.cw-drawer-close {
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0 4px;
}

.cw-drawer-items { flex: 1; }
.cw-drawer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.cw-drawer-item strong { display: block; font-weight: 800; }
.cw-drawer-item small { color: var(--ink-faint); font-family: 'Courier New', Courier, monospace; }
.cw-drawer-item button {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.cw-drawer-empty { font-size: 14px; color: var(--ink-faint); padding: 12px 0; }

.cw-form-fields { display: grid; gap: 12px; margin-bottom: 16px; }
.cw-form-fields label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
  position: relative;
}
.cw-form-fields input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 15px;
  color: var(--ink);
}
.cw-form-fields input[aria-invalid="true"] {
  border: 2px solid #b42318;
  background: #fff8f7;
}
.cw-required-label {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 9px;
  color: #a2372b;
  letter-spacing: .5px;
}
.cw-field-help { font-size: 11px; color: var(--ink-faint); margin-top: -4px; line-height: 1.4; text-transform: none; letter-spacing: 0; font-weight: 400; }

.cw-policy-block {
  border: 2px solid #bfe5e8;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  background: #f0fafb;
}
.cw-policy-block legend { font-size: 12px; font-weight: 800; color: var(--brand); padding: 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.cw-policy-label {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}
.cw-policy-label input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.cw-policy-label input[aria-invalid="true"] { outline: 2px solid #b42318; }
.cw-policy-block > small { display: block; margin-top: 8px; padding-left: 30px; font-size: 11px; color: var(--ink-faint); line-height: 1.35; }

.cw-form-error {
  padding: 10px 12px;
  border-left: 3px solid #b42318;
  background: #fff1f0;
  color: #8d1b13;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}
.cw-submit-btn { width: 100%; }
.cw-proto-note { display: block; text-align: center; color: var(--ink-faint); font-size: 11px; margin-top: 10px; }

/* ---- TOAST ---- */
.cw-toast {
  position: fixed;
  z-index: 60;
  bottom: 76px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--brand);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  white-space: nowrap;
}
.cw-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- RESPONSIVE: 1024px ---- */
@media (max-width: 1024px) {
  .cw-category-grid { grid-template-columns: 1fr; }
  .cw-cat-card { grid-template-columns: 140px 1fr; }
  .cw-product-grid { grid-template-columns: repeat(3, 1fr); }
  .cw-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- RESPONSIVE: 900px ---- */
@media (max-width: 900px) {
  .cw-primary-nav { display: none; }
  .cw-menu-btn { display: flex; }
  .cw-hero-inner { grid-template-columns: 1fr; }
  .cw-hero-swatch-grid { max-width: 100%; aspect-ratio: 2; }
  .cw-hero-swatch-grid img { height: 180px; }
  .cw-product-grid { grid-template-columns: repeat(2, 1fr); }
  .cw-detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .cw-related-grid { grid-template-columns: repeat(2, 1fr); }
  .cw-sample-band-inner { grid-template-columns: 1fr; }
  .cw-contact-inner { grid-template-columns: 1fr; gap: 20px; }
}

/* ---- RESPONSIVE: 600px ---- */
@media (max-width: 600px) {
  .content-width { width: calc(100% - 24px); }
  .cw-topbar { grid-template-columns: 1fr auto; height: 54px; }
  .cw-brand { height: 54px; padding: 6px 0; }
  .cw-brand img { height: 38px; }
  .cw-phone { display: none; }
  .cw-hero { padding: 24px 0; }
  .cw-hero-h1 { font-size: 36px; }
  .cw-hero-sub { font-size: 14px; }
  .cw-hero-actions { flex-direction: column; gap: 8px; }
  .cw-hero-actions .cw-btn { text-align: center; }
  .cw-hero-swatch-grid { margin-top: 20px; }
  .cw-hero-stats { gap: 0; }
  .cw-stat strong { font-size: 18px; }
  .cw-category-grid { grid-template-columns: 1fr; }
  .cw-cat-card { grid-template-columns: 100px 1fr; }
  .cw-cat-image img { height: 100%; min-height: 90px; }
  .cw-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cw-card-image { height: 150px; }
  .cw-related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cw-gallery-main { aspect-ratio: 4/3; }
  .cw-thumb { height: 70px; }
  .cw-spec-code { font-size: 32px; }
  .cw-spec-name { font-size: 22px; }
  .cw-pool-stage { width: 100%; }
  .cw-sample-band-inner { flex-direction: column; gap: 16px; }
  .cw-contact-inner { grid-template-columns: 1fr; }
  .cw-contact-actions { flex-direction: row; }
  .cw-bottom-nav { height: 58px; }
  .cw-bottom-nav a,
  .cw-bottom-nav button { font-size: 10px; }
  .cw-bottom-nav b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cw-sample-drawer, .cw-toast,
  .cw-product-card, .cw-cat-card,
  .cw-card-image img, .cw-cat-image img { transition: none; }
}
