/*
 * CraftWorks Theme R2 — Premium Industrial Storefront Foundation
 * M-WEB-OVERHAUL-R2-PHASE1 | Owner Design Review Build
 * Loads after theme-r1.css — overrides only
 */

body.cw-r2 {
  background: var(--cw-matte-black);
}

/* ── Hide legacy clutter ── */
body.cw-r2 .top-navbar,
body.cw-r2 .nav-search-tags,
body.cw-r2 .cw-hero-features,
body.cw-r2 .quick-icons,
body.cw-r2 .trust-features-section {
  display: none !important;
}

body.cw-r2 .cw-r2-collections.cw-hero-features {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: 0;
}

body.cw-r2 .main-container {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ═══ HEADER R2 ═══ */
body.cw-r2 .site-header {
  background: rgba(18, 20, 22, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cw-border);
}

body.cw-r2 .header-row-utility .header-row-inner {
  min-height: var(--header-r2-height);
  gap: var(--space-8);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

body.cw-r2 .site-header .logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  gap: var(--space-4);
}

body.cw-r2 .site-header .logo-img {
  height: 44px;
  width: 44px;
}

body.cw-r2 .logo-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.cw-r2 .logo-attribution {
  font-size: 0.65rem;
  margin-top: 0;
  opacity: 0.75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.cw-r2 .site-header .search-wrapper {
  max-width: 480px;
}

body.cw-r2 .site-header .search-box {
  border-radius: var(--radius-full);
  padding: 4px 4px 4px var(--space-4);
}

body.cw-r2 .site-header .search-box input {
  font-size: var(--text-base);
  padding: var(--space-3);
}

body.cw-r2 .header-actions-group {
  gap: var(--space-4);
}

body.cw-r2 .header-action-item {
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

body.cw-r2 .header-action-item .action-label {
  font-size: var(--text-xs);
}

body.cw-r2 .header-row-nav {
  min-height: var(--nav-r2-height);
}

body.cw-r2 .header-row-nav .container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

body.cw-r2 .primary-nav.desktop-nav {
  gap: var(--space-8);
  justify-content: center;
  width: 100%;
}

body.cw-r2 .primary-nav.desktop-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body.cw-r2 .primary-nav.desktop-nav a.active,
body.cw-r2 .primary-nav.desktop-nav a:hover {
  color: var(--cw-copper);
}

/* ═══ HERO R2 — Visual Hook Batch 1 ═══ */
body.cw-r2 .cw-hero {
  position: relative;
  min-height: clamp(78vh, var(--cw-hero-min-vh), var(--cw-hero-max-vh));
  max-height: none;
  border-radius: var(--radius-xl);
  margin-bottom: var(--section-gap);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background-color: var(--cw-matte-black);
  background-size: cover;
  background-position: center 30%;
}

body.cw-r2 .cw-hero-priority-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}

body.cw-r2 .cw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    var(--cw-image-overlay-start) 0%,
    var(--cw-image-overlay-mid) 45%,
    var(--cw-image-overlay-end) 100%
  );
  z-index: 1;
}

body.cw-r2 .cw-hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: var(--space-12) var(--space-10);
}

body.cw-r2 .cw-hero-badge {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cw-warm-white);
  border: 1px solid rgba(245, 240, 232, 0.22);
  background: rgba(18, 20, 22, 0.35);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
  display: inline-block;
}

body.cw-r2 .cw-hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
  color: var(--cw-warm-white);
}

body.cw-r2 .cw-hero-subtitle {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--cw-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}

body.cw-r2 .cw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

body.cw-r2 .cw-hero-actions .btn-primary {
  background: var(--cw-copper);
  min-height: var(--btn-height-lg);
  padding: 0 var(--space-8);
}

body.cw-r2 .cw-hero-actions .btn-secondary {
  border: 1px solid var(--cw-border-strong);
  color: var(--cw-text);
  min-height: var(--btn-height-lg);
  padding: 0 var(--space-8);
}

/* ═══ SECTIONS ═══ */
.cw-r2-section {
  margin-bottom: var(--section-gap);
}

.cw-r2-section-head {
  margin-bottom: var(--space-8);
  max-width: 720px;
}

.cw-r2-section-head .eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cw-gold);
  margin-bottom: var(--space-3);
  display: block;
}

.cw-r2-section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.cw-r2-section-head p {
  color: var(--cw-text-muted);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

/* Category discovery cards */
.cw-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}

.cw-category-card {
  display: flex;
  flex-direction: column;
  background: var(--cw-charcoal);
  border: var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
  min-height: 200px;
}

.cw-category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 115, 51, 0.4);
}

.cw-category-card-visual {
  flex: 1;
  min-height: 120px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.cw-category-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--cw-charcoal), transparent 60%);
}

.cw-category-card-body {
  padding: var(--space-5);
}

.cw-category-card-body h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: var(--leading-thai);
}

.cw-category-card-body p {
  font-size: var(--text-sm);
  color: var(--cw-text-muted);
  line-height: var(--leading-thai);
}

/* Why CraftWorks */
.cw-benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.cw-benefit-card {
  padding: var(--space-6);
  background: var(--cw-charcoal);
  border: var(--border-default);
  border-radius: var(--radius-lg);
}

.cw-benefit-card .icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-4);
  opacity: 0.9;
}

.cw-benefit-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: var(--leading-thai);
}

.cw-benefit-card p {
  font-size: var(--text-sm);
  color: var(--cw-text-muted);
  line-height: var(--leading-relaxed);
}

/* Process strip */
.cw-process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  counter-reset: step;
}

.cw-process-step {
  padding: var(--space-5);
  border-left: 2px solid var(--cw-copper);
  background: rgba(36, 40, 46, 0.5);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.cw-process-step .num {
  font-size: var(--text-xs);
  color: var(--cw-copper);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.cw-process-step h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: var(--leading-thai);
}

.cw-process-step p {
  font-size: var(--text-xs);
  color: var(--cw-text-muted);
  line-height: var(--leading-relaxed);
}

/* Inspiration banner */
.cw-inspire-banner {
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  background: linear-gradient(135deg, var(--cw-charcoal) 0%, var(--cw-graphite) 100%);
  border: var(--border-default);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.cw-inspire-banner .visual {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
}

/* Final CTA */
.cw-final-cta {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  background: var(--cw-charcoal);
  border: var(--border-default);
  border-radius: var(--radius-xl);
  margin-bottom: var(--section-gap);
}

.cw-final-cta h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.cw-final-cta p {
  color: var(--cw-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-6);
  line-height: var(--leading-relaxed);
}

/* Future feature slots — documented, not active */
.cw-future-slots {
  display: none;
}

/* ═══ PRODUCT GRID R2 ═══ */
body.cw-r2 #catalog.cw-r2-section-head,
body.cw-r2 .section-header {
  border: none;
  padding: 0;
  margin-bottom: var(--space-8);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

body.cw-r2 .product-grid,
body.cw-r2 #product-grid-list,
body.cw-r2 #product-grid-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--section-gap);
}

body.cw-r2 .product-card,
body.cw-r2 .cw-r2-card {
  display: flex;
  flex-direction: column;
  background: var(--cw-charcoal);
  border: var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
}

body.cw-r2 .product-card .p-badge {
  display: none;
}

body.cw-r2 .cw-cover-wrap,
body.cw-r2 .product-card .p-image-wrapper {
  position: relative;
  aspect-ratio: var(--product-cover-ratio);
  width: 100%;
  margin: 0 !important;
  border-radius: 0 !important;
  min-height: var(--card-cover-min-h);
  background: var(--cw-graphite);
}

body.cw-r2 .cw-cover-wrap img,
body.cw-r2 .product-card .p-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.cw-r2 .cw-cover-tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(18, 20, 22, 0.75);
  color: var(--cw-gold);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 162, 39, 0.3);
  z-index: 2;
}

body.cw-r2 .cw-cover-badge {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(184, 115, 51, 0.9);
  color: var(--cw-text);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

body.cw-r2 .product-card .download-img-btn,
body.cw-r2 .product-card .p-thumbs-gallery {
  display: none !important;
}

body.cw-r2 .cw-card-body,
body.cw-r2 .product-card > div:not(.cw-cover-wrap):not(.p-image-wrapper):not(.p-badge) {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

body.cw-r2 .product-card .p-title,
body.cw-r2 .cw-card-title {
  font-size: var(--text-base) !important;
  font-weight: 600 !important;
  line-height: var(--leading-thai) !important;
  min-height: auto !important;
  margin: 0 !important;
  -webkit-line-clamp: 2;
}

body.cw-r2 .cw-card-benefit {
  font-size: var(--text-sm);
  color: var(--cw-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

body.cw-r2 .cw-card-price .cw-price-compare,
body.cw-r2 .pd-price-compare {
  text-decoration: line-through;
  opacity: 0.65;
  font-weight: 600;
  margin-right: 0.35rem;
  color: var(--text-muted, #8a8a8a) !important;
}

body.cw-r2 .cw-sale-badge.cw-sale-discount {
  color: #c0392b;
}

body.cw-r2 .product-card .p-stock {
  font-size: var(--text-xs) !important;
  margin: 0 !important;
  align-self: flex-start !important;
}

body.cw-r2 .product-card .p-sold {
  display: none;
}

body.cw-r2 .cw-card-actions,
body.cw-r2 .product-card > div:last-child {
  margin-top: auto;
  padding-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

body.cw-r2 .card-quote-btn {
  width: 100%;
  min-height: 40px;
  font-weight: 600;
  border-color: var(--cw-copper) !important;
  color: var(--cw-copper) !important;
}

body.cw-r2 .card-quote-btn:hover {
  background: rgba(184, 115, 51, 0.12) !important;
}

/* ═══ REVIEWS R2 ═══ */
body.cw-r2 .reviews-section {
  margin-bottom: var(--section-gap);
  padding: var(--space-10) 0;
}

body.cw-r2 .section-header-wrap {
  margin-bottom: var(--space-8);
}

body.cw-r2 .section-header-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
}

body.cw-r2 .section-header-desc {
  color: var(--cw-text-muted);
  margin-top: var(--space-2);
  line-height: var(--leading-relaxed);
}

body.cw-r2 .reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

body.cw-r2 .review-card {
  padding: var(--space-6);
  background: var(--cw-charcoal);
  border: var(--border-default);
  border-radius: var(--radius-lg);
}

body.cw-r2 .review-text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--cw-text);
  margin: var(--space-4) 0 var(--space-5);
}

body.cw-r2 .review-user .user-name {
  font-size: var(--text-sm);
  font-weight: 600;
}

body.cw-r2 .review-user .user-location {
  font-size: var(--text-xs);
  color: var(--cw-text-subtle);
}

/* ═══ TRACKING R2 ═══ */
body.cw-r2 .tracking-section {
  margin-bottom: var(--section-gap);
}

body.cw-r2 .tracking-card-container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8);
  background: var(--cw-charcoal);
  border: var(--border-default);
  border-radius: var(--radius-xl);
}

body.cw-r2 .tracking-header .icon-truck {
  font-size: 2rem;
  margin-bottom: var(--space-3);
}

body.cw-r2 .tracking-header h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

body.cw-r2 .tracking-header p {
  color: var(--cw-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

body.cw-r2 .tracking-tip {
  font-size: var(--text-xs);
  color: var(--cw-text-subtle);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: rgba(18, 20, 22, 0.5);
  border-radius: var(--radius-md);
}

body.cw-r2 .tracking-form .input-group {
  margin-bottom: var(--space-4);
}

/* ═══ FOOTER R2 ═══ */
body.cw-r2 .main-footer {
  background: var(--cw-matte-black);
  border-top: var(--border-default);
  padding-top: var(--space-12);
  margin-top: var(--section-gap-sm);
}

body.cw-r2 .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-10);
  padding-bottom: var(--space-10);
}

body.cw-r2 .footer-brand-info p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--cw-text-muted);
  max-width: 36ch;
}

body.cw-r2 .footer-links h4,
body.cw-r2 .footer-contact h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cw-text);
  margin-bottom: var(--space-4);
}

body.cw-r2 .footer-links ul li {
  margin-bottom: var(--space-3);
}

body.cw-r2 .footer-links a {
  font-size: var(--text-sm);
  color: var(--cw-text-muted);
  line-height: var(--leading-thai);
}

body.cw-r2 .footer-contact p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-2);
  color: var(--cw-text-muted);
}

body.cw-r2 .footer-bottom {
  border-top: var(--border-default);
  padding: var(--space-5) 0;
}

body.cw-r2 .footer-bottom .bottom-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--cw-text-subtle);
}

/* Sticky mobile CTA */
.cw-mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: var(--space-3) var(--space-4);
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  background: rgba(18, 20, 22, 0.96);
  border-top: var(--border-default);
  backdrop-filter: blur(12px);
  gap: var(--space-2);
  grid-template-columns: 1fr 1fr 1fr;
}

.cw-mobile-sticky-cta a,
.cw-mobile-sticky-cta button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.cw-mobile-sticky-cta .sticky-primary {
  background: var(--cw-copper);
  color: var(--cw-text);
}

.cw-mobile-sticky-cta .sticky-line {
  background: #06C755;
  color: #fff;
}

.cw-mobile-sticky-cta .sticky-call {
  background: transparent;
  border: 1px solid var(--cw-border-strong);
  color: var(--cw-text);
}

body.cw-r2 .contact-widget-container {
  bottom: calc(var(--space-16) + env(safe-area-inset-bottom, 0px));
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1280px) {
  body.cw-r2 .product-grid,
  body.cw-r2 #product-grid-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .cw-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cw-benefits-grid,
  .cw-process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .cw-inspire-banner {
    grid-template-columns: 1fr;
  }
  body.cw-r2 .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body.cw-r2 {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  body.cw-r2 .header-row-nav {
    display: none;
  }
  body.cw-r2 .header-row-utility .header-row-inner {
    grid-template-columns: auto 1fr auto auto;
    min-height: 56px;
    gap: var(--space-3);
  }
  body.cw-r2 .logo-attribution {
    display: none;
  }
  body.cw-r2 .site-header .search-wrapper {
    display: none;
  }
  body.cw-r2 .header-action-item .action-label {
    display: none;
  }
  body.cw-r2 .product-grid,
  body.cw-r2 #product-grid-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  body.cw-r2 .reviews-grid {
    grid-template-columns: 1fr;
  }
  body.cw-r2 .cw-hero {
    min-height: 82vh;
    max-height: 88vh;
    border-radius: var(--radius-lg);
  }
  body.cw-r2 .cw-hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  body.cw-r2 .cw-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.cw-r2 .cw-hero-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  body.cw-r2 .cw-hero-content {
    padding: var(--space-8) var(--space-5);
    padding-bottom: var(--space-10);
  }
  .cw-mobile-sticky-cta {
    display: grid;
  }
  body.cw-r2 .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  body.cw-r2 .cw-header-cta {
    font-size: var(--text-sm);
    padding: 0 var(--space-3);
    min-height: 40px;
  }
  body.cw-r2 .cw-trust-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  body.cw-r2 .product-grid,
  body.cw-r2 #product-grid-list {
    grid-template-columns: 1fr;
  }
  .cw-category-grid,
  .cw-benefits-grid,
  .cw-process-steps {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1440px) {
  body.cw-r2 .product-grid,
  body.cw-r2 #product-grid-list,
  body.cw-r2 #product-grid-main {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── COMMAND 3100-002: secondary catalog + modal + product polish ── */
body.cw-r2 {
  overflow-x: hidden;
  max-width: 100vw;
}

body.cw-r2 .product-grid,
body.cw-r2 #product-grid-list,
body.cw-r2 #product-grid-main {
  width: 100%;
  max-width: 100%;
}

body.cw-r2 #product-grid-main .product-card,
body.cw-r2 #product-grid-main .cw-r2-card {
  background: var(--color-surface-elevated, var(--cw-charcoal));
  border: 1px solid var(--color-border, var(--cw-border));
  border-radius: var(--radius-lg);
  overflow: hidden;
}

body.cw-r2 .p-image-wrapper,
body.cw-r2 .cw-cover-wrap {
  background:
    linear-gradient(145deg, rgba(184, 115, 51, 0.12), transparent 55%),
    var(--color-surface, var(--cw-graphite));
  aspect-ratio: var(--product-cover-ratio, 4 / 5);
}

body.cw-r2 .p-image,
body.cw-r2 .cw-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.cw-r2 .cw-img-fallback,
body.cw-r2 img.cw-cover-img[src*="cat_furniture"],
body.cw-r2 .p-image-wrapper:has(img[src*="cat_furniture"]) {
  background:
    linear-gradient(160deg, rgba(184, 115, 51, 0.18), rgba(26, 29, 33, 0.95)),
    var(--cw-charcoal);
}

body.cw-r2 .p-title,
body.cw-r2 .cw-card-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Quote / auth modals on R2 pages */
body.cw-r2 .modal-overlay {
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  align-items: center;
  overflow-y: auto;
}

body.cw-r2 .modal-container {
  width: min(100%, 650px);
  max-height: min(92vh, calc(100vh - 1.5rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

body.cw-r2 .modal-container .form-row {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

body.cw-r2 .modal-container input,
body.cw-r2 .modal-container select,
body.cw-r2 .modal-container textarea {
  max-width: 100%;
  min-height: var(--control-height, 44px);
}

@media (max-width: 768px) {
  body.cw-r2 .product-grid,
  body.cw-r2 #product-grid-list,
  body.cw-r2 #product-grid-main {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* Keep quote badge inside viewport (was right:-10px) */
  body.cw-r2 .cart-badge {
    right: 0 !important;
    top: -6px !important;
  }
  body.cw-r2 .header-actions,
  body.cw-r2 .cart-container {
    margin-right: 2px;
  }

  body.cw-r2 .category-hero {
    padding: 2rem 1.25rem !important;
    margin-left: 0;
    margin-right: 0;
    border-radius: var(--radius-lg);
  }

  body.cw-r2 .category-hero h1 {
    font-size: 1.6rem !important;
  }

  body.cw-r2 .modal-container .form-row,
  body.cw-r2 #quote-section .form-row,
  body.cw-r2 .consultation-form .form-row {
    grid-template-columns: 1fr !important;
  }

  body.cw-r2 #quote-section,
  body.cw-r2 #quote-section .container,
  body.cw-r2 .consultation-form {
    max-width: 100%;
    box-sizing: border-box;
  }

  body.cw-r2 #quote-section .form-group,
  body.cw-r2 #quote-section input,
  body.cw-r2 #quote-section select,
  body.cw-r2 #quote-section textarea {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  body.cw-r2 .product-grid,
  body.cw-r2 #product-grid-list,
  body.cw-r2 #product-grid-main {
    grid-template-columns: 1fr;
  }

  body.cw-r2 .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  body.cw-r2 .modal-container {
    max-width: 100%;
    max-height: min(92vh, 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  body.cw-r2 .modal-close {
    top: 0.85rem;
    right: 0.85rem;
  }
}

/* ═══ Visual Hook Batch 1 — header / trust / icons ═══ */
body.cw-r2 .cw-header-simplified .cw-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-r2-height);
  grid-template-columns: none;
}
body.cw-r2 .cw-header-simplified .logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: var(--text-lg);
  color: var(--cw-warm-white);
}
body.cw-r2 .cw-header-simplified .logo-text .accent {
  color: inherit;
}
body.cw-r2 .cw-header-simplified .logo-attribution {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cw-text-muted);
}
body.cw-r2 .cw-marketplace-utility {
  display: none !important;
}
body.cw-r2 .cw-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
body.cw-r2 .cw-header-cta {
  white-space: nowrap;
  min-height: 44px;
}
body.cw-r2 .cw-mobile-nav-cta {
  padding: var(--space-4) var(--space-4) var(--space-2);
}
body.cw-r2 .mobile-nav-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
body.cw-r2 .cw-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  border-top: 1px solid var(--cw-section-border);
  border-bottom: 1px solid var(--cw-section-border);
  padding: var(--space-6) 0;
}
body.cw-r2 .cw-trust-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
body.cw-r2 .cw-trust-item p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--cw-text);
  line-height: var(--leading-thai);
}
body.cw-r2 .cw-trust-line,
body.cw-r2 .cw-line-icon {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--cw-copper);
  opacity: 0.85;
}
body.cw-r2 .cw-benefit-card .cw-line-icon {
  margin-bottom: var(--space-3);
}
body.cw-r2 .cw-mto-intro .cw-r2-section-head {
  max-width: 640px;
}
body.cw-r2,
body.cw-r2 .main-container {
  overflow-x: clip;
}
@media (max-width: 900px) {
  body.cw-r2 .cw-trust-strip {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══ Homepage Conversion Sections Batch 2 (3100-037) ═══ */
body.cw-r2 .cw-surface-elevated {
  background: rgba(36, 40, 46, 0.55);
  border: 1px solid var(--cw-section-border);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
}
body.cw-r2 .cw-section-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
body.cw-r2 .cw-featured-grid .cw-cover-wrap {
  aspect-ratio: var(--product-cover-ratio);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--cw-matte-black);
}
body.cw-r2 .cw-featured-grid .cw-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.cw-r2 .cw-custom-made-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-10);
  align-items: start;
}
body.cw-r2 .cw-custom-made-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
  margin: var(--space-3) 0 var(--space-4);
}
body.cw-r2 .cw-custom-made-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}
body.cw-r2 .cw-custom-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-4);
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-lg);
  background: rgba(18, 20, 22, 0.35);
}
body.cw-r2 .cw-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--cw-copper);
  color: var(--cw-copper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
}
body.cw-r2 .cw-custom-step h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
}
body.cw-r2 .cw-custom-step p {
  margin: 0;
  color: var(--cw-text-muted);
  font-size: var(--text-sm);
}
body.cw-r2 .cw-why-grid {
  grid-template-columns: repeat(2, 1fr);
}
body.cw-r2 .cw-work-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
body.cw-r2 .cw-work-tile {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cw-charcoal);
  transition: border-color var(--transition-normal);
}
body.cw-r2 .cw-work-tile:hover,
body.cw-r2 .cw-work-tile:focus-visible {
  border-color: rgba(184, 115, 51, 0.55);
  outline: none;
}
body.cw-r2 .cw-work-tile-visual {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: var(--cw-matte-black);
}
body.cw-r2 .cw-work-tile h3 {
  margin: 0;
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
}
body.cw-r2 .cw-process-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
body.cw-r2 .cw-process-timeline .cw-process-step {
  border-top: 2px solid rgba(184, 115, 51, 0.45);
  padding-top: var(--space-4);
}
body.cw-r2 .cw-cta-closer {
  background: linear-gradient(180deg, rgba(18, 20, 22, 0.2), rgba(18, 20, 22, 0.85));
  border: 1px solid var(--cw-section-border);
  border-radius: var(--radius-xl);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  margin-bottom: var(--section-gap);
}
body.cw-r2 .cw-cta-closer-inner {
  max-width: 720px;
  margin: 0 auto;
}
body.cw-r2 .cw-cta-closer h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  line-height: 1.3;
  margin-bottom: var(--space-4);
}
body.cw-r2 .cw-cta-closer p {
  color: var(--cw-text-muted);
  margin-bottom: var(--space-8);
}
body.cw-r2 .cw-cta-secondary-link {
  margin-top: var(--space-5);
  margin-bottom: 0;
}
body.cw-r2 .cw-cta-secondary-link a {
  color: var(--cw-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.cw-r2 .cw-cta-secondary-link a:hover {
  color: var(--cw-copper);
}
body.cw-r2 .cw-utility-section {
  opacity: 0.92;
  margin-bottom: var(--section-gap);
}
body.cw-r2 .footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cw-warm-white);
  margin-bottom: var(--space-3);
}

@media (max-width: 900px) {
  body.cw-r2 .cw-custom-made-grid {
    grid-template-columns: 1fr;
  }
  body.cw-r2 .cw-why-grid,
  body.cw-r2 .cw-work-tiles {
    grid-template-columns: 1fr 1fr;
  }
  body.cw-r2 .cw-process-timeline {
    grid-template-columns: 1fr;
  }
  body.cw-r2 .cw-process-timeline .cw-process-step {
    border-top: none;
    border-left: 2px solid rgba(184, 115, 51, 0.45);
    padding-left: var(--space-4);
    padding-top: 0;
  }
  body.cw-r2 .cw-surface-elevated {
    padding: var(--space-8) var(--space-5);
  }
}

@media (max-width: 480px) {
  body.cw-r2 .cw-why-grid,
  body.cw-r2 .cw-work-tiles {
    grid-template-columns: 1fr;
  }
  body.cw-r2 .cw-cta-closer .btn {
    width: 100%;
  }
}

/* ═══ COMMAND 3100-038 — Product Listing Visual Redesign ═══ */
body.cw-r2.cw-listing-page {
  overflow-x: hidden;
  max-width: 100vw;
}

body.cw-r2 .cw-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.cw-r2 .cw-listing-intro {
  padding: var(--space-10, 3rem) 0 var(--space-6);
  border-bottom: 1px solid var(--cw-border, rgba(255, 255, 255, 0.08));
}

body.cw-r2 .cw-listing-eyebrow {
  margin: 0 0 var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cw-copper, #B87333);
}

body.cw-r2 .cw-listing-h1 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--cw-warm-white, #F5F0E8);
  letter-spacing: 0.02em;
}

body.cw-r2 .cw-listing-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted, #A8A29E);
}

body.cw-r2 .cw-listing-discovery {
  padding: var(--space-6) 0 var(--space-4);
}

body.cw-r2 .cw-discovery-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

body.cw-r2 .cw-discovery-search {
  width: 100%;
}

body.cw-r2 .cw-discovery-input,
body.cw-r2 .cw-discovery-select {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  box-sizing: border-box;
  background: var(--cw-charcoal, #1A1D21);
  border: 1px solid var(--cw-border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-md, 8px);
  color: var(--cw-warm-white, #F5F0E8);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
}

body.cw-r2 .cw-discovery-input:focus,
body.cw-r2 .cw-discovery-select:focus,
body.cw-r2 .cw-focus-ring:focus {
  outline: 2px solid var(--cw-copper, #B87333);
  outline-offset: 2px;
}

body.cw-r2 .cw-discovery-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

body.cw-r2 .cw-discovery-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

body.cw-r2 .cw-discovery-field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted, #A8A29E);
}

body.cw-r2 .cw-listing-result-count {
  margin: var(--space-4) 0 0;
  font-size: 0.9rem;
  color: var(--text-muted, #A8A29E);
}

body.cw-r2.cw-listing-page #product-grid-main.cw-listing-grid,
body.cw-r2.cw-listing-page #product-grid-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  width: 100%;
  max-width: 100%;
  margin-bottom: var(--section-gap, 3rem);
}

body.cw-r2 .cw-listing-card {
  min-width: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.cw-r2 .cw-listing-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

body.cw-r2 .cw-listing-cover {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

body.cw-r2 .cw-listing-card .cw-cover-img {
  transition: transform 0.25s ease;
}

@media (hover: hover) {
  body.cw-r2 .cw-listing-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
  body.cw-r2 .cw-listing-card:hover .cw-cover-img {
    transform: scale(1.03);
  }
}

body.cw-r2 .cw-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #A8A29E);
}

body.cw-r2 .cw-card-title-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  min-height: 2.7em;
}

body.cw-r2 .cw-sale-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid transparent;
}

body.cw-r2 .cw-sale-fixed {
  color: var(--text-muted, #A8A29E);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

body.cw-r2 .cw-sale-quote {
  color: var(--cw-copper, #B87333);
  background: rgba(184, 115, 51, 0.12);
  border-color: rgba(184, 115, 51, 0.35);
}

body.cw-r2 .cw-sale-mto {
  color: var(--cw-copper, #B87333);
  background: transparent;
  border-color: rgba(184, 115, 51, 0.55);
}

body.cw-r2 .cw-card-price-numeric {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cw-warm-white, #F5F0E8);
  font-family: var(--font-heading);
}

body.cw-r2 .cw-listing-card .cw-card-actions {
  margin-top: auto;
  padding-top: var(--space-3);
}

body.cw-r2 .cw-listing-card .card-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  pointer-events: none;
}

body.cw-r2 .cw-listing-empty {
  grid-column: 1 / -1;
}

@media (max-width: 1199px) {
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.cw-r2 .cw-discovery-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
  body.cw-r2 .cw-listing-intro {
    padding-top: var(--space-8);
  }
}

@media (max-width: 380px) {
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: 1fr;
  }
}

/* ═══ COMMAND 3100-043 — Public Catalog Polish ═══ */
body.cw-r2 {
  overflow-x: clip;
  max-width: 100%;
}

body.cw-r2 .cw-featured-section .cw-r2-section-head p,
body.cw-r2 .cw-listing-lead {
  max-width: 42rem;
  overflow-wrap: anywhere;
}

body.cw-r2 .cw-featured-grid,
body.cw-r2 #product-grid-list.cw-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}

body.cw-r2 .cw-catalog-card,
body.cw-r2 .cw-home-card,
body.cw-r2 .cw-listing-card {
  min-width: 0;
  max-width: 100%;
  background: var(--cw-charcoal);
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

body.cw-r2 .cw-catalog-card:hover,
body.cw-r2 .cw-catalog-card:focus-within {
  border-color: rgba(184, 115, 51, 0.35);
  box-shadow: var(--shadow-card-hover);
}

body.cw-r2 .cw-listing-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

body.cw-r2 .cw-catalog-card .cw-cover-wrap,
body.cw-r2 .cw-catalog-card .cw-listing-cover {
  aspect-ratio: var(--product-cover-ratio, 4 / 5);
  width: 100%;
  overflow: hidden;
  background: var(--cw-graphite);
}

body.cw-r2 .cw-catalog-card .cw-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

body.cw-r2 .cw-catalog-card .cw-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.15rem;
  flex: 1;
  min-width: 0;
}

body.cw-r2 .cw-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cw-text-muted);
}

body.cw-r2 .cw-card-title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 650;
  color: var(--cw-warm-white, #F5F0E8);
  margin: 0;
  overflow-wrap: anywhere;
}

body.cw-r2 .cw-card-price-numeric {
  margin-top: auto;
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--cw-warm-white, #F5F0E8);
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

body.cw-r2 .cw-card-price-quote {
  margin-top: auto;
  font-size: 1rem;
  font-weight: 650;
  color: var(--cw-copper);
}

body.cw-r2 .cw-sale-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(184, 115, 51, 0.4);
  color: var(--cw-copper);
  background: rgba(184, 115, 51, 0.1);
}

/* No marketplace clutter */
body.cw-r2 .p-sold,
body.cw-r2 .product-card .p-sold,
body.cw-r2 .sf-badge-featured,
body.cw-r2 .p-badge,
body.cw-r2 .cw-cover-badge {
  display: none !important;
}

body.cw-r2 .cw-card-actions {
  margin-top: 0.35rem;
}

body.cw-r2 .cw-card-cta,
body.cw-r2 .card-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  pointer-events: none; /* parent <a> handles click */
}

body.cw-r2 .cw-discovery-select.is-filtered,
body.cw-r2 .cw-discovery-input:not(:placeholder-shown) {
  border-color: rgba(184, 115, 51, 0.55);
  box-shadow: 0 0 0 1px rgba(184, 115, 51, 0.2);
}

/* Detail gallery polish */
body.cw-product-detail .pd-main-img-wrap {
  aspect-ratio: 4 / 5;
  max-height: min(72vh, 720px);
  background:
    linear-gradient(180deg, rgba(18, 20, 22, 0.15), rgba(18, 20, 22, 0.35)),
    var(--cw-graphite, #1A1D21);
}

body.cw-product-detail .pd-main-img {
  object-fit: cover;
  object-position: center;
}

body.cw-product-detail .pd-cta-btn,
body.cw-product-detail .pd-sticky-btn {
  background: var(--cw-copper);
  color: var(--cw-warm-white);
  border: none;
  font-weight: 700;
  min-height: 48px;
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
}

body.cw-product-detail .pd-price {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.cw-product-detail .pd-title {
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  body.cw-r2 .cw-featured-grid,
  body.cw-r2 #product-grid-list.cw-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

@media (max-width: 768px) {
  body.cw-r2 .cw-featured-grid,
  body.cw-r2 #product-grid-list.cw-featured-grid,
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }
  body.cw-r2 .cw-catalog-card .cw-card-body {
    padding: 0.85rem 0.9rem 1rem;
  }
  body.cw-r2 .cw-card-title-clamp {
    font-size: 0.95rem;
  }
  body.cw-r2 .cw-card-price-numeric {
    font-size: 1.1rem;
  }
}

@media (max-width: 430px) {
  body.cw-r2 .main-container,
  body.cw-r2 .cw-r2-section {
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
    box-sizing: border-box;
  }
  body.cw-r2 .cw-featured-grid,
  body.cw-r2 #product-grid-list.cw-featured-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  body.cw-r2 .cw-card-cta,
  body.cw-r2 .card-detail-btn {
    min-height: 40px;
    font-size: 0.82rem;
  }
}

@media (max-width: 390px) {
  body.cw-r2 .cw-card-title-clamp {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }
  body.cw-product-detail .pd-wrap {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }
}

@media (max-width: 360px) {
  body.cw-r2 .cw-featured-grid,
  body.cw-r2 #product-grid-list.cw-featured-grid,
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: 1fr;
  }
  body.cw-r2 .cw-card-price-numeric,
  body.cw-r2 .cw-card-price-quote {
    font-size: 1.05rem;
  }
}

@media (min-width: 1440px) {
  body.cw-r2 .cw-featured-grid,
  body.cw-r2 #product-grid-list.cw-featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }
  body.cw-r2.cw-listing-page #product-grid-main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* ═══ COMMAND 3100-047 — Public Configurator ═══ */
body.cw-r2 .cw-sale-custom {
  border-color: rgba(184, 115, 51, 0.55);
  color: var(--cw-copper);
}
body.pcf-open {
  overflow-x: clip;
}
.pcf-root {
  border: 1px solid var(--cw-border, rgba(255,255,255,0.12));
  border-radius: var(--radius-lg, 14px);
  background: var(--cw-charcoal, #121417);
  padding: 1rem 1rem 1.25rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.pcf-root[hidden] { display: none !important; }
.pcf-head { position: relative; margin-bottom: 1rem; padding-right: 3rem; }
.pcf-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  color: var(--cw-warm-white, #F5F0E8);
}
.pcf-lead { margin: 0; color: var(--cw-text-muted, #A8A29E); font-size: 0.9rem; line-height: 1.45; }
.pcf-close {
  position: absolute; top: 0; right: 0;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent; color: var(--cw-warm-white, #F5F0E8);
  min-width: 44px; min-height: 40px; border-radius: 8px; cursor: pointer;
}
.pcf-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  min-width: 0;
}
@media (min-width: 900px) {
  .pcf-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr); align-items: start; }
}
.pcf-step {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.85rem 0.9rem 1rem;
  margin: 0 0 0.85rem;
  min-width: 0;
}
.pcf-step legend {
  padding: 0 0.35rem;
  font-weight: 650;
  color: var(--cw-warm-white, #F5F0E8);
}
.pcf-dims {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 520px) {
  .pcf-dims { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pcf-form label,
.pcf-field {
  display: block;
  margin: 0.55rem 0;
  color: var(--cw-text-muted, #A8A29E);
  font-size: 0.82rem;
}
.pcf-form input[type="number"],
.pcf-form input[type="text"],
.pcf-form select,
.pcf-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  box-sizing: border-box;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #1A1D21;
  color: var(--cw-warm-white, #F5F0E8);
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
}
.pcf-form textarea { min-height: 88px; resize: vertical; }
.pcf-form input:focus-visible,
.pcf-form select:focus-visible,
.pcf-form textarea:focus-visible,
.pcf-opt input:focus-visible,
.pcf-btn:focus-visible,
.pcf-close:focus-visible {
  outline: 2px solid var(--cw-copper, #B87333);
  outline-offset: 2px;
}
.pcf-label { display: block; margin-bottom: 0.35rem; font-weight: 600; color: #D6D3D1; }
.pcf-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pcf-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  color: var(--cw-warm-white, #F5F0E8);
  font-size: 0.86rem;
  min-height: 40px;
}
.pcf-opt:has(input:checked) {
  border-color: rgba(184, 115, 51, 0.65);
  background: rgba(184, 115, 51, 0.12);
}
.pcf-layer-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.pcf-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}
.pcf-btn-primary {
  background: var(--cw-copper, #B87333);
  color: var(--cw-warm-white, #F5F0E8);
}
.pcf-btn:disabled { opacity: 0.65; cursor: wait; }
.pcf-status {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--cw-text-muted, #A8A29E);
  overflow-wrap: anywhere;
}
.pcf-status.is-error { color: #f87171; }
.pcf-summary {
  position: sticky;
  top: 0.75rem;
  min-width: 0;
}
.pcf-result {
  border: 1px solid rgba(184, 115, 51, 0.35);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(184, 115, 51, 0.08);
  margin-bottom: 0.85rem;
}
.pcf-result-label {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cw-copper, #B87333);
}
.pcf-result-price {
  margin: 0.35rem 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 750;
  color: var(--cw-warm-white, #F5F0E8);
  overflow-wrap: anywhere;
}
.pcf-disclaimer {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--cw-text-muted, #A8A29E);
  line-height: 1.4;
}
.pcf-result-meta {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
}
.pcf-result-meta div { display: flex; justify-content: space-between; gap: 0.75rem; }
.pcf-result-meta dt { color: var(--cw-text-muted, #A8A29E); }
.pcf-result-meta dd { margin: 0; color: var(--cw-warm-white, #F5F0E8); text-align: right; overflow-wrap: anywhere; }
.pcf-success {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  border-radius: 12px;
  padding: 1rem;
  color: var(--cw-warm-white, #F5F0E8);
}
.pcf-success-msg { margin: 0 0 0.5rem; line-height: 1.5; white-space: pre-line; }
.pcf-ref { margin: 0; font-size: 0.9rem; color: #D6D3D1; }
@media (max-width: 768px) {
  .pcf-summary { position: static; }
}
@media (max-width: 430px) {
  .pcf-root { padding: 0.85rem; }
  .pcf-opt { width: 100%; }
}
@media (max-width: 390px) {
  .pcf-title { font-size: 1.1rem; }
}
@media (max-width: 360px) {
  .pcf-dims { grid-template-columns: 1fr; }
}
