/*
 * Klor Cotizador — Frontend stylesheet
 * Extraído de cotizador-banco-escalera.html (mockup más actualizado).
 * Header KLOR removido: el header/footer los provee WoodMart.
 * Las 6 variantes de pool-shape se aplican con la clase shape-* en #klor-cotizador-app.
 */

:root {
  --primary: #1190E8;
  --primary-dark: #0F6FB0;
  --primary-darker: #143960;
  --primary-light: #DCEAF9;
  --primary-lighter: #EEF5FC;
  --accent: #FF8B3D;
  --accent-dark: #E5732A;
  --success: #22C55E;
  --success-light: #DCFCE7;
  --text: #143960;
  --text-secondary: #4A6280;
  --text-muted: #8898AE;
  --bg: #FAFCFE;
  --white: #FFFFFF;
  --border: #D2DFEC;
  --border-light: #EAF0F6;
  --shadow-sm: 0 2px 6px rgba(15, 111, 176, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 111, 176, 0.10);
  --shadow-lg: 0 16px 40px rgba(15, 111, 176, 0.14);
  --shadow-xl: 0 30px 80px rgba(20, 57, 96, 0.28);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scope everything to the cotizador wrapper to avoid bleeding into WoodMart */
#klor-cotizador-app * { box-sizing: border-box; }
#klor-cotizador-app {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  /* The gradient lives on body.klor-cotizador-active so it covers the full viewport */
  /* and is not clipped by the theme's content container width. */
}
@media (min-width: 768px) {
  #klor-cotizador-app { padding: 24px 24px 48px; }
}

/* Full-viewport gradient applied to body when the cotizador renders. */
body.klor-cotizador-active {
  background:
    linear-gradient(135deg, var(--primary-light) 0%, var(--bg) 50%, #FFF8F1 100%) !important;
  background-attachment: fixed !important;
}
/* Some themes wrap content in containers with their own background — neutralize them
 * so the body gradient shows through on the cotizador pages. */
body.klor-cotizador-active .site-content,
body.klor-cotizador-active .content-area,
body.klor-cotizador-active .main-page-wrapper,
body.klor-cotizador-active .site-main,
body.klor-cotizador-active main#main {
  background: transparent !important;
}

/* WoodMart shows a "page title" banner above the content by default (the blue strip with
 * "Blog" / page name). Hide it on cotizador pages — the wizard provides its own header. */
body.klor-cotizador-active .page-title,
body.klor-cotizador-active .title-size-default,
body.klor-cotizador-active .page-title-default,
body.klor-cotizador-active .title-design-default,
body.klor-cotizador-active .woodmart-page-title,
body.klor-cotizador-active .wd-page-title,
body.klor-cotizador-active .wd-title-banner,
body.klor-cotizador-active .title-design-centered,
body.klor-cotizador-active .title-design-shop-categories,
body.klor-cotizador-active .breadcrumbs {
  display: none !important;
}

/* ============ MATERIAL SYMBOLS BASE ============ */
#klor-cotizador-app .material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
#klor-cotizador-app .material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ============ PRODUCT HERO ============ */
#klor-cotizador-app .product-hero {
  margin-bottom: 28px;
  animation: fadeSlideIn 0.5s ease;
}
#klor-cotizador-app .product-hero.hidden { display: none; }
#klor-cotizador-app .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
#klor-cotizador-app .breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
#klor-cotizador-app .breadcrumb a:hover { color: var(--primary); }
#klor-cotizador-app .breadcrumb .sep { color: var(--text-muted); font-size: 14px; line-height: 1; }
#klor-cotizador-app .breadcrumb .current { color: var(--text); font-weight: 600; }

/* ============ CONFIG LAYOUT ============ */
/* !important defends against theme rules (WoodMart) that may try to override display on asides/sections. */
#klor-cotizador-app .config-wrapper { display: none !important; }
#klor-cotizador-app .config-wrapper.active { display: block !important; }

#klor-cotizador-app .config-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 900px) {
  #klor-cotizador-app .config-layout {
    grid-template-columns: 5fr 7fr;
    gap: 40px;
  }
}

/* ============ GALLERY ============ */
#klor-cotizador-app .gallery-col {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  #klor-cotizador-app .gallery-col {
    position: sticky;
    top: 24px;
    padding: 20px;
  }
}
#klor-cotizador-app .product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}
#klor-cotizador-app .product-badge .material-symbols-rounded { font-size: 14px; }
#klor-cotizador-app .gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #F4FBFD 0%, #E8F7FC 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}
#klor-cotizador-app .gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}
#klor-cotizador-app .gallery-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: white;
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  transition: var(--transition);
}
#klor-cotizador-app .gallery-zoom .material-symbols-rounded { font-size: 18px; }
#klor-cotizador-app .gallery-zoom:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}
#klor-cotizador-app .gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
#klor-cotizador-app .thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--primary-lighter);
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
#klor-cotizador-app .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#klor-cotizador-app .thumb:hover { border-color: var(--primary); }
#klor-cotizador-app .thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 144, 232, 0.18);
}
#klor-cotizador-app .product-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
}
#klor-cotizador-app .product-meta strong.product-title {
  color: var(--text);
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  font-weight: 700;
}
#klor-cotizador-app .product-description-short {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
}
#klor-cotizador-app .product-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
#klor-cotizador-app .product-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  list-style: none;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 0;
  transition: color 0.2s;
}
#klor-cotizador-app .product-details summary:hover { color: var(--primary-darker); }
#klor-cotizador-app .product-details summary::-webkit-details-marker { display: none; }
#klor-cotizador-app .product-details summary::marker { content: ''; }
#klor-cotizador-app .product-details summary .material-symbols-rounded {
  font-size: 18px;
  transition: transform 0.3s ease;
}
#klor-cotizador-app .product-details[open] summary .material-symbols-rounded {
  transform: rotate(180deg);
}
#klor-cotizador-app .details-content {
  margin-top: 14px;
  animation: detailsFadeIn 0.4s ease;
}
@keyframes detailsFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
#klor-cotizador-app .details-section { margin-bottom: 16px; }
#klor-cotizador-app .details-section:last-child { margin-bottom: 0; }
#klor-cotizador-app .details-section h5 {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-darker);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#klor-cotizador-app .details-section h5 .material-symbols-rounded {
  font-size: 14px;
  color: var(--primary);
}
#klor-cotizador-app .details-section p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}
#klor-cotizador-app .details-section p + p { margin-top: 6px; }
#klor-cotizador-app .details-section ul { list-style: none; padding: 0; margin: 0; }
#klor-cotizador-app .details-section li {
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 5px 0 5px 22px;
  position: relative;
  line-height: 1.4;
}
#klor-cotizador-app .details-section li::before {
  content: 'check';
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 1, 'wght' 700;
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 14px;
  color: var(--success);
}
#klor-cotizador-app .product-meta .brand-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
}
#klor-cotizador-app .product-meta .brand-line span:last-child {
  color: var(--primary-dark);
  font-weight: 700;
}

#klor-cotizador-app .steps-col { min-width: 0; }

/* PRODUCT INFO inside steps-col */
#klor-cotizador-app .product-info { margin-bottom: 18px; }
#klor-cotizador-app .product-info h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-darker);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  line-height: 1.15;
}
@media (min-width: 768px) {
  #klor-cotizador-app .product-info h1 { font-size: 30px; }
}
#klor-cotizador-app .product-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============ PROGRESS BAR ============ */
#klor-cotizador-app .progress-wrap {
  margin-bottom: 24px;
  background: white;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
#klor-cotizador-app .progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
#klor-cotizador-app .progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
#klor-cotizador-app .progress-text strong {
  color: var(--primary-dark);
  font-weight: 700;
}
#klor-cotizador-app .progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
#klor-cotizador-app .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 12.5%;
}
#klor-cotizador-app .progress-dots {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
#klor-cotizador-app .dot {
  flex: 1;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: not-allowed;
  transition: var(--transition);
  border: 2px solid transparent;
}
#klor-cotizador-app .dot.completed {
  background: var(--primary-light);
  color: var(--primary-dark);
  cursor: pointer;
}
#klor-cotizador-app .dot.completed:hover {
  background: var(--primary);
  color: white;
}
#klor-cotizador-app .dot.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(17, 144, 232, 0.35);
  border-color: white;
}

/* ============ SCREENS ============ */
#klor-cotizador-app .screen {
  display: none;
  animation: fadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#klor-cotizador-app .screen.active {
  display: flex;
  flex-direction: column;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

#klor-cotizador-app .screen.step-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
#klor-cotizador-app .screen.active.step-card {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  #klor-cotizador-app .screen.step-card { padding: 32px; }
}

/* ============ STEP TITLE ============ */
#klor-cotizador-app .step-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}
#klor-cotizador-app .step-title h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-darker);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
@media (min-width: 768px) {
  #klor-cotizador-app .step-title h2 { font-size: 28px; }
}
#klor-cotizador-app .step-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 24px;
}

/* ============ OPTIONS GRID ============ */
#klor-cotizador-app .options {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}
#klor-cotizador-app .options.mobile-2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 500px) {
  #klor-cotizador-app .options.cols-2 { grid-template-columns: repeat(2, 1fr); }
  #klor-cotizador-app .options.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  #klor-cotizador-app .options.cols-5 { grid-template-columns: repeat(5, 1fr); }
}

#klor-cotizador-app .option {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}
#klor-cotizador-app .option:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
#klor-cotizador-app .option.selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-light) 0%, white 100%);
  box-shadow: var(--shadow-md);
}
#klor-cotizador-app .option.selected::after {
  content: 'check';
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 1, 'wght' 700;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
#klor-cotizador-app .option-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  transition: var(--transition);
}
#klor-cotizador-app .option-icon .material-symbols-rounded {
  font-size: 30px;
  font-variation-settings: 'FILL' 0, 'wght' 500;
}
#klor-cotizador-app .option:hover .option-icon {
  background: var(--primary);
  color: white;
}
#klor-cotizador-app .option.selected .option-icon {
  background: var(--primary);
  color: white;
}
#klor-cotizador-app .option-image {
  width: 100%;
  max-width: 110px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
#klor-cotizador-app .option-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  transition: transform 0.4s ease;
}
#klor-cotizador-app .option:hover .option-image { border-color: var(--primary); }
#klor-cotizador-app .option:hover .option-image img { transform: scale(1.06); }
#klor-cotizador-app .option.selected .option-image {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
#klor-cotizador-app .option-swatch {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 4px;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#klor-cotizador-app .option-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
#klor-cotizador-app .option-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Preset swatches (kept as fallback; importer overrides via inline style) */
#klor-cotizador-app .swatch-celeste { background: linear-gradient(135deg, #7DD3FC 0%, #0EA5E9 100%); }
#klor-cotizador-app .swatch-blanco { background: linear-gradient(135deg, #FAFAFA 0%, #E5E7EB 100%); }
#klor-cotizador-app .swatch-rgb { background: conic-gradient(from 0deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF, #B983FF, #FF6B6B); }
#klor-cotizador-app .swatch-blanca { background: linear-gradient(135deg, #FFFAEC 0%, #FCE588 100%); }

/* ============ POOL SHAPES (paso 1) ============
 * Base styling shared by all variants. The wrapper #klor-cotizador-app gets a
 * shape-{slug} class set by the JS based on pileta.shape_style, and the
 * variant rule below provides the gradient + border-radius + aspect-ratio.
 */
#klor-cotizador-app .pool-shape {
  width: 100%;
  max-width: 80px;
  margin-bottom: 4px;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.1);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 6px;
  aspect-ratio: 16 / 9;
}
#klor-cotizador-app .pool-shape.s1 { max-width: 48px; }
#klor-cotizador-app .pool-shape.s2 { max-width: 60px; }
#klor-cotizador-app .pool-shape.s3 { max-width: 72px; }
#klor-cotizador-app .pool-shape.s4 { max-width: 84px; }
#klor-cotizador-app .pool-shape.s5 { max-width: 96px; }

/* Variant: píldora ovalada (Banco y Escalera) */
#klor-cotizador-app.shape-pildora .pool-shape {
  aspect-ratio: 16 / 9;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}
#klor-cotizador-app.shape-pildora .pool-shape.s1 { max-width: 40px; }
#klor-cotizador-app.shape-pildora .pool-shape.s2 { max-width: 52px; }
#klor-cotizador-app.shape-pildora .pool-shape.s3 { max-width: 64px; }
#klor-cotizador-app.shape-pildora .pool-shape.s4 { max-width: 76px; }
#klor-cotizador-app.shape-pildora .pool-shape.s5 { max-width: 88px; }

/* Variant: forma D / arco romano */
#klor-cotizador-app.shape-d .pool-shape {
  aspect-ratio: 2 / 1;
  border-radius: 8px 999px 999px 8px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}
#klor-cotizador-app.shape-d .pool-shape.s1 { max-width: 56px; }
#klor-cotizador-app.shape-d .pool-shape.s2 { max-width: 68px; }
#klor-cotizador-app.shape-d .pool-shape.s3 { max-width: 80px; }
#klor-cotizador-app.shape-d .pool-shape.s4 { max-width: 92px; }

/* Variant: rectangular simple */
#klor-cotizador-app.shape-rect .pool-shape {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Variant: rectangular con solárium derecho (Recta Húmeda) */
#klor-cotizador-app.shape-rect-sol-d .pool-shape {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: linear-gradient(90deg,
    var(--primary-dark) 0%,
    var(--primary) 8%,
    var(--primary) 68%,
    #88CDEF 68%,
    #88CDEF 100%);
}
#klor-cotizador-app.shape-rect-sol-d .pool-shape.s1 { max-width: 56px; }
#klor-cotizador-app.shape-rect-sol-d .pool-shape.s2 { max-width: 68px; }
#klor-cotizador-app.shape-rect-sol-d .pool-shape.s3 { max-width: 80px; }
#klor-cotizador-app.shape-rect-sol-d .pool-shape.s4 { max-width: 92px; }

/* Variant: rectangular con solárium izquierdo grande (Solárium Húmedo) */
#klor-cotizador-app.shape-rect-sol-i .pool-shape {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: linear-gradient(90deg,
    #88CDEF 0%,
    #88CDEF 38%,
    var(--primary-dark) 38%,
    var(--primary) 100%);
}
#klor-cotizador-app.shape-rect-sol-i .pool-shape.s1 { max-width: 68px; }
#klor-cotizador-app.shape-rect-sol-i .pool-shape.s2 { max-width: 80px; }
#klor-cotizador-app.shape-rect-sol-i .pool-shape.s3 { max-width: 92px; }

/* Variant: rectangular doble banco */
#klor-cotizador-app.shape-rect-doble .pool-shape {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: linear-gradient(90deg,
    #88CDEF 0%,
    #88CDEF 22%,
    var(--primary) 22%,
    var(--primary-dark) 78%,
    #88CDEF 78%,
    #88CDEF 100%);
}
#klor-cotizador-app.shape-rect-doble .pool-shape.s1 { max-width: 64px; }
#klor-cotizador-app.shape-rect-doble .pool-shape.s2 { max-width: 76px; }

/* Bordes vereda (presets, opcional) */
#klor-cotizador-app .borde-europa, #klor-cotizador-app .borde-recto {
  width: 64px;
  height: 40px;
  margin-bottom: 4px;
}
#klor-cotizador-app .borde-europa {
  background: linear-gradient(180deg, #D6E8EE 0%, #B5D4DD 100%);
  border-radius: 999px;
  border: 4px solid #94B4BF;
}
#klor-cotizador-app .borde-recto {
  background: #D6E8EE;
  border: 4px solid #94B4BF;
  border-radius: 4px;
}

/* Yes/No icon variants (for filtrado=No, etc.) */
#klor-cotizador-app .yn-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
#klor-cotizador-app .yn-icon .material-symbols-rounded {
  font-size: 32px;
  font-variation-settings: 'FILL' 1, 'wght' 600;
}
#klor-cotizador-app .yn-yes { background: var(--success-light); color: var(--success); }
#klor-cotizador-app .yn-no { background: #FEE2E2; color: #EF4444; }

/* ============ AUTO-ADVANCE HINT ============ */
#klor-cotizador-app .advance-hint {
  position: relative;
  height: 0;
  overflow: visible;
  text-align: center;
  margin-bottom: 16px;
}
#klor-cotizador-app .advance-hint span.hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.32);
  opacity: 0;
  transform: translateY(-4px);
  transition: var(--transition);
  pointer-events: none;
}
#klor-cotizador-app .advance-hint.visible span.hint-pill {
  opacity: 1;
  transform: translateY(0);
}
#klor-cotizador-app .advance-hint .material-symbols-rounded { font-size: 14px; }

/* ============ NAVIGATION ============ */
#klor-cotizador-app .nav {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border-light);
}
#klor-cotizador-app .nav.no-border { border-top: none; padding-top: 0; }
#klor-cotizador-app .btn {
  padding: 14px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
#klor-cotizador-app .btn .material-symbols-rounded { font-size: 18px; }
#klor-cotizador-app .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#klor-cotizador-app .btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  flex: 1;
  box-shadow: 0 6px 16px rgba(255, 139, 61, 0.30);
}
#klor-cotizador-app .btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 139, 61, 0.42);
}
#klor-cotizador-app .btn-secondary {
  background: white;
  color: var(--primary-dark);
  border: 2px solid var(--border);
}
#klor-cotizador-app .btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
#klor-cotizador-app .btn-large {
  padding: 18px 36px;
  font-size: 17px;
}

#klor-cotizador-app .btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}
#klor-cotizador-app .btn-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: klor-spin 0.7s linear infinite;
  margin-left: 8px;
}
@keyframes klor-spin {
  to { transform: rotate(360deg); }
}

#klor-cotizador-app .form-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #FEE2E2;
  color: #B91C1C;
  border-radius: var(--radius-md);
  font-size: 13px;
  text-align: center;
  display: none;
}
#klor-cotizador-app .form-error.visible { display: block; }

/* ============ MODAL ============ */
#klor-cotizador-app .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 57, 96, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#klor-cotizador-app .modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
#klor-cotizador-app .modal-card {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#klor-cotizador-app .modal-overlay.visible .modal-card {
  transform: scale(1) translateY(0);
}
#klor-cotizador-app .modal-header {
  padding: 28px 28px 16px;
  text-align: center;
}
#klor-cotizador-app .modal-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #B6D3F0 100%);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(15, 111, 176, 0.18);
}
#klor-cotizador-app .modal-icon .material-symbols-rounded {
  font-size: 32px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}
#klor-cotizador-app .modal-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-darker);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
#klor-cotizador-app .modal-header p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}
#klor-cotizador-app .modal-summary {
  padding: 0 28px;
  margin-bottom: 24px;
}
#klor-cotizador-app .modal-summary-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#klor-cotizador-app .modal-summary-title .material-symbols-rounded {
  font-size: 14px;
  color: var(--primary-dark);
}
#klor-cotizador-app .modal-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  background: var(--primary-lighter);
  border-radius: var(--radius-md);
  padding: 16px;
}
#klor-cotizador-app .modal-summary-grid .item {
  font-size: 12px;
  line-height: 1.3;
}
#klor-cotizador-app .modal-summary-grid .item .lbl {
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
}
#klor-cotizador-app .modal-summary-grid .item .val {
  color: var(--text);
  font-weight: 700;
  display: block;
}
#klor-cotizador-app .modal-actions {
  padding: 0 28px 28px;
  display: flex;
  gap: 12px;
}
#klor-cotizador-app .modal-actions .btn { flex: 1; }
@media (max-width: 500px) {
  #klor-cotizador-app .modal-header { padding: 24px 20px 12px; }
  #klor-cotizador-app .modal-summary { padding: 0 20px; }
  #klor-cotizador-app .modal-actions { padding: 0 20px 20px; flex-direction: column-reverse; }
  #klor-cotizador-app .modal-actions .btn { width: 100%; }
}

/* ============ CONTACT SCREEN (9) ============ */
#klor-cotizador-app .contact-screen { width: 100%; }
#klor-cotizador-app .contact-header {
  text-align: center;
  margin-bottom: 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
#klor-cotizador-app .contact-header h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-darker);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
@media (min-width: 768px) {
  #klor-cotizador-app .contact-header h2 { font-size: 36px; }
}
#klor-cotizador-app .contact-header p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

#klor-cotizador-app .contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 900px) {
  #klor-cotizador-app .contact-layout {
    grid-template-columns: 4fr 6fr;
    gap: 32px;
  }
}

#klor-cotizador-app .contact-summary {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
@media (min-width: 900px) {
  #klor-cotizador-app .contact-summary {
    position: sticky;
    top: 24px;
    padding: 24px;
  }
}
#klor-cotizador-app .summary-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--success-light);
  color: #166534;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
}
#klor-cotizador-app .summary-status-icon {
  width: 26px;
  height: 26px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#klor-cotizador-app .summary-status-icon .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 700;
}
#klor-cotizador-app .mini-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
#klor-cotizador-app .mini-summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-darker);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
#klor-cotizador-app .mini-summary-hint {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#klor-cotizador-app .mini-summary-hint .material-symbols-rounded { font-size: 13px; }
#klor-cotizador-app .mini-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#klor-cotizador-app .mini-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin: 0 -12px;
  transition: var(--transition);
  position: relative;
}
#klor-cotizador-app .mini-summary-item:last-child { border-bottom: none; }
#klor-cotizador-app .mini-summary-item:hover { background: var(--primary-light); }
#klor-cotizador-app .mini-summary-item .label { color: var(--text-secondary); flex-shrink: 0; }
#klor-cotizador-app .mini-summary-item .value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}
#klor-cotizador-app .mini-summary-item .value {
  color: var(--text);
  font-weight: 600;
}
#klor-cotizador-app .mini-summary-item .edit-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
}
#klor-cotizador-app .mini-summary-item .edit-icon .material-symbols-rounded { font-size: 13px; }
#klor-cotizador-app .mini-summary-item:hover .edit-icon {
  opacity: 1;
  background: var(--primary);
  color: white;
}

#klor-cotizador-app .contact-form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 600px) {
  #klor-cotizador-app .contact-form-card { padding: 32px; }
}
#klor-cotizador-app .contact-form-card h3 {
  font-size: 20px;
  color: var(--primary-darker);
  margin-bottom: 8px;
  font-weight: 700;
}
#klor-cotizador-app .contact-form-card .desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============ FORM ============ */
#klor-cotizador-app .form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  #klor-cotizador-app .form-grid { grid-template-columns: repeat(2, 1fr); }
  #klor-cotizador-app .form-field-full { grid-column: 1 / -1; }
}
#klor-cotizador-app .form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#klor-cotizador-app .form-field label .req { color: var(--accent); }
#klor-cotizador-app .form-field label .material-symbols-rounded {
  font-size: 16px;
  color: var(--primary-dark);
}
#klor-cotizador-app .form-field input,
#klor-cotizador-app .form-field textarea,
#klor-cotizador-app .form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: white;
  transition: var(--transition);
}
#klor-cotizador-app .form-field input:focus,
#klor-cotizador-app .form-field textarea:focus,
#klor-cotizador-app .form-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17, 144, 232, 0.12);
}
#klor-cotizador-app .form-field textarea {
  min-height: 90px;
  resize: vertical;
}
#klor-cotizador-app .form-field .hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
#klor-cotizador-app .privacy-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#klor-cotizador-app .privacy-note .material-symbols-rounded {
  font-size: 14px;
  color: var(--primary-dark);
}

/* ============ CONFIRMATION ============ */
#klor-cotizador-app .confirm {
  text-align: center;
  padding: 32px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#klor-cotizador-app .check-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success) 0%, #16A34A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  animation: bounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.35);
  color: white;
}
#klor-cotizador-app .check-circle .material-symbols-rounded {
  font-size: 64px;
  font-variation-settings: 'FILL' 1, 'wght' 600;
}
@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
#klor-cotizador-app .confirm h2 {
  font-size: 28px;
  color: var(--primary-darker);
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
@media (min-width: 768px) {
  #klor-cotizador-app .confirm h2 { font-size: 36px; }
}
#klor-cotizador-app .confirm p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 28px;
}
#klor-cotizador-app .quote-number-card {
  background: white;
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  border: 2px dashed var(--primary);
}
#klor-cotizador-app .quote-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 4px;
}
#klor-cotizador-app .quote-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-darker);
  letter-spacing: 1px;
}
@media (min-width: 768px) {
  #klor-cotizador-app .quote-number { font-size: 36px; }
}
#klor-cotizador-app .next-steps {
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 20px;
  max-width: 460px;
  margin: 0 auto 28px;
  text-align: left;
}
#klor-cotizador-app .next-steps h4 {
  font-size: 14px;
  color: var(--primary-darker);
  margin-bottom: 10px;
  font-weight: 700;
}
#klor-cotizador-app .next-steps ol {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
}
#klor-cotizador-app .next-steps li {
  counter-increment: steps;
  padding: 6px 0 6px 30px;
  position: relative;
  font-size: 14px;
  color: var(--text);
}
#klor-cotizador-app .next-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ============ PILETAS GRID (shortcode [klor_piletas_grid]) ============ */
/* Card-style grid: white rounded card, tall pool image, uppercase title, full-width CTA. */
.klor-piletas-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: transparent;
  margin: 0 auto;
  max-width: 1280px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 560px) {
  .klor-piletas-grid[data-columns="2"],
  .klor-piletas-grid[data-columns="3"],
  .klor-piletas-grid[data-columns="4"],
  .klor-piletas-grid[data-columns="5"] { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  .klor-piletas-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
  .klor-piletas-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
  .klor-piletas-grid[data-columns="5"] { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1100px) {
  .klor-piletas-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
}

.klor-piletas-grid-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 18px 18px 18px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.klor-piletas-grid-item:hover {
  border-color: #1190E8;
  box-shadow: 0 12px 30px rgba(17, 144, 232, 0.12);
  transform: translateY(-3px);
}

.klor-piletas-grid-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: transparent;
  overflow: hidden;
  text-decoration: none;
  padding: 8px;
  margin-bottom: 14px;
  box-sizing: border-box;
}
.klor-piletas-grid-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}
.klor-piletas-grid-item:hover .klor-piletas-grid-image img { transform: scale(1.04); }

.klor-piletas-grid-title {
  font-size: 15px;
  font-weight: 700;
  color: #143960;
  margin: 0 0 14px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.klor-piletas-grid-title a {
  color: inherit;
  text-decoration: none;
}
.klor-piletas-grid-title a:hover { color: #1190E8; }

/* Full-width CTA button at the bottom of the card. */
.klor-piletas-grid-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: #4DA8E8;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  border: none;
  transition: background 0.2s ease;
  margin-top: auto;
  box-sizing: border-box;
}
.klor-piletas-grid-btn:hover {
  background: #1190E8;
}
