/* ── Variables (en sync con cart.css y header.css) ── */
:root {
  --brand:   #062a42;
  --accent:  #00aaff;
  --accent2: #0077cc;
  --comp-a:  #00aaff;   /* color componente A */
  --comp-b:  #00e5c4;   /* color componente B */
  --danger:  #ff4d4d;
  --bg:      #f0f4f8;
  --card:    #ffffff;
  --border:  #e2e8f0;
  --text:    #1a2b3c;
  --muted:   #6b7f91;
  --radius:  14px;
  --shadow:  0 8px 32px rgba(6,42,66,.10);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Section wrapper ── */
.product {
  max-width: 980px;
  margin: 0 auto;
  padding: 140px 20px 60px;
}

/* ── Configurator layout ── */
.configurator-wrapper {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

/* ══════════════════════════════════
   BOTTLE PREVIEW (columna izquierda)
══════════════════════════════════ */
.bottle-preview {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 104px;
}

.preview-title {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: -.3px;
  align-self: flex-start;
}

/* ── Botella SVG-style ── */
.bottle-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.bottle-shape {
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 8px 24px rgba(0,170,255,.2));
  transition: filter .3s;
}
.bottle-shape:hover {
  filter: drop-shadow(0 12px 32px rgba(0,170,255,.35));
}

.bottle-cap {
  width: 36px;
  height: 14px;
  background: linear-gradient(to bottom, #1a3a52, var(--brand));
  border-radius: 4px 4px 0 0;
  z-index: 2;
}

.bottle-neck {
  width: 36px;
  height: 40px;
  background: rgba(255,255,255,.6);
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(4px);
}

.bottle-body {
  width: 110px;
  height: 220px;
  border: 2px solid var(--border);
  border-radius: 12px 12px 18px 18px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(4px);
}

.bottle-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  transition: height .5s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column-reverse;
}

.fill-layer {
  width: 100%;
  transition: height .5s cubic-bezier(.4,0,.2,1), opacity .3s;
}

.fill-a {
  background: linear-gradient(to top, var(--comp-a), rgba(0,170,255,.7));
}

.fill-b {
  background: linear-gradient(to top, var(--comp-b), rgba(0,229,196,.6));
}

/* Brillo de botella */
.bottle-shine {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 18px;
  height: 80%;
  background: linear-gradient(to bottom, rgba(255,255,255,.55), transparent);
  border-radius: 10px;
  pointer-events: none;
}

/* ── Leyenda ── */
.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: var(--muted);
}
.legend-item strong { color: var(--text); }

.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-a { background: var(--comp-a); box-shadow: 0 0 6px rgba(0,170,255,.5); }
.dot-b { background: var(--comp-b); box-shadow: 0 0 6px rgba(0,229,196,.5); }

/* ── Price badge ── */
.price-badge {
  width: 100%;
  background: linear-gradient(135deg, var(--brand), #0d4a72);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.price-label {
  font-size: .82rem;
  font-weight: 500;
  opacity: .8;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.price-value {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
}

/* ══════════════════════════════════
   FORM PANEL (columna derecha)
══════════════════════════════════ */
.form-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
}

.form-panel h1 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--brand);
  margin-bottom: 8px;
  letter-spacing: -.5px;
}

.form-subtitle {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Form groups ── */
.form-group {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

/* Select */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: .97rem;
  color: var(--text);
  background: var(--bg);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.select-wrapper select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,170,255,.15);
  background: #fff;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}

/* ── Sliders ── */
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-value {
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent2);
  min-width: 42px;
  text-align: right;
}

.slider-track-wrapper {
  padding: 4px 0;
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 6px;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: opacity .2s;
}
#percB{
  display: none;
}

.slider:disabled { opacity: .4; cursor: not-allowed; }

/* Componente A — azul */
.slider-a {
  background: linear-gradient(to right, var(--comp-a) var(--val, 0%), var(--border) var(--val, 0%));
}
.slider-a::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--comp-a);
  box-shadow: 0 2px 8px rgba(0,170,255,.45);
  border: 2px solid #fff;
  transition: transform .15s;
}
.slider-a::-webkit-slider-thumb:hover { transform: scale(1.25); }

/* Componente B — cyan */
.slider-b {
  display: none;
  background: linear-gradient(to right, var(--comp-b) var(--val, 0%), var(--border) var(--val, 0%));
}
.slider-b::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--comp-b);
  box-shadow: 0 2px 8px rgba(0,229,196,.45);
  border: 2px solid #fff;
  transition: transform .15s;
}
.slider-b::-webkit-slider-thumb:hover { transform: scale(1.25); }

/* Firefox */
.slider-a::-moz-range-thumb,
.slider-b::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
}
.slider-a::-moz-range-thumb { background: var(--comp-a); }
.slider-b::-moz-range-thumb { 
  
  background: var(--comp-b); }

/* ── Number control ── */
.number-control {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.num-btn {
  width: 40px; height: 44px;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s;
  display: flex; align-items: center; justify-content: center;
}
.num-btn:hover { background: var(--accent); color: #fff; }

.number-control input[type="number"] {
  width: 60px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  background: #fff;
  text-align: center;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand);
  height: 44px;
  outline: none;
  -moz-appearance: textfield;
}
.number-control input[type="number"]::-webkit-outer-spin-button,
.number-control input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Order summary ── */
.order-summary {
  background: var(--bg);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--muted);
}
.summary-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.summary-total {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 1rem;
}
.summary-total span:last-child {
  font-size: 1.15rem;
  color: var(--brand);
  font-family: "Playfair Display", serif;
}

/* ── Submit button ── */
.btn-add {
  width: 100%;
  padding: 16px 24px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(6,42,66,.25);
  transition: background .25s, transform .15s, box-shadow .25s;
}
.btn-add svg { width: 18px; height: 18px; }
.btn-add:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,170,255,.3);
}
.btn-add:active { transform: translateY(0); }

/* ── Footer ── */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  padding: 28px 50px;
  font-size: .85rem;
  line-height: 2;
}
footer a { color: var(--accent2); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .configurator-wrapper {
    grid-template-columns: 1fr;
  }
  .bottle-preview { position: static; }
  .form-panel { padding: 28px 20px; }
  .form-panel h1 { font-size: 1.6rem; }
}