/* =======================
   Stepper & Navigation
   ======================= */
.stepper{
  display:flex;
  gap:8px;
  align-items:center;
  margin:14px 0 18px;
  flex-wrap:wrap;
}

/* En móviles, asegurar espacio suficiente después del header */
@media (max-width: 768px) {
  .stepper{
    margin-top:20px;
    margin-bottom:18px;
  }
}

@media (min-width:860px){
  .stepper{flex-wrap:nowrap;}
}

@media (min-width:900px){
  .stepper{
    position:sticky;
    top:0;
    z-index:5;
    background:#fff;
    padding-top:8px;
  }
}

.stepper__item{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:#6b6b6b;
  font-weight:600;
  font-size:.9rem;
}

.stepper__item[data-state="done"]{
  background:#e8f7e8;
  border-color:#b4e2b4;
  color:#116611;
}

.stepper__item[data-state="active"]{
  background:linear-gradient(180deg,#c8b782 0%,var(--brand-2) 100%);
  color:#fff;
  border-color:transparent;
  box-shadow:0 3px 12px rgba(0,0,0,.12);
}

.stepper__num{
  width:24px;
  height:24px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  font-weight:800;
  border:1px solid #d8d8d8;
  background:#fff;
  color:#333;
  font-size:.9rem;
}

.stepper__item[data-state="active"] .stepper__num{
  background:#fff;
  color:#6b5f3b;
  border-color:transparent;
}

.stepper{ gap:6px; }
.stepper__item{
  flex:1 1 0 !important;
  min-width:0;
  justify-content:center;
  text-align:center;
  white-space:nowrap;
}

.form-block[hidden]{display:none !important;}

.block-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:10px;
  position:sticky;
  bottom:0;
  z-index:10;
  padding-top:12px;
  padding-bottom:8px;
  background:linear-gradient(to top,#f8fafc 70%,transparent);
}

/* Mismo ancho en la fila; altura fija solo en dorados (Cotizar/Carga) para que coincidan siempre */
.block-actions button,
.block-actions .btn-prev,
.block-actions .btn-next,
.block-actions .btn-gold,
.block-actions button[type="submit"],
.block-actions > div button,
.block-actions > div .btn-next {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  width:180px;
  min-width:180px;
  max-width:180px;
  padding:0 12px;
  border-radius:12px;
  font-weight:700;
  box-sizing:border-box;
}

.block-actions .btn-prev{
  appearance:none;
  border:1px solid var(--border);
  background:#fff;
  color:#333;
  cursor:pointer;
  min-height:44px;
}

/* Misma caja tipográfica y sombra para el par Cotizar / Carga masiva */
.block-actions .btn-next,
.block-actions .btn-gold{
  appearance:none;
  border:0;
  cursor:pointer;
  font:700 13px/1.2 var(--font);
  background:linear-gradient(180deg,#c8b782 0%,var(--brand-2) 100%);
  color:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.16);
  align-self:stretch;
  height:48px;
  min-height:48px;
  max-height:48px;
  overflow:hidden;
  white-space:normal;
  word-break:break-word;
  hyphens:auto;
}

.block-actions .btn-next[disabled],
.block-actions .btn-gold[disabled]{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
  filter:grayscale(.2);
}

button[type="submit"]{
  appearance:none;
  border:0;
  border-radius:12px;
  padding:12px 24px;
  font-weight:800;
  cursor:pointer;
  background:linear-gradient(180deg,#c8b782 0%,var(--brand-2) 100%);
  color:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.16);
}

button[type="submit"][disabled]{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
  filter:grayscale(.2);
}

/* =======================
   Chips & Badges
   ======================= */
.chips{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:8px;
  margin-top:6px;
}

.chips .chip{
  appearance:none;
  border:1px solid var(--border);
  border-radius:9999px;
  padding:10px 14px;
  font:600 14px/1.2 var(--font);
  color:#2b2b2b;
  background:#fff;
  cursor:pointer;
  display:inline-flex;
  gap:8px;
  align-items:center;
  transition:transform .05s, box-shadow .18s, background .18s, color .18s, border-color .18s;
  width:100%;
  justify-content:center;
}

.chips .chip:hover{ background:#f7f4eb; }
.chips .chip:active{ transform:translateY(1px); }

.chips .chip.is-active{
  background:linear-gradient(180deg,#c8b782 0%,var(--brand-2) 100%);
  color:#fff;
  border-color:transparent;
  box-shadow:0 3px 12px rgba(0,0,0,.10);
}

.chip .ico{
  width:20px;
  height:20px;
  display:inline-grid;
  place-items:center;
  filter:grayscale(1) brightness(0);
  opacity:.9;
}

.chips .chip.is-active .ico{ filter:none; opacity:1; }
.chips{ display:none !important; } /* legacy override */

.precio-chip{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.5rem .75rem;
  border:1px solid #e5e7eb;
  border-radius:999px;
  font-weight:600;
  font-size:14px;
  background:#f8fafc;
  color:#111827;
}

.precio-chip small{ font-weight:400; color:#6b7280; }
.pay-info[hidden]{ display:none !important; }

.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:9999px;
  font-weight:600;
  font-size:.8rem;
}

.badge-ok{background:#e8f7e8;color:#116611;border:1px solid #b4e2b4;}
.badge-warn{background:#fff3cd;color:#7a5d00;border:1px solid #ffeeba;}
.badge-err{background:#ffe4e6;color:#7f1d1d;border:1px solid #fecdd3;}

/* =======================
   Toast & Overlays
   ======================= */
.toast-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px 20px;
  box-shadow:0 10px 40px rgba(0,0,0,.18);
  max-width:520px;
  width:calc(100% - 40px);
  text-align:center;
}

.toast-card h3{margin:0 0 .35rem;color:var(--brand);font-weight:800;}
.toast-card p{margin:.25rem 0 .9rem;color:var(--muted);}
.toast-actions{display:flex;gap:10px;justify-content:center;}

#toast{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.45);
  z-index:9999;
}

#toast[hidden]{display:none !important;}

/* =======================
   Address Helpers
   ======================= */
.address-candidates{
  margin-top:6px;
  padding:8px 10px;
  border:1px solid var(--border-2);
  border-radius:var(--radius-sm);
  background:#fbfaf7;
  display:grid;
  gap:6px;
}

.address-candidates__title{
  margin:0;
  font-size:.85rem;
  font-weight:600;
  color:var(--brand);
}

.address-candidates__option{
  appearance:none;
  border:1px solid var(--border-2);
  background:#fff;
  border-radius:8px;
  padding:8px 10px;
  text-align:left;
  font:500 .9rem/1.3 var(--font);
  cursor:pointer;
  transition:border-color .18s, box-shadow .18s, background .18s;
}

.address-candidates__option:hover,
.address-candidates__option:focus-visible{
  border-color:var(--brand-2);
  box-shadow:0 0 0 2px rgba(177,155,97,.18);
  background:#fffdf5;
}

.address-candidates__message{
  font-size:.85rem;
  color:var(--brand);
  margin:0;
}

.pac-container{ z-index:9999 !important; }

.place-chip{
  display:inline-flex;
  align-items:center;
  gap:.75rem;
  max-width:min(560px,100%);
  padding:.625rem .75rem;
  margin-block:.375rem;
  background:var(--chip-bg);
  border:1px solid var(--chip-border);
  border-radius:.75rem;
  box-shadow:var(--chip-shadow);
  transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.place-chip:hover{
  background:var(--chip-hover);
  border-color:#d1d5db;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
}

.place-chip__icon{
  flex:0 0 28px;
  height:28px;
  width:28px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#e8eefc;
  color:var(--chip-accent);
  font-size:16px;
  line-height:1;
}

.place-chip__body{ display:grid; min-width:0; }
.place-chip__name{
  color:var(--chip-name);
  font-weight:700;
  font-size:.95rem;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.place-chip__addr{
  color:var(--chip-addr);
  font-size:.87rem;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.place-chip__clear{
  margin-left:.25rem;
  margin-right:.125rem;
  border:none;
  background:transparent;
  color:#9ca3af;
  font-size:18px;
  line-height:1;
  border-radius:.5rem;
  cursor:pointer;
  padding:.25rem;
}

.place-chip__clear:hover{
  color:#4b5563;
  background:rgba(0,0,0,.04);
}

/* =======================
   Payment & Totals
   ======================= */
#comentarios{margin-bottom:36px !important;}
#comentarios + #pago{margin-top:32px !important;}

#pago .pago-top{
  margin:4px 0;
  grid-column:1 / -1;
}

#pago .pago-top label{
  display:block !important;
  margin:0;
  padding:0;
}

#pago .pago-top label > span{
  display:inline-block;
  margin-right:8px;
  white-space:normal;
}

#pago .precio-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.pago-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  align-items:center;
  margin:.5rem 0 0;
}

.pago-btn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  flex:1 1 0;
  min-width:190px;
  max-width:100%;
  padding:.45rem .9rem;
  line-height:1.2;
  font:inherit;
  text-align:center;
  white-space:normal;
  cursor:pointer;
  border:1px solid #c9c6b8;
  border-radius:999px;
  background:#f6f3e8;
  box-shadow:none;
}

.pago-btn:focus{
  outline:2px solid #b7ae8c;
  outline-offset:2px;
}

.pago-btn.active,
.pago-btn[aria-checked="true"]{
  background:#e0d9bf;
  border-color:#b7ae8c;
}

.bank-box{
  margin-top:.6rem;
  border:1px solid #e2e2e2;
  padding:.6rem .8rem;
  border-radius:.5rem;
  background:#faf9f6;
}

#s1Price,
#s2Price,
#s3Price{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  height:var(--control-h);
  padding:8px 10px;
  border:1px solid #cfd3d7;
  border-radius:6px;
  background:#fff;
  font-size:15px;
  font-weight:600;
  color:var(--ink);
  box-shadow:none;
}

#s1Price [data-c="EUR"],
#s2Price [data-c="EUR"],
#s3Price [data-c="EUR"]{
  margin-left:auto;
}

#s1Price[hidden],
#s2Price[hidden],
#s3Price[hidden]{display:none !important;}

#floating-button,
#custom-modal{display:none !important;}

/* =======================
   Toggle & Alignment tweaks
   ======================= */
#bukasForm .fs-grid label:has(#s1AddContact),
#bukasForm .fs-grid label:has(#s2AddContact),
#bukasForm .fs-grid label:has(#s3AddContact),
#bukasForm .fs-grid label:has(#t2),
#bukasForm .fs-grid label:has(#t3){
  grid-column:1 / -1 !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

#bukasForm .fs-grid label:has(#s1AddContact) span,
#bukasForm .fs-grid label:has(#s2AddContact) span,
#bukasForm .fs-grid label:has(#s3AddContact) span,
#bukasForm .fs-grid label:has(#t2) span,
#bukasForm .fs-grid label:has(#t3) span{
  flex:1;
}

#bukasForm .fs-grid label:has(#s1AddContact) br,
#bukasForm .fs-grid label:has(#s2AddContact) br,
#bukasForm .fs-grid label:has(#s3AddContact) br,
#bukasForm .fs-grid label:has(#t2) br,
#bukasForm .fs-grid label:has(#t3) br{
  display:none;
}

#bukasForm .fs-grid label:has(#s1AddContact) select,
#bukasForm .fs-grid label:has(#s2AddContact) select,
#bukasForm .fs-grid label:has(#s3AddContact) select,
#bukasForm .fs-grid label:has(#t2) select,
#bukasForm .fs-grid label:has(#t3) select,
#bukasForm .fs-grid label:has(#s1AddContact) .yn-toggle,
#bukasForm .fs-grid label:has(#s2AddContact) .yn-toggle,
#bukasForm .fs-grid label:has(#s3AddContact) .yn-toggle,
#bukasForm .fs-grid label:has(#t2) .yn-toggle,
#bukasForm .fs-grid label:has(#t3) .yn-toggle{
  margin-left:auto;
}

/* =======================
   Consulta sobre cotización – Popup ligero
   ======================= */

.mvips-quote-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:9999;
}

.mvips-quote-modal{
  background:#f3f4f6;
  border-radius:12px;
  max-width:540px;
  width:100%;
  box-shadow:0 10px 40px rgba(0,0,0,.20);
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column;
}

.mvips-quote-modal header{
  padding:10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  background:#111827;
  color:#f9fafb;
}

.mvips-quote-modal h2{
  margin:0;
  font-size:15px;
}

.mvips-quote-close{
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  color:#e5e7eb;
  padding:0 4px;
}

.mvips-quote-close:focus{
  outline:2px solid #e5e7eb;
  outline-offset:2px;
}

.mvips-quote-frame{
  border:0;
  width:100%;
  height:420px;
  display:block;
  background:#f3f4f6;
}

@media (max-width:480px){
  .mvips-quote-modal{
    max-width:100%;
    height:90vh;
  }
  .mvips-quote-frame{
    height:100%;
  }
}

/* =======================
   Language Switcher
   ======================= */
.lang-switcher{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  max-width:100%;
}

.lang-switcher button{
  border:1px solid var(--border-2);
  background:#fff;
  border-radius:999px;
  padding:3px 8px;
  font-size:12px;
  cursor:pointer;
  flex:0 0 auto;
  min-width:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
}

/* En móviles, hacer los botones más compactos */
@media (max-width: 768px) {
  .lang-switcher{
    gap:3px;
  }
  
  .lang-switcher button{
    padding:2px 6px;
    font-size:11px;
    min-width:45px;
    gap:3px;
  }
  
  .lang-switcher .flag{
    width:16px;
    height:10px;
  }
  
  .lang-switcher .lang-code{
    font-size:10px;
  }
}

.lang-switcher button:hover{ filter:brightness(1.03); }

.lang-switcher button.active{
  background:var(--brand-2);
  color:#fff;
  border-color:var(--brand-2);
  font-weight:700;
}

.flag{
  width:18px;
  height:12px;
  border-radius:2px;
  box-shadow:0 0 0 1px rgba(0,0,0,.12);
  flex-shrink:0;
  display:inline-block;
  background-size:cover;
  background-position:center;
}

.flag-es{
  background:linear-gradient(to bottom,#aa151b 0 33.33%,#f1bf00 33.33% 66.66%,#aa151b 66.66% 100%);
}

.flag-fr{
  background:linear-gradient(to right,#0055a4 0 33.33%,#ffffff 33.33% 66.66%,#ef4135 66.66% 100%);
}

.flag-cat{
  background:linear-gradient(to bottom,#ffcc00 0 20%,#c8102e 20% 40%,#ffcc00 40% 60%,#c8102e 60% 80%,#ffcc00 80% 100%);
}

.flag-gb{
  background:
    linear-gradient(to bottom,transparent 0 40%,#cf142b 40% 60%,transparent 60% 100%),
    linear-gradient(to right,transparent 0 40%,#cf142b 40% 60%,transparent 60% 100%),
    #ffffff;
}

.flag-it{
  background:linear-gradient(to right,#009246 0 33.33%,#ffffff 33.33% 66.66%,#CE2B37 66.66% 100%);
}

.flag-pt{
  background:linear-gradient(to right,#006600 0 50%,#FF0000 50% 100%);
  position:relative;
}
.flag-pt::after{
  content:'';
  position:absolute;
  left:25%;
  top:50%;
  transform:translate(-50%,-50%);
  width:8px;
  height:8px;
  border-radius:50%;
  background:#FFD700;
  box-shadow:0 0 0 1.5px #006600;
}

.flag-de{
  background:linear-gradient(to bottom,#000000 0 33.33%,#DD0000 33.33% 66.66%,#FFCE00 66.66% 100%);
}

.flag-ru{
  background:linear-gradient(to bottom,#FFFFFF 0 33.33%,#0039A6 33.33% 66.66%,#D52B1E 66.66% 100%);
}

.lang-switcher .lang-code{text-transform:uppercase;}

/* =======================
   Button System Unificado
   ======================= */
:root{
  --btn-h: 46px;
  --btn-h-sm: 38px;
  --btn-radius: 12px;
  --btn-radius-sm: 10px;
  --btn-pad-x: 16px;
  --btn-pad-x-sm: 12px;
  --btn-font: 700 14px/1.15 var(--font);
  --btn-font-sm: 600 13px/1.1 var(--font);
  --btn-shadow: 0 6px 18px rgba(0,0,0,.16);
  --btn-shadow-hover: 0 8px 22px rgba(0,0,0,.18);
  --btn-shadow-active: 0 4px 14px rgba(0,0,0,.15);
}

/* Base común */
.btn-ui,
.btn-ui-primary,
.btn-ui-secondary,
.btn-ui-ghost{
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:var(--btn-h);
  height:var(--btn-h);
  padding:0 var(--btn-pad-x);
  border-radius:var(--btn-radius);
  font:var(--btn-font);
  text-align:center;
  text-decoration:none;
  cursor:pointer;
  box-sizing:border-box;
  white-space:nowrap;
  transition:
    transform .06s ease,
    filter .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.btn-ui-primary{
  border:0;
  background:linear-gradient(180deg,#c8b782 0%,var(--brand-2) 100%);
  color:#fff;
  box-shadow:var(--btn-shadow);
}

.btn-ui-primary:hover:not(:disabled){
  filter:brightness(1.03);
  box-shadow:var(--btn-shadow-hover);
}

.btn-ui-primary:active:not(:disabled){
  transform:translateY(1px);
  box-shadow:var(--btn-shadow-active);
}

.btn-ui-secondary{
  border:1px solid rgba(116,94,47,.30);
  background:#fff;
  color:#6b5f3b;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
}

.btn-ui-secondary:hover:not(:disabled){
  background:#f8f5ea;
  border-color:rgba(116,94,47,.45);
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.btn-ui-secondary:active:not(:disabled){
  transform:translateY(1px);
}

.btn-ui-ghost{
  border:1px solid rgba(116,94,47,.25);
  background:transparent;
  color:#745e2f;
  box-shadow:none;
}

.btn-ui-ghost:hover:not(:disabled){
  background:rgba(116,94,47,.08);
  border-color:rgba(116,94,47,.45);
}

.btn-ui:disabled,
.btn-ui-primary:disabled,
.btn-ui-secondary:disabled,
.btn-ui-ghost:disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
  filter:grayscale(.2);
}

.btn-ui-sm{
  min-height:var(--btn-h-sm);
  height:var(--btn-h-sm);
  padding:0 var(--btn-pad-x-sm);
  border-radius:var(--btn-radius-sm);
  font:var(--btn-font-sm);
}

/* Consistencia visual de botones existentes */
.block-actions .btn-prev,
.block-actions .btn-next,
.block-actions .btn-gold{
  min-height:48px;
  height:48px;
  border-radius:12px;
}

.lang-switcher button{
  min-height:44px;
  height:44px;
  padding:0 14px;
  border-radius:999px;
  font:700 13px/1 var(--font);
  box-sizing:border-box;
}

.pago-btn{
  min-height:44px;
  height:44px;
  font:600 14px/1.1 var(--font);
  box-sizing:border-box;
}

.mv-modal-actions .btn-primary,
.mv-modal-actions .btn-gold,
.mv-modal-actions .btn-secondary{
  min-height:44px;
  height:44px;
  padding:0 18px;
  border-radius:10px;
  box-sizing:border-box;
}

@media (max-width:768px){
  .btn-ui,
  .btn-ui-primary,
  .btn-ui-secondary,
  .btn-ui-ghost,
  .block-actions .btn-prev,
  .block-actions .btn-next,
  .block-actions .btn-gold,
  .mv-modal-actions .btn-primary,
  .mv-modal-actions .btn-gold,
  .mv-modal-actions .btn-secondary{
    width:100%;
    max-width:100%;
  }
}
