:root{
  --bg:#0b0e13; --surface:#111622; --surface-2:#0f141e;
  --text:#e6e8ee; --muted:#a7afc0; --accent:#6ee7ff; --accent-2:#7c5cff;
  --ring: 0 0 0 2px rgba(124,92,255,.45), 0 0 0 6px rgba(124,92,255,.15);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
body.decants-page{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,"Noto Sans";
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(124,92,255,.10), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(110,231,255,.08), transparent 60%),
    var(--bg);
  color:var(--text);
}

/* Topbar */
.topbar{
  position: sticky; top:0; z-index: 5; backdrop-filter: blur(8px);
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
}
.title{ margin:0; font-size: clamp(2rem, 6vw, 3rem); letter-spacing:.1em; text-transform:uppercase; }
.subtitle{ color:var(--muted); margin-top:.25rem; }

/* ===== HERO banner (desktop 8:1 y móvil 4:1) ===== */
.banner{
  display:block;
  width:100%;
  /* 8:1 → altura ≈ 12.5% del ancho de la ventana */
  height: clamp(80px, 12.5vw, 240px); /* min 80px, ideal 12.5vw, tope 240px */
  background-image: url('https://myscentmerida.com/DECANTS/IMAGES/banner-decants-desktop.png?v=4');
  background-size: cover;         /* no deforma; no recorta si la relación coincide */
  background-position: center 50%;
  background-repeat: no-repeat;
  margin: 0; padding: 0;
  /* Opcional, ayuda a algunos navegadores a reservar espacio */
  aspect-ratio: 8 / 1;
}

/* Móvil: usa un banner menos extremo (4:1) para mejor legibilidad */
@media (max-width: 640px){
  .banner{
    /* 4:1 → altura ≈ 25% del ancho */
    height: clamp(90px, 25vw, 200px);
    background-image: url('https://myscentmerida.com/DECANTS/IMAGES/banner-decants-mobil.png?v=3');
    background-position: center 50%;
    aspect-ratio: 4 / 1;
  }
}


/* Layout (el ancho de la página lo dicta este contenedor) */
.container{
  width: min(1100px, 92vw);   /* ← ancho máximo de la página */
  margin: 1.25rem auto 3rem;
}

/* Botones generales */
button{ appearance:none; border:none; cursor:pointer; }
.open-popup{
  padding:.8rem 1rem; border-radius:12px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  color:var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.open-popup:hover{ transform: translateY(-2px); box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.hint{ color:var(--muted); margin-left:.75rem; }

/* ===== Tabla de cotización ===== */
.quote-table-wrap{ margin-top: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.quote-table{
  width:100%;                 /* ← la tabla iguala el ancho del contenedor/página */
  border-collapse: collapse; overflow:hidden;
  background: var(--surface); border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), var(--shadow);
  table-layout: auto;
}
.quote-table th, .quote-table td{
  padding: .9rem .8rem; border-bottom:1px solid rgba(255,255,255,.06);
  white-space: nowrap;        /* evita saltos raros de etiquetas cortas */
}
.quote-table thead th{ text-align:left; font-weight:600; color:#cfd6e6; background: var(--surface-2); }
.t-center{text-align:center}
.size-pill{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.25rem .55rem; border-radius:999px;
  background: rgba(124,92,255,.15); color:#eae9ff;
  border:1px solid rgba(124,92,255,.35);
  transition: box-shadow .15s ease, transform .15s ease;
}
.size-pill:hover{ box-shadow: var(--ring); transform: translateY(-1px); }
.icon-btn{ width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  background: rgba(255,255,255,.08); color:#fff; }
.icon-btn:hover{ box-shadow: var(--ring); }

/* Totales y CTA */
.totals{ display:flex; justify-content:flex-end; gap:2rem; padding:1rem; color:#e5ecff; }
.cta-row{ display:flex; align-items:center; gap:.75rem; padding:0 1rem 1rem; }
.send{
  padding: .9rem 1.2rem; border-radius:12px; font-weight:600;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  color:var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), var(--shadow);
}
.send.disabled{ opacity:.5; cursor:not-allowed; }
.soon-label{ color:var(--muted); }

/* ===== Popup catálogo ===== */
.catalog-dialog{
  width:min(1100px, 95vw); border:none; border-radius:18px; padding:0; overflow:hidden;
  background: var(--surface);
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
.catalog-dialog::backdrop{ background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.catalog-header{ display:flex; gap:1rem; align-items:center; padding:1rem;
  border-bottom:1px solid rgba(255,255,255,.06); background: var(--surface-2); }
.catalog-header h2{ margin:0; font-size:1.25rem; color:#eef3ff; letter-spacing:.02em; }
.catalog-header input{ flex:1; padding:.75rem 1rem; border-radius:12px; border:1px solid rgba(255,255,255,.12);
  background:#0e1420; color:#e9eefc; outline:none; }
.catalog-header input::placeholder{ color:#b9c3d9; }

/* Tabla (desktop/tablet) */
.catalog-table-wrap{ max-height: 60vh; overflow:auto; }
.catalog-table{ width:100%; border-collapse: collapse; }
.catalog-table th, .catalog-table td{ padding:.75rem .8rem; border-bottom:1px solid rgba(255,255,255,.06); }
.catalog-table thead th{ position:sticky; top:0; background: #131a28; color:#e8eeff; z-index:1; }

/* Botones de tamaño en tabla */
.size-option{
  display:inline-block; padding:.45rem .7rem; border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color:#fff;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.size-option[disabled]{ opacity:.35; pointer-events:none; }
.size-option:hover{ transform: translateY(-1px); box-shadow: var(--ring); background: rgba(255,255,255,.12); }
.size-option.primary{ border-color: rgba(124,92,255,.55); background: rgba(124,92,255,.25); }

/* Badges y nombre del perfume (claro) */
.badge{ display:inline-block; padding:.25rem .45rem; border-radius:8px; font-size:.8rem;
  border:1px solid rgba(255,255,255,.12); color:#cfd6e6; background: rgba(255,255,255,.06); }
.catalog-dialog .catalog-table td { color: var(--text) !important; }
.catalog-dialog .catalog-table td:first-child > div:first-child{
  color: #f2f6ff !important; font-weight: 700;
}

/* ===== Vista responsive del catálogo: cards en móvil ===== */
.catalog-cards-wrap { display: none; }

/* Móvil (<= 640px): cards visibles, tabla oculta */
@media (max-width: 640px){
  .catalog-table-wrap { display: none; }
  .catalog-cards-wrap { display: block; }
}

.catalog-cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  padding: 1rem;
  max-height: 60vh;           /* scroll interno igual que la tabla */
  overflow:auto;
}
.decant-card{
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: .85rem .9rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
.decant-title{ color: #f2f6ff; font-weight: 700; line-height: 1.2; }
.decant-meta{ display:flex; gap:.5rem; flex-wrap:wrap; }
.decant-sizes{ display:flex; gap:.5rem; flex-wrap: wrap; }
.decant-sizes .size-option{ padding:.55rem .8rem; border-radius: 10px; }
.decant-sizes .size-option[disabled]{ opacity:.35; pointer-events:none; }

.card-row{ display:flex; justify-content:space-between; align-items:center; gap:.75rem; }
.card-col{ display:flex; flex-direction:column; gap:.25rem; }

/* Medida + precio en botones (cards) */
.catalog-cards .size-option{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: .55rem .8rem;
  line-height: 1.1;
  gap: 2px;
}
.catalog-cards .size-option .ml{
  font-weight: 700;
  letter-spacing: .02em;
  color: #f2f6ff;
}
.catalog-cards .size-option .price{
  font-size: .95rem;
  color: #e6ebff;
  opacity: .95;
}

/* Resaltado de fila agregada */
.quote-table tr.added { background: rgba(124, 92, 255, 0.18); transition: background .8s ease; }

/* Responsive extra para la tabla en pantallas más chicas */
@media (max-width: 820px){
  .totals{ justify-content:space-between; }
  .quote-table td:nth-child(2){ display:none; } /* oculta categoría para ganar espacio */
}

/* Botón “✕” para cerrar el popup */
.catalog-header { position: relative; }
.close-popup{
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #eef3ff;
  border: 1px solid rgba(255,255,255,.10);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.close-popup:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(124,92,255,.45), 0 0 0 6px rgba(124,92,255,.15);
  background: rgba(255,255,255,.12);
}
@media (max-width: 640px){
  .close-popup{
    width: 30px;
    height: 30px;
    font-size: 15px;
    /* top/right iguales para conservar margen táctil */
  }
}

/* Sombra sutil para título y subtítulo del topbar */
.topbar .title{
  text-shadow:
    0 1px 0 rgba(0,0,0,.80),
    0 6px 18px rgba(0,0,0,.18);
}

.topbar .subtitle{
  text-shadow:
    0 1px 0 rgba(0,0,0,.80),
    0 3px 8px rgba(0,0,0,.15);
}

/* Dialog pequeño para nombre de cotización */
.small-dialog{
  width: min(520px, 92vw);
}

/* Botón grande y colorido (alineado al de PERFUMES) */
.open-popup{
  height: 48px;
  padding: 0 1.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: 14px;

  background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(110,231,255,.18));
  color: #ffffff;
  border: 1px solid rgba(124,92,255,.45);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 20px 50px rgba(0,0,0,.45);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.open-popup:hover{
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(124,92,255,.38), rgba(110,231,255,.26));
  border-color: rgba(124,92,255,.65);
  box-shadow:
    0 26px 70px rgba(0,0,0,.55),
    0 0 0 2px rgba(124,92,255,.35);
}

.open-popup:active{ transform: translateY(-1px); }
.open-popup:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(124,92,255,.5), 0 0 0 6px rgba(124,92,255,.18);
}

/* Ajuste leve en móvil */
@media (max-width: 640px){
  .open-popup{
    height: 46px;
    font-size: 1rem;
    padding: 0 1rem;
  }
}


/* === Botones de mL con look colorido (mismo tamaño) === */
.catalog-table .size-option,
.catalog-cards .size-option{
  /* NO cambiamos padding/height: respeta tu tamaño actual */
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(110,231,255,.18));
  color: #ffffff;
  border: 1px solid rgba(124,92,255,.45);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 20px 50px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}

.catalog-table .size-option:hover,
.catalog-cards .size-option:hover{
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(124,92,255,.38), rgba(110,231,255,.26));
  border-color: rgba(124,92,255,.65);
  box-shadow:
    0 26px 70px rgba(0,0,0,.55),
    0 0 0 2px rgba(124,92,255,.35);
}

.catalog-table .size-option:active,
.catalog-cards .size-option:active{
  transform: translateY(-1px);
}

.catalog-table .size-option:focus-visible,
.catalog-cards .size-option:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(124,92,255,.5), 0 0 0 6px rgba(124,92,255,.18);
}

/* Si marcas una opción como seleccionada desde JS (opcional) */
.catalog-table .size-option.selected,
.catalog-cards .size-option.selected{
  border-color: rgba(124,92,255,.85);
  box-shadow:
    0 0 0 2px rgba(124,92,255,.55),
    0 0 0 6px rgba(124,92,255,.20),
    0 20px 60px rgba(0,0,0,.5);
  background: linear-gradient(135deg, rgba(124,92,255,.45), rgba(110,231,255,.30));
}

/* Deshabilitado consistente (ej. 2mL si no es NICHO) */
.catalog-table .size-option[disabled],
.catalog-cards .size-option[disabled]{
  opacity: .45;
  filter: grayscale(.35);
  cursor: not-allowed;
  transform: none !important;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  box-shadow: none;
}

/* ====== Dialog genérico (incluye tu small-dialog) ====== */
.dialog{
  width: min(520px, 92vw);
  border: none;
  padding: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
}
.dialog::backdrop{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}

/* Superficie interna con layout en columna */
.dialog-surface{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header */
.dialog-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dialog-header h2{
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: .02em;
  color: #eef3ff;
}

/* Body */
.dialog-body{
  padding: 1rem;
  display: grid;
  gap: .6rem;
}
.dialog-label{
  color: #cfd6e6;
  font-size: .95rem;
}
.dialog-input{
  width: 100%;
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0e1420;
  color: #e9eefc;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.dialog-input::placeholder{ color:#b9c3d9; }
.dialog-input:focus{
  border-color: rgba(124,92,255,.55);
  box-shadow: 0 0 0 2px rgba(124,92,255,.45), 0 0 0 6px rgba(124,92,255,.15);
}
.dialog-help{
  color: var(--muted);
  font-size: .85rem;
}

/* Footer y botones */
.dialog-footer{
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: .85rem 1rem 1rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Secundario (Cancelar) */
.btn-outline{
  appearance: none;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #e6e8ee;
  border-radius: 12px;
  height: 42px;
  padding: 0 1rem;
  font-weight: 600;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn-outline:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 26px 70px rgba(0,0,0,.55);
}
.btn-outline:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(124,92,255,.45), 0 0 0 6px rgba(124,92,255,.15);
}

/* Primario (Guardar) – reusa tu .send y sube presencia en diálogo */
.dialog-footer .send{
  height: 42px;
  padding: 0 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(110,231,255,.18));
  color: #ffffff;
  border: 1px solid rgba(124,92,255,.45);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 20px 50px rgba(0,0,0,.45);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.dialog-footer .send:hover{
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(124,92,255,.38), rgba(110,231,255,.26));
  border-color: rgba(124,92,255,.65);
  box-shadow: 0 26px 70px rgba(0,0,0,.55), 0 0 0 2px rgba(124,92,255,.35);
}
.dialog-footer .send:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(124,92,255,.5), 0 0 0 6px rgba(124,92,255,.18);
}

/* Botón ✕ del header (reusa tu .close-popup pero ligeramente más compacto) */
.dialog-header .close-popup{
  width: 34px; height: 34px; font-size: 16px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #eef3ff;
  border: 1px solid rgba(255,255,255,.10);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.dialog-header .close-popup:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(124,92,255,.45), 0 0 0 6px rgba(124,92,255,.15);
  background: rgba(255,255,255,.12);
}

/* Ajustes responsive menores */
@media (max-width: 640px){
  .dialog{ width: min(520px, 94vw); border-radius: 14px; }
  .dialog-header{ padding: .9rem .9rem; }
  .dialog-body{ padding: .9rem; gap: .55rem; }
  .dialog-footer{ padding: .75rem .9rem .9rem; }
  .dialog-header .close-popup{ width: 30px; height: 30px; font-size: 15px; }
}

