/* ===== Nail Boutique — Carrito de pedido =====
   Neutro para convivir con la paleta de cada catálogo. Cada catálogo puede
   sobreescribir --ped-accent / --ped-dark en su propia hoja si hace falta. */
:root {
  --ped-dark: #1a0f13;
  --ped-accent: #b8922a;
  --ped-bg: #ffffff;
  --ped-soft: #f6f1ee;
  --ped-line: #ece4e0;
  --ped-mute: #7a6f72;
  --ped-wa: #1f9d55;
}

.ped-fab, .ped-overlay, .ped-toast { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.ped-fab *, .ped-overlay *, .ped-toast * { box-sizing: border-box; }

/* Botón flotante (abajo a la derecha; Volver/Inicio usan la esquina izquierda) */
.ped-fab {
  position: fixed; right: 14px; bottom: 14px; z-index: 450;
  width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ped-dark); color: #fff; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.ped-fab[hidden] { display: none; }
.ped-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ped-fab svg circle { fill: currentColor; stroke: none; }
.ped-badge[hidden] { display: none; }
.ped-badge {
  position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--ped-accent); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
  border: 2px solid #fff;
}
body.ped-has-items { padding-bottom: 80px; }

/* Aviso "Agregado": arriba, para no tapar el botón que se acaba de tocar (abajo en los modales) */
.ped-toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 100002;
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 16px; border-radius: 14px;
  background: var(--ped-dark); color: #fff; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.ped-toast[hidden] { display: none; }
.ped-toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ped-toast button {
  flex-shrink: 0; border: 0; border-radius: 10px; padding: 8px 12px;
  background: #fff; color: var(--ped-dark); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
}

/* Panel del carrito */
.ped-overlay {
  position: fixed; inset: 0; z-index: 100001;
  background: rgba(20,10,14,.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.ped-overlay[hidden] { display: none; }
.ped-panel {
  width: 100%; max-width: 480px; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--ped-bg); color: var(--ped-dark);
  border-radius: 20px 20px 0 0; overflow: hidden;
  font-size: 14px; line-height: 1.35;
}
@media (min-width: 700px) {
  .ped-overlay { align-items: stretch; justify-content: flex-end; }
  .ped-panel { max-height: none; height: 100%; border-radius: 0; }
}
.ped-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--ped-line); flex-shrink: 0;
}
.ped-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ped-head h2 span { color: var(--ped-mute); font-weight: 500; }
.ped-x { border: 0; background: var(--ped-soft); width: 36px; height: 36px; border-radius: 50%; font-size: 15px; cursor: pointer; color: var(--ped-dark); }

.ped-list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px; flex: 1 1 auto; }
.ped-brand h3 {
  margin: 14px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ped-mute);
}
.ped-brand ul { list-style: none; margin: 0; padding: 0; }
.ped-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ped-line); }
.ped-item:last-child { border-bottom: 0; }
.ped-item img, .ped-noimg { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--ped-soft); flex-shrink: 0; }
.ped-info { flex: 1 1 auto; min-width: 0; }
.ped-name { font-weight: 600; overflow-wrap: anywhere; }
.ped-promo { font-size: 12px; font-weight: 700; color: var(--ped-accent); margin-top: 2px; }
.ped-code, .ped-unit { font-size: 12px; color: var(--ped-mute); margin-top: 2px; }
.ped-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ped-line { font-weight: 700; }
.ped-qty { display: flex; align-items: center; border: 1px solid var(--ped-line); border-radius: 10px; }
.ped-qty button { width: 32px; height: 32px; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ped-dark); }
.ped-qty span { min-width: 22px; text-align: center; font-weight: 600; }
.ped-rm { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--ped-mute); text-decoration: underline; cursor: pointer; }

.ped-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ped-line); background: var(--ped-bg); flex-shrink: 0; }
.ped-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ped-mute); margin-bottom: 4px; }
.ped-row--disc { color: var(--ped-accent); font-weight: 700; }
.ped-hint { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: #fbf4e4; color: #7a5a12; font-size: 12px; font-weight: 600; }
.ped-sub { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.ped-sub strong { font-size: 20px; }
.ped-note { margin: 4px 0 10px; font-size: 12px; color: var(--ped-mute); }
.ped-field { display: block; margin-bottom: 10px; }
.ped-field span { display: block; font-size: 12px; color: var(--ped-mute); margin-bottom: 4px; }
.ped-field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--ped-line); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ped-dark); background: #fff;
}
.ped-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700;
}
.ped-btn--send { background: var(--ped-wa); color: #fff; }
.ped-btn--ghost { background: var(--ped-soft); color: var(--ped-dark); margin-top: 8px; }
.ped-wa { width: 18px; height: 18px; fill: currentColor; }
.ped-clear { display: block; margin: 10px auto 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ped-mute); text-decoration: underline; cursor: pointer; }
.ped-empty { padding: 28px 16px 24px; text-align: center; color: var(--ped-mute); }
.ped-empty p { margin: 0 0 16px; }
.ped-empty .ped-btn--send { margin-bottom: 0; }

/* Botón "Agregar al carrito" dentro de los catálogos: estado momentáneo tras agregar */
.ped-added { opacity: .85; }
