:root {
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #1b1a19;
  --muted: #6d6a65;
  --line: #e6e2db;
  --accent: #e3241b; /* rojo del logo */
  --accent-dark: #b81a13;
  --accent-soft: #fdeeed;
  --accent-ink: #ffffff;
  --ok: #1f8f4e;
  --ok-soft: #e7f5ec;
  --warn-bg: #fff4d6;
  --warn-ink: #7a5600;
  --err: #b3261e;
  --sombra: 0 1px 2px rgba(27, 26, 25, .04), 0 6px 24px rgba(27, 26, 25, .06);
  --radio: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 680px; margin: 0 auto; padding: 24px 16px 48px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; font-weight: 700; }
[hidden] { display: none !important; }

/* ---------- Encabezado simple (pedido.html) ---------- */
header:not(.hero) .logo { display: block; height: 80px; width: auto; margin: 0 0 12px; }
header:not(.hero) h1 { font-size: 1.6rem; margin: 0 0 4px; font-weight: 800; letter-spacing: -.01em; }
header:not(.hero) p { margin: 0 0 20px; color: var(--muted); }

/* Lista de contacto simple (pedido.html) */
.contacto {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem;
}
.contacto a { color: var(--muted); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.contacto svg { width: 16px; height: 16px; }
.contacto a:hover { color: var(--accent); }

/* ---------- Hero con barra flotante ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(110% 120% at 100% 0%, #ff5a36 0%, var(--accent) 42%, var(--accent-dark) 100%);
  border-radius: 0 0 36px 36px;
  padding: 14px 14px 104px;
}
/* Formas suaves de fondo */
.hero-deco, .hero-deco::before, .hero-deco::after { position: absolute; border-radius: 50%; pointer-events: none; }
.hero-deco { width: 380px; height: 380px; right: -140px; top: 40px; background: rgba(255, 255, 255, .08); }
.hero-deco::before { content: ""; width: 180px; height: 180px; left: -260px; top: 170px; background: rgba(255, 255, 255, .06); }
.hero-deco::after {
  content: ""; width: 520px; height: 520px; right: 60px; top: -380px;
  background: radial-gradient(circle, rgba(255, 255, 255, .14) 1.5px, transparent 1.6px) 0 0 / 18px 18px;
  border-radius: 0; opacity: .6; transform: rotate(8deg);
}

.nav {
  position: relative; z-index: 1;
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; color: var(--ink);
  border-radius: 22px; padding: 8px 8px 8px 16px;
  box-shadow: 0 10px 30px rgba(120, 10, 5, .25);
}
.nav-logo { display: block; flex: none; }
.nav .logo { display: block; height: 58px; width: auto; }
.nav-acciones { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; min-width: 44px; padding: 0 12px; justify-content: center;
  border-radius: 999px; background: #f6f3ef; color: var(--ink);
  text-decoration: none; font-size: .9rem; font-weight: 500; transition: .15s;
}
.nav-btn:hover { background: var(--accent-soft); color: var(--accent-dark); }
.nav-btn-wa { background: #25d366; color: #fff; }
.nav-btn-wa:hover { background: #1fbd5a; color: #fff; }
.nav-btn svg { flex: none; }
.nav-btn span { white-space: nowrap; }
@media (max-width: 860px) {
  .nav-btn:not(.nav-btn-wa) span { display: none; }
  .nav-btn:not(.nav-btn-wa) { padding: 0; width: 44px; }
}
@media (max-width: 420px) {
  .nav-btn-wa span { display: none; }
  .nav-btn-wa { padding: 0; width: 44px; }
  .nav .logo { height: 50px; }
}

.hero-in { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding: 34px 4px 0; }
.hero h1 { font-size: clamp(2rem, 7vw, 3rem); line-height: 1.02; margin: 0 0 12px; font-weight: 800; letter-spacing: -.025em; }
.hero h1 span { display: block; color: #ffd9d3; }
.hero p { margin: 0 0 22px; font-size: 1.08rem; opacity: .95; max-width: 32em; }

.pasos {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px;
}
.pasos li {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px; padding: 8px 10px; font-weight: 500; font-size: .92rem; line-height: 1.15;
}
.pasos b {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--accent);
  display: grid; place-items: center; font-size: .85rem;
}
@media (max-width: 480px) {
  .pasos li { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; font-size: .85rem; }
}
.con-hero main { margin-top: -78px; position: relative; z-index: 2; }

/* ---------- Tarjetas ---------- */
.aviso {
  background: var(--warn-bg); color: var(--warn-ink);
  border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin-bottom: 16px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radio);
  padding: 22px; margin-bottom: 16px; box-shadow: var(--sombra);
}

/* ---------- Subida ---------- */
.card-drop { padding: 10px; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px dashed #e9c9c6; border-radius: 14px; background: #fffafa;
  padding: 30px 16px 24px; text-align: center; cursor: pointer; transition: .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.over { transform: scale(1.01); }
.drop input { display: none; }
.drop-ico {
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; margin-bottom: 8px; box-shadow: 0 6px 18px rgba(227, 36, 27, .35);
}
.drop strong { font-size: 1.2rem; font-weight: 700; }
.drop-sub { color: var(--muted); }
.drop-nota { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.drop-formatos {
  margin-top: 10px; padding: 6px 12px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line); color: var(--muted); font-size: .82rem;
}

/* Páginas indicadas a mano (archivos que no son PDF) */
.grupo-paginas {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #fff8e8; border: 1.5px solid #f3dca4; border-radius: 14px; padding: 14px; margin-bottom: 18px;
}
.grupo-paginas-txt { flex: 1 1 220px; }
.grupo-paginas-txt strong { display: block; }
.grupo-paginas-txt .nota { display: block; margin-top: 2px; }
.archivo-info.aviso-paginas {
  display: inline-block; margin-top: 3px; padding: 1px 10px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; font-size: .85rem;
}

/* ---------- Tarjeta de archivo ---------- */
.archivo-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.pdf-badge {
  flex: none; width: 44px; height: 52px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: end center; padding-bottom: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  position: relative; clip-path: polygon(0 0, 70% 0, 100% 24%, 100% 100%, 0 100%);
}
.pdf-badge::before { content: ""; position: absolute; top: 0; right: 0; width: 30%; height: 24%; background: #f6c9c5; }
.archivo-titulo { flex: 1; min-width: 0; }
.archivo-nombre { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archivo-info { font-size: .92rem; color: var(--muted); }
.archivo-info.ok {
  display: inline-block; margin-top: 3px; padding: 1px 10px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: .85rem;
}
.archivo-info.err, .err { color: var(--err); }
.quitar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: .95rem; color: var(--muted); transition: .12s;
}
.quitar:hover { color: var(--err); border-color: var(--err); background: #fff5f4; }
.archivo-precio {
  margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em;
}
.archivo-precio::before { content: "Subtotal"; font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.archivo-precio.err { display: block; font-size: .95rem; font-weight: 400; }
.archivo-precio.err::before { content: none; }
.archivo-precio:empty { display: none; }

/* ---------- Opciones ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.opciones { display: flex; gap: 8px; flex-wrap: wrap; }
.opciones label { flex: 1 1 0; min-width: 110px; }
.opciones input { position: absolute; opacity: 0; pointer-events: none; }
.opciones span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 11px 8px; border-radius: 12px; min-height: 48px; white-space: nowrap;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; user-select: none; transition: .12s; font-weight: 500;
}
.opciones span:hover { border-color: #d9b3b0; }
.opciones input:checked + span {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.opciones input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.opciones input:disabled + span { opacity: .6; cursor: default; }
.fila-doble { display: grid; grid-template-columns: auto 1fr; gap: 0 20px; }
.fila-doble fieldset { margin-bottom: 4px; }
@media (max-width: 420px) { .fila-doble { grid-template-columns: 1fr; } .fila-doble fieldset { margin-bottom: 18px; } }

/* Iconos dibujados con CSS */
.ico { display: inline-block; flex: none; position: relative; }
.ico-bn { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #1b1a19; background: linear-gradient(90deg, #1b1a19 50%, #fff 50%); }
.ico-color { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#e3241b, #f5b700, #2bb24c, #1f7ae0, #9b3fd1, #e3241b); }
.ico-hoja { width: 13px; height: 17px; border: 1.5px solid currentColor; border-radius: 2px; background: #fff; }
.ico-hoja-grande { width: 17px; height: 23px; }
.ico-doble { box-shadow: 3px 3px 0 -1.5px #fff, 3px 3px 0 0 currentColor; }
.ico-anillo {
  width: 14px; height: 18px; border: 1.5px solid currentColor; border-radius: 2px;
  background: repeating-linear-gradient(180deg, currentColor 0 2px, transparent 2px 5px) left 1px top 2px / 3px 14px no-repeat;
}

/* Copias */
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; height: 48px; }
.stepper button {
  width: 44px; border: 0; background: #faf8f5; font-size: 1.3rem; cursor: pointer; color: var(--ink); font-family: inherit;
}
.stepper button:hover { background: var(--accent-soft); color: var(--accent); }
.stepper input[type=number] {
  width: 64px; border: 0; border-radius: 0; text-align: center; font-weight: 700; font-size: 1.1rem; padding: 0;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input[type=number], input[type=text], input[type=tel], input[type=password], select, textarea {
  padding: 11px 12px; font-size: 1rem; border-radius: 12px;
  border: 1.5px solid var(--line); font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=number]:not(.stepper input) { width: 120px; }

/* ---------- Resumen ---------- */
.resultado h2 { font-size: 1.35rem; }
.resumen { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: item; }
.resumen li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.resumen-nombre { font-weight: 600; word-break: break-word; }
.resumen-desc { grid-column: 1; font-size: .9rem; color: var(--muted); }
.resumen-precio { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; }
.total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 2rem; font-weight: 800; margin: 12px 0 18px; letter-spacing: -.02em;
}
.pendiente { color: var(--muted); margin: 0; }
.error { color: var(--err); }
.nota { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

/* Formulario del pedido */
.pago { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 16px; }
.pago label { display: block; font-weight: 600; margin-bottom: 12px; }
.pago label input { display: block; width: 100%; margin-top: 6px; font-weight: 400; }

/* ---------- Botones ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.08rem; padding: 15px; border-radius: 14px; border: 0;
  transition: transform .1s, filter .12s, box-shadow .12s;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-wa { background: #25d366; color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, .3); }
.btn-wa::before {
  content: ""; width: 22px; height: 22px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm0 18.2a8.2 8.2 0 0 1-4.2-1.1l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2Zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.2-.4.7-1.3a.5.5 0 0 0 0-.4l-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.9 11.9 0 0 0 4.6 4c1.7.7 2.3.8 3.2.7a2.7 2.7 0 0 0 1.8-1.3 2.2 2.2 0 0 0 .2-1.3c-.1-.1-.3-.2-.5-.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-principal { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(227, 36, 27, .28); }
.btn-secundario { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }

/* ---------- Barra fija de total (celular) ---------- */
.barra-total {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
}
.barra-total small { display: block; color: var(--muted); font-size: .8rem; }
.barra-total strong { font-size: 1.35rem; font-weight: 800; }
.barra-total .btn { width: auto; padding: 12px 22px; font-size: 1rem; }
@media (min-width: 900px) { .barra-total { display: none !important; } }

/* ---------- Pie ---------- */
.pie {
  max-width: 680px; margin: 8px auto 0; padding: 20px 16px 110px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line);
}
.pie-logo { height: 52px; width: auto; flex: none; }
.pie-datos { display: flex; flex-direction: column; line-height: 1.35; }
.pie-datos strong { color: var(--ink); font-size: .95rem; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-flotante {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9;
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 18px 0 16px; border-radius: 999px;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 600;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4); transition: transform .15s, bottom .2s;
}
.wa-flotante::before {
  content: ""; width: 26px; height: 26px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm0 18.2a8.2 8.2 0 0 1-4.2-1.1l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2Zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.2-.4.7-1.3a.5.5 0 0 0 0-.4l-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.9 11.9 0 0 0 4.6 4c1.7.7 2.3.8 3.2.7a2.7 2.7 0 0 0 1.8-1.3 2.2 2.2 0 0 0 .2-1.3c-.1-.1-.3-.2-.5-.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wa-flotante:hover { transform: translateY(-2px); }
/* En el celular: redondo (solo ícono) y arriba de la barra del total cuando está visible */
@media (max-width: 899px) {
  .wa-flotante { width: 56px; padding: 0; justify-content: center; }
  .wa-flotante-txt { display: none; }
  .con-barra .wa-flotante { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- Datos de transferencia (pedido.html) ---------- */
.datos-banco { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; margin: 0 0 16px; }
.datos-banco dt { color: var(--muted); font-size: .9rem; }
.datos-banco dd { margin: 0; font-weight: 600; word-break: break-all; }
.copiar {
  font: inherit; font-size: .85rem; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.estado-ok { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 600; }

@media (max-width: 560px) {
  .card { padding: 18px; }
}
