/* Piccoli: pedido contra entrega en una sola pantalla. Hereda la fuente del tema. */
button.btn.btn-primary.whatsapp-order-button {
  display: block;
  margin: 15px auto;
}
#product button.btn.btn-primary.whatsapp-order-button {
  margin: 15px 0;
}

#PiccoliCodModal {
  --pcod-ink: #2b2724;
  --pcod-muted: #6b625a;
  --pcod-line: #ece7e1;
  --pcod-soft: #faf7f3;
  --pcod-border: #cfc6bc;
  --pcod-green: #1f8f4e;
  --pcod-accent: #2b2724; /* botones: el mismo tono neutro del checkout; el verde, solo para ahorros */
  --pcod-red: #b3261e;
  color: var(--pcod-ink);
}
#PiccoliCodModal .modal-dialog { max-width: 480px; margin: 24px auto; }
#PiccoliCodModal .modal-content { border: 0; border-radius: 16px; overflow: hidden; background: #fff; }
#PiccoliCodModal [hidden] { display: none !important; }

.pcod-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--pcod-line); }
.pcod-title { margin: 0; font-size: 18px; font-weight: 700; color: inherit; }
.pcod-close { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; cursor: pointer; }

.pcod-summary { padding: 16px 20px; background: var(--pcod-soft); }
.pcod-loading, .pcod-empty { margin: 0; font-size: 14px; color: var(--pcod-muted); }
.pcod-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pcod-item { display: flex; gap: 12px; align-items: center; }
.pcod-item img, .pcod-noimg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--pcod-line); }
.pcod-item-text { flex: 1 1 auto; min-width: 0; }
.pcod-item-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pcod-item-meta { font-size: 13px; color: var(--pcod-muted); }
.pcod-item-price { font-size: 14px; font-weight: 600; white-space: nowrap; }
.pcod-freeship { margin-top: 14px; padding: 12px; background: #fff; border: 1px solid var(--pcod-line); border-radius: 10px; }
.pcod-freeship-text { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.pcod-freeship-done .pcod-freeship-text { color: var(--pcod-green); }
.pcod-bar { height: 8px; border-radius: 4px; background: var(--pcod-line); overflow: hidden; }
.pcod-bar-fill { display: block; height: 100%; width: 0; background: var(--pcod-green); transition: width .3s ease; }
.pcod-totals { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pcod-row { display: flex; justify-content: space-between; gap: 12px; }
.pcod-total { font-size: 16px; font-weight: 700; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--pcod-line); }

.pcod-form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pcod-subtitle { margin: 0; font-size: 16px; font-weight: 700; color: inherit; }
.pcod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcod-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pcod-field label { margin: 0; font-size: 13px; font-weight: 600; text-align: left; }
.pcod-optional { font-weight: 400; color: var(--pcod-muted); }
.pcod-field input, .pcod-field select {
  height: 44px; width: 100%; box-sizing: border-box; padding: 0 12px;
  border: 1px solid var(--pcod-border); border-radius: 8px; background: #fff;
  font: inherit; font-size: 16px; color: inherit;
}
.pcod-field input:focus, .pcod-field select:focus { outline: 2px solid var(--pcod-accent); outline-offset: 1px; border-color: var(--pcod-accent); }
.pcod-invalid input, .pcod-invalid select { border-color: var(--pcod-red); }
.pcod-msg, .pcod-error { font-size: 13px; color: var(--pcod-red); margin: 0; }

.pcod-confirm {
  min-height: 56px; width: 100%; border: 0; border-radius: 10px; padding: 8px 12px;
  background: var(--pcod-accent); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
}
a.pcod-confirm, a.pcod-confirm:hover { color: #fff; text-decoration: none; }
.pcod-confirm:disabled { opacity: .6; cursor: wait; }
.pcod-confirm-sub { font-size: 13px; font-weight: 500; }
.pcod-note { margin: 0; font-size: 12px; color: var(--pcod-muted); text-align: center; }
.pcod-prepay-box { display: flex; flex-direction: column; gap: 10px; }
.pcod-or { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pcod-muted); }
.pcod-or::before, .pcod-or::after { content: ""; flex: 1; border-top: 1px solid var(--pcod-line); }
.pcod-prepay {
  min-height: 56px; width: 100%; border: 2px solid var(--pcod-accent); border-radius: 10px; padding: 8px 12px;
  background: #fff; color: var(--pcod-accent); font-size: 16px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
}
.pcod-prepay:disabled { opacity: .6; cursor: wait; }
.pcod-prepay .pcod-confirm-sub { color: var(--pcod-ink); }

.pcod-done { padding: 28px 20px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.pcod-done p { margin: 0; }
.pcod-done-title { font-size: 18px; font-weight: 700; }

/* Celular: ocupa toda la pantalla, como una hoja. */
@media (max-width: 575px) {
  #PiccoliCodModal .modal-dialog { margin: 0; max-width: none; min-height: 100%; }
  #PiccoliCodModal .modal-content { border-radius: 0; min-height: 100vh; }
  .pcod-grid { gap: 10px; }
}

/* Carrito lateral: entra desde la derecha; en celular deja ver un borde de la página. */
.pdrw {
  --pcod-ink: #2b2724;
  --pcod-muted: #6b625a;
  --pcod-line: #ece7e1;
  --pcod-soft: #faf7f3;
  --pcod-border: #cfc6bc;
  --pcod-green: #1f8f4e;
  --pcod-accent: #2b2724; /* botones: el mismo tono neutro del checkout; el verde, solo para ahorros */
  --pcod-red: #b3261e;
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1041;
  width: 400px; max-width: calc(100vw - 44px);
  background: #fff; color: var(--pcod-ink);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, .18);
  transform: translateX(100%); transition: transform .25s ease;
}
.pdrw.pdrw-open { transform: none; }
.pdrw[hidden], .pdrw [hidden], .pdrw-overlay[hidden] { display: none !important; }
.pdrw-overlay { position: fixed; inset: 0; z-index: 1040; background: rgba(0, 0, 0, .45); }
html.pdrw-lock, html.pdrw-lock body { overflow: hidden; }

.pdrw-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--pcod-line); }
.pdrw-title { margin: 0; font-size: 18px; font-weight: 700; color: inherit; }
.pdrw-close { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; cursor: pointer; }

.pdrw-freeship { padding: 12px 20px; background: var(--pcod-soft); border-bottom: 1px solid var(--pcod-line); }
.pdrw-freeship-text { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.pdrw-freeship.pcod-freeship-done .pdrw-freeship-text { color: var(--pcod-green); }

.pdrw-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px; }
.pdrw-loading, .pdrw-empty { margin: 24px 0; font-size: 15px; text-align: center; color: var(--pcod-muted); }
.pdrw-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pdrw-item { display: flex; gap: 12px; align-items: flex-start; }
.pdrw-item img, .pdrw-noimg { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--pcod-line); }
.pdrw-item-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pdrw-item-top { display: flex; justify-content: space-between; gap: 8px; }
.pdrw-item-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pdrw-item-meta { font-size: 13px; color: var(--pcod-muted); }
.pdrw-item-row { display: flex; justify-content: space-between; align-items: center; }
.pdrw-item-price { font-size: 15px; font-weight: 700; white-space: nowrap; }
.pdrw-remove { width: 32px; height: 32px; margin: -6px -6px 0 0; border: 0; background: transparent; color: var(--pcod-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.pdrw-qty { display: flex; align-items: center; border: 1px solid var(--pcod-border); border-radius: 8px; }
.pdrw-qty button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 18px; color: inherit; cursor: pointer; }
.pdrw-qty button:disabled { opacity: .4; cursor: wait; }
.pdrw-qty button[data-op="up"]:disabled { cursor: not-allowed; }
.pdrw-item-stock { font-size: 13px; color: var(--pcod-red); margin-top: 4px; }
.pdrw-qty span { min-width: 24px; text-align: center; font-size: 15px; font-weight: 600; }

.pdrw-footer { border-top: 1px solid var(--pcod-line); padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.pdrw-subtotal { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; }
.pdrw-note { margin: -6px 0 0; font-size: 12px; color: var(--pcod-muted); }
.pdrw-footer .pcod-confirm, .pdrw-footer .pcod-prepay { min-height: 52px; margin: 0; }
/* child_classic/custom.css pinta de verde WhatsApp (con !important) todo .whatsapp-order-button. */
.pdrw-footer .pdrw-cod { background: var(--pcod-accent) !important; }
.pdrw-continue { min-height: 44px; border: 0; background: transparent; color: #2f5d50; font-size: 14px; text-decoration: underline; cursor: pointer; }
