/* ============ NIDO — página de pedido (/pedir) ============ */
/* Usa los tokens de styles.css (--ochre, --apricot, --mint, --ink…). */

.pd-barra-on{ padding-bottom:110px; }
.wrap-pedir{ max-width:880px; }
[hidden]{ display:none !important; }

.pd-head{ padding:40px 0 8px; }
.pd-head .eyebrow{ color:var(--ochre); margin-bottom:10px; }
.pd-head h1{ font-size:clamp(28px,5vw,40px); font-weight:800; letter-spacing:-.01em; margin-bottom:8px; }
.pd-dek{ color:var(--ink-soft); font-size:16.5px; max-width:52ch; }

.pd-saludo{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 24px;
  background:var(--apricot); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 20px; margin-top:20px;
}
.pd-saludo p{ margin:0; }
.pd-saludo-hola{ font-family:var(--font-display); font-size:19px; }
.pd-saludo-casa{ font-size:14px; color:var(--ink-soft); }
.link-btn{ background:none; border:0; padding:0; font:inherit; color:var(--ochre-strong); text-decoration:underline; cursor:pointer; }
.pd-racha{ min-width:220px; flex:1; max-width:340px; }
.pd-racha p{ font-size:13.5px; color:var(--ink); margin-top:6px; }
.pd-racha-bar{ height:10px; background:rgba(255,255,255,.75); border-radius:100px; overflow:hidden; border:1px solid var(--border); }
.pd-racha-bar span{ display:block; height:100%; width:0; background:var(--ochre); border-radius:100px; transition:width .4s ease; }

/* pasos */
.pd-step{ padding:28px 0 8px; border-top:1px solid var(--border); margin-top:24px; }
.pd-head + .pd-step{ border-top:0; margin-top:8px; }
.pd-step h2, .pd-step h3{ font-size:21px; font-weight:800; display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.pd-num{
  width:30px; height:30px; border-radius:50%; background:var(--ochre); color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-size:15px; flex:none;
}
.pd-help{ color:var(--ink-soft); font-size:14.5px; margin:0 0 16px; }
.pd-label{ font-family:var(--font-display); font-weight:600; font-size:14px; margin:18px 0 8px; }
.pd-opt{ font-weight:400; color:var(--ink-soft); }

/* productos */
.pd-productos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; }
.pd-card{
  position:relative; display:flex; flex-direction:column;
  background:var(--surface); border:1.5px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden; transition:border-color .15s ease, box-shadow .15s ease;
}
.pd-card.is-on{ border-color:var(--ochre); box-shadow:0 0 0 3px rgba(195,81,39,.14), var(--shadow); }
.pd-card.is-out{ opacity:.6; }
.pd-skel{ min-height:360px; background:linear-gradient(100deg,#f4efe8 30%,#fbf8f3 50%,#f4efe8 70%); background-size:300% 100%; animation:pd-shimmer 1.3s infinite linear; box-shadow:none; }
@keyframes pd-shimmer{ to{ background-position:-150% 0; } }
.pd-foto{ aspect-ratio:4/3; background:#fff; display:flex; align-items:center; justify-content:center; border-bottom:1px solid var(--border); }
.pd-foto img{ width:100%; height:100%; object-fit:contain; }
.pd-foto-vacia{ background:var(--apricot); }
.pd-foto-vacia svg{ width:72px; height:72px; color:var(--ochre); opacity:.7; }
.pd-badge{
  position:absolute; top:12px; left:12px; z-index:1;
  font-family:var(--font-display); font-size:12px; font-weight:700;
  background:var(--ink); color:#fff; border-radius:100px; padding:4px 10px;
}
.pd-badge-warn{ background:var(--amber); color:var(--ink); }
.pd-body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:4px; flex:1; }
.pd-marca{ font-family:var(--font-display); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--ochre); }
.pd-body h3{ font-size:19px; margin:0; }
.pd-desc{ font-size:14px; color:var(--ink-soft); margin:2px 0 0; }
.pd-pie{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:12px; }
.pd-precio{ font-family:var(--font-display); font-weight:800; font-size:22px; color:var(--ink); font-variant-numeric:tabular-nums; }
.pd-precio small{ font-size:12.5px; font-weight:500; color:var(--ink-soft); }

.pd-stepper{ display:flex; align-items:center; gap:2px; background:var(--paper); border:1px solid var(--border); border-radius:100px; padding:3px; }
.pd-stepper button{
  width:38px; height:38px; border-radius:50%; border:0; cursor:pointer;
  background:var(--surface); color:var(--ink); font-size:20px; line-height:1; font-weight:700;
  box-shadow:0 1px 2px rgba(23,19,16,.12);
}
.pd-stepper button:disabled{ opacity:.35; cursor:default; }
.pd-stepper output{ min-width:28px; text-align:center; font-family:var(--font-display); font-weight:800; font-size:17px; font-variant-numeric:tabular-nums; }
.pd-agregar{ padding:10px 18px; }

/* opciones tipo tarjeta (entrega, pago) */
.pd-opciones{ display:grid; gap:12px; }
.pd-opciones-2{ grid-template-columns:1fr 1fr; }
.pd-opciones-3{ grid-template-columns:repeat(3,1fr); }
@media (max-width:640px){ .pd-opciones-2, .pd-opciones-3{ grid-template-columns:1fr; } }
.pd-opcion{
  position:relative; display:flex; flex-direction:column; gap:2px; cursor:pointer;
  background:var(--surface); border:1.5px solid var(--border); border-radius:14px; padding:14px 16px 14px 46px;
}
.pd-opcion input{ position:absolute; left:16px; top:17px; width:18px; height:18px; accent-color:var(--ochre); margin:0; }
.pd-opcion:has(input:checked){ border-color:var(--ochre); background:#fffaf6; box-shadow:0 0 0 3px rgba(195,81,39,.12); }
.pd-opcion:has(input:focus-visible){ outline:2px solid var(--ochre-strong); outline-offset:2px; }
.pd-opcion-titulo{ font-family:var(--font-display); font-weight:700; font-size:16px; }
.pd-opcion-sub{ font-size:13.5px; color:var(--ink-soft); }

.pd-programar{ margin-top:6px; }
.pd-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.pd-chip{
  font-family:var(--font-display); font-weight:600; font-size:14.5px;
  background:var(--surface); color:var(--ink); border:1.5px solid var(--border); border-radius:100px;
  padding:9px 15px; cursor:pointer; min-height:42px;
}
.pd-chip[aria-checked="true"], .pd-chip[aria-pressed="true"]{ background:var(--ink); color:#fff; border-color:var(--ink); }

/* casa */
.pd-casa{ background:var(--mint); border:1px solid var(--border); border-radius:var(--radius); padding:18px; display:grid; gap:12px; }
.pd-casa .pd-help{ margin:0; color:var(--ink); }
.pd-casa-grid{ display:grid; grid-template-columns:1.4fr 1fr; gap:12px; }
.pd-span2{ grid-column:1 / -1; }
.pd-casa .btn{ justify-self:start; background:var(--surface); }
.pd-casa .form-status{ text-align:left; }
.pd-registro{ font-size:14px !important; }
.pd-registro a{ color:var(--ochre-strong); font-weight:700; }
.pd-casa-ok{ background:var(--mint); border:1px solid var(--border); border-radius:14px; padding:14px 18px; }
.pd-casa-ok p{ margin:0; }

.field textarea{
  font-family:var(--font-body); font-size:16px; padding:12px 14px; resize:vertical;
  border:1px solid var(--border); border-radius:10px; background:var(--paper); color:var(--ink);
}
.pd-notas{ margin-top:18px; }
.pd-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.pd-error{ text-align:left; font-weight:600; margin:18px 0 0; }

/* barra fija */
.pd-barra{
  position:fixed; left:0; right:0; bottom:0; z-index:40;
  background:rgba(255,253,249,.96); backdrop-filter:blur(8px);
  border-top:1px solid var(--border); box-shadow:0 -8px 24px -18px rgba(23,19,16,.4);
  padding:12px 0 calc(12px + env(safe-area-inset-bottom));
}
.pd-barra-inner{ max-width:880px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.pd-barra-total{ display:flex; flex-direction:column; line-height:1.2; }
.pd-barra-total span{ font-size:13.5px; color:var(--ink-soft); }
.pd-barra-total strong{ font-family:var(--font-display); font-size:24px; font-weight:800; font-variant-numeric:tabular-nums; }
.pd-barra .btn{ min-width:200px; }
.pd-barra .btn:disabled{ cursor:not-allowed; }
@media (max-width:480px){ .pd-barra .btn{ min-width:0; flex:1; padding:14px 16px; } }
.pd-barra-on .whatsapp-float{ bottom:96px; }
.pd-enviado .whatsapp-float{ bottom:20px; }

/* listo */
.pd-listo{ padding:48px 0 40px; }
.pd-listo-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:32px 24px; text-align:center; }
.pd-listo-card img{ margin:0 auto 12px; }
.pd-listo-card h1{ font-size:30px; font-weight:800; margin-bottom:6px; }
.pd-listo-card > p{ color:var(--ink-soft); }
.pd-listo-items{ list-style:none; padding:0; margin:18px 0 8px; text-align:left; border-top:1px solid var(--border); }
.pd-listo-items li{ display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.pd-listo-items small{ color:var(--ink-soft); }
.pd-listo-total{ font-family:var(--font-display); font-size:20px; color:var(--ink) !important; }
.pd-listo-entrega, .pd-listo-pago{ color:var(--ink) !important; margin-bottom:8px; }
.pd-listo-premio{ background:var(--apricot); border-radius:12px; padding:10px 14px; color:var(--ink) !important; }
.pd-listo-ctas{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:20px; }
.pd-enviado .pd-barra, .pd-enviado #pedido{ display:none; }
.pd-casa-grid > .field{ min-width:0; }
.pd-casa .field input, .pd-casa .field select, .pd-notas textarea{ width:100%; min-width:0; }

/* ---------- landing (home) ---------- */
.hero-pedir{ min-height:520px; }
.hero-pedir .hero-copy{ max-width:600px; }
.hero-pedir h1{ font-size:clamp(32px,5.6vw,54px); }
.hero-ctas-row{ display:flex; flex-wrap:wrap; gap:12px; margin-top:26px; }
.hero-ctas-row .btn-pill{ min-width:240px; }
.hero-chips{ list-style:none; padding:0; margin:22px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.hero-chips li{
  font-family:var(--font-display); font-weight:600; font-size:13.5px; color:#fff;
  background:rgba(23,19,16,.38); border:1px solid rgba(255,255,255,.28); border-radius:100px; padding:6px 12px;
  backdrop-filter:blur(4px);
}
@media (max-width:760px){
  .hero-pedir{ min-height:0; }
  .hero-ctas-row .btn-pill{ width:100%; min-width:0; }
}

.pd-pasos{ background:var(--ink); color:#fff; }
.pd-pasos-inner{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; padding-top:22px; padding-bottom:22px; }
.pd-paso{ display:flex; gap:12px; align-items:flex-start; }
.pd-paso span{
  flex:none; width:30px; height:30px; border-radius:50%; background:var(--ochre); color:#fff;
  font-family:var(--font-display); font-weight:800; display:flex; align-items:center; justify-content:center; font-size:15px;
}
.pd-paso p{ margin:0; font-size:14px; color:rgba(255,255,255,.75); line-height:1.45; }
.pd-paso strong{ display:block; color:#fff; font-family:var(--font-display); font-size:15.5px; }
@media (max-width:760px){ .pd-pasos-inner{ grid-template-columns:1fr; gap:14px; } }

#pedido{ scroll-margin-top:70px; }
.pd-titulo{ font-size:clamp(26px,4.4vw,36px); font-weight:800; letter-spacing:-.01em; margin-bottom:4px; }
.pd-legal{ font-size:13px !important; margin:0 !important; color:var(--ink-soft) !important; }
.pd-casa > .pd-opciones{ margin-bottom:4px; }

.pd-extra{ margin-top:56px; }
.pd-extra-grid{ display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.pd-extra .section-title{ margin-bottom:12px; font-size:clamp(22px,3vw,28px); }
.pd-extra p{ color:var(--ink); }
.pd-eyebrow{ color:var(--ochre-strong); margin-bottom:8px; }
@media (max-width:760px){ .pd-extra-grid{ grid-template-columns:1fr; gap:28px; } }
.pd-enviado main, .pd-enviado .footer{ display:none; }

/* etiqueta NUEVO y aviso de lo que falta */
.pd-badge-nuevo{ background:var(--ochre); color:#fff; letter-spacing:.06em; box-shadow:0 2px 8px rgba(195,81,39,.35); }
.pd-badge-der{ left:auto; right:12px; }
.pd-card.is-nuevo{ border-color:rgba(195,81,39,.45); }
.pd-barra-inner{ flex-wrap:wrap; row-gap:6px; }
.pd-barra-msg{ order:-1; flex-basis:100%; margin:0; font-size:14px; font-weight:700; color:var(--ochre-strong); }
.pd-barra-msg:empty{ display:none; }
@keyframes pd-flash{ 0%{ box-shadow:0 0 0 0 rgba(195,81,39,.0); background:rgba(255,229,174,.0);} 25%{ background:rgba(255,229,174,.85);} 100%{ background:rgba(255,229,174,0);} }
.pd-step.pd-falta{ animation:pd-flash 1.6s ease; border-radius:12px; }

/* aviso dentro del paso 3 */
.pd-aviso{ background:var(--surface); border:1.5px solid var(--ochre); border-radius:14px; padding:14px 16px; display:grid; gap:10px; }
.pd-aviso p{ margin:0; font-size:15px; }
.pd-aviso-btns{ display:flex; flex-wrap:wrap; gap:8px; }
.pd-aviso .btn{ padding:10px 16px; font-size:14.5px; }
.pd-aviso .btn-wa{ background:#25D366; color:#fff; }
.pd-aviso .btn-primary{ background:var(--ochre); color:#fff; border-color:var(--ochre); }
.pd-aviso .btn-primary:hover{ background:var(--ochre-strong); }
/* "Es mi primera vez" con una casa ya registrada: se esconden nombre y celular
   para que el aviso sea lo único que se vea */
.pd-casa-ocupada .field[data-modo="nuevo otro"], .pd-casa-ocupada .pd-legal{ display:none !important; }

/* ---------- foto que abre la ficha de detalle ---------- */
button.pd-foto{ position:relative; width:100%; padding:0; border:0; border-bottom:1px solid var(--border); cursor:zoom-in; font:inherit; color:inherit; display:flex; }
button.pd-foto:focus-visible{ outline:2px solid var(--ochre-strong); outline-offset:-4px; }
.pd-ver{
  position:absolute; right:10px; bottom:10px; display:inline-flex; align-items:center; gap:5px;
  font-family:var(--font-display); font-weight:700; font-size:12.5px;
  background:rgba(23,19,16,.78); color:#fff; border-radius:100px; padding:6px 10px;
  transition:background .15s ease;
}
button.pd-foto:hover .pd-ver{ background:var(--ochre); }

/* ---------- ficha de detalle ---------- */
.pd-det{ border:0; padding:0; background:transparent; max-width:540px; width:calc(100% - 32px); max-height:calc(100dvh - 32px); overflow:visible; }
.pd-det::backdrop{ background:rgba(23,19,16,.55); }
.pd-det-card{ position:relative; background:var(--surface); border-radius:20px; overflow:auto; max-height:calc(100dvh - 32px); box-shadow:0 24px 60px -20px rgba(23,19,16,.5); }
.pd-det-cerrar{
  position:absolute; top:10px; right:10px; z-index:2; width:40px; height:40px; border-radius:50%;
  border:0; background:rgba(255,255,255,.95); color:var(--ink); font-size:26px; line-height:1; cursor:pointer;
  box-shadow:0 2px 8px rgba(23,19,16,.2);
}
.pd-det-foto{ background:#fff; aspect-ratio:4/3; display:flex; align-items:center; justify-content:center; border-bottom:1px solid var(--border); }
.pd-det-foto img{ width:100%; height:100%; object-fit:contain; }
.pd-det-vacia{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.pd-det-vacia svg{ width:90px; height:90px; color:var(--ochre); opacity:.7; }
.pd-det-body{ padding:18px 20px 20px; display:flex; flex-direction:column; gap:6px; }
.pd-det-tags{ display:flex; align-items:center; gap:10px; }
.pd-det-nuevo{ position:static; }
.pd-det-body h3{ font-size:23px; margin:0; }
.pd-det-texto p{ margin:6px 0 0; font-size:15.5px; color:var(--ink); }
.pd-det-texto .pd-det-info{ color:var(--ink-soft); font-size:14px; }
.pd-det-body .pd-pie{ margin-top:8px; padding-top:14px; border-top:1px solid var(--border); }
.pd-det-listo{ margin-top:10px; width:100%; }
@media (max-width:560px){
  .pd-det{ width:100%; max-width:none; margin:auto 0 0; max-height:92dvh; }
  .pd-det-card{ border-radius:20px 20px 0 0; max-height:92dvh; padding-bottom:env(safe-area-inset-bottom); }
}

/* Todas las fotos del mismo tamaño (cuadradas). Las fotos reales que no son
   cuadradas se recortan al centro para que ninguna tarjeta se vea distinta. */
button.pd-foto{ display:block; aspect-ratio:1 / 1; height:auto; overflow:hidden; }
button.pd-foto img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
button.pd-foto.pd-foto-vacia{ display:flex; align-items:center; justify-content:center; }
