/* Dylan – Checkout WhatsApp | checkout-modal.css */

/* ── Botón Comprar ahora ── */
.wace-btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  margin-top: 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .03em;
  background: #1E9E8C;
  color: #fff;
  box-shadow: 0 6px 20px rgba(30,158,140,.32);
  transition: all .22s ease;
}
.wace-btn-buy:hover {
  background: #167d6d;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(30,158,140,.42);
}

/* ── Modal overlay ── */
.wace-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,39,68,.55);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.wace-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ── */
.wace-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 24px 80px rgba(26,39,68,.22);
  transform: translateY(24px) scale(.98);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  font-family: 'Inter', sans-serif;
}
.wace-modal-overlay.open .wace-modal {
  transform: translateY(0) scale(1);
}

/* Header */
.wace-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px 18px;
  border-bottom: 1px solid #E4E8EF;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-radius: 20px 20px 0 0;
}
.wace-modal-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #1A2744;
  margin: 0;
}
.wace-modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid #E4E8EF;
  background: none;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #3A4A60;
  transition: all .18s ease;
}
.wace-modal-close:hover { background: #1A2744; color: #fff; border-color: #1A2744; }

/* Body */
.wace-modal-body {
  padding: 28px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Order summary */
.wace-order-summary {
  background: #F7F8FA;
  border-radius: 14px;
  border: 1px solid #E4E8EF;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.wace-book-thumb {
  width: 64px; height: 84px;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(145deg, #2d4a8a, #1a2744);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: -4px 6px 14px rgba(0,0,0,.18);
}
.wace-book-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wace-book-emoji { font-size: 28px; }
.wace-order-info { flex: 1; }
.wace-order-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; font-size: 1rem;
  color: #1A2744; margin-bottom: 4px; line-height: 1.3;
}
.wace-order-meta { font-size: 12px; color: #3A4A60; margin-bottom: 8px; }
.wace-qty-ctrl {
  display: flex; align-items: center;
  border: 1.5px solid #E4E8EF;
  border-radius: 8px; overflow: hidden;
  background: #fff; width: fit-content;
}
.wace-qty-btn {
  width: 30px; height: 30px;
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: #1A2744;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.wace-qty-btn:hover { background: #F7F8FA; }
.wace-qty-val {
  width: 36px; text-align: center;
  font-weight: 700; font-size: 14px;
  border: none;
  border-left: 1px solid #E4E8EF;
  border-right: 1px solid #E4E8EF;
  background: #fff; color: #1A2744; outline: none;
}
.wace-price-col { text-align: right; flex-shrink: 0; }
.wace-order-price {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900; font-size: 1.2rem;
  color: #1A2744; display: block;
}
.wace-price-label { font-size: 11px; color: #3A4A60; }

/* Breakdown */
.wace-breakdown {
  flex-direction: column;
  gap: 10px;
  display: none;
}
.wace-bd-item {
  background: #F7F8FA;
  border-radius: 14px;
  border: 1px solid #E4E8EF;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
}
.wace-bd-thumb {
  width: 52px; height: 68px;
  border-radius: 3px 7px 7px 3px;
  background: linear-gradient(145deg, #2d4a8a, #1a2744);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  box-shadow: -3px 5px 12px rgba(0,0,0,.15);
}
.wace-bd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wace-bd-info { flex: 1; }
.wace-bd-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; font-size: .9rem;
  color: #1A2744; margin-bottom: 4px;
}
.wace-bd-disc-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: #FFE8E5; color: #B83226;
  padding: 2px 7px; border-radius: 20px; margin-bottom: 6px;
}
.wace-bd-qty-ctrl {
  display: flex; align-items: center;
  border: 1.5px solid #E4E8EF;
  border-radius: 7px; overflow: hidden;
  background: #fff; width: fit-content;
}
.wace-bd-qbtn {
  width: 26px; height: 26px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: #1A2744;
  display: flex; align-items: center; justify-content: center;
}
.wace-bd-qbtn:hover { background: #F7F8FA; }
.wace-bd-qval {
  width: 30px; text-align: center;
  font-weight: 700; font-size: 13px;
  border: none;
  border-left: 1px solid #E4E8EF;
  border-right: 1px solid #E4E8EF;
  background: #fff; color: #1A2744; outline: none;
}
.wace-bd-price-col { text-align: right; flex-shrink: 0; }
.wace-bd-price {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900; font-size: 1.05rem; color: #1A2744; display: block;
}
.wace-bd-orig { font-size: 11px; color: #3A4A60; text-decoration: line-through; opacity: .6; }
.wace-bd-remove {
  background: none; border: none; cursor: pointer;
  color: #B83226; font-size: 16px; padding: 0 0 0 8px; opacity: .7;
}
.wace-bd-remove:hover { opacity: 1; }
.wace-bd-subtotal {
  background: #1A2744; border-radius: 12px;
  padding: 12px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.wace-bd-subtotal span { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); }
.wace-bd-subtotal strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem; color: #FFD23F;
}

/* Section title */
.wace-section-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #1E9E8C;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.wace-section-title::after {
  content: ''; flex: 1; height: 1px; background: #E4E8EF;
}

/* Upsell */
.wace-upsell-section {}
.wace-discount-banner {
  background: linear-gradient(135deg, #fff8e6, #fff3cd);
  border: 1.5px solid #FFE69C;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px; color: #856404;
  margin-bottom: 14px; text-align: center;
}
.wace-discount-banner strong { color: #664d00; }
.wace-upsell-scroll {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 10px;
  scroll-snap-type: x mandatory;
}
.wace-upsell-scroll::-webkit-scrollbar { height: 4px; }
.wace-upsell-scroll::-webkit-scrollbar-thumb { background: #1E9E8C; border-radius: 4px; }
.wace-upsell-card {
  flex: 0 0 130px; min-width: 130px; max-width: 130px;
  border: 1.5px solid #E4E8EF;
  border-radius: 12px; overflow: hidden;
  scroll-snap-align: start;
  transition: border-color .18s, box-shadow .18s;
  background: #fff;
}
.wace-upsell-card:hover { border-color: #1E9E8C; box-shadow: 0 4px 14px rgba(30,158,140,.12); }
.wace-upsell-card.added { border-color: #1E9E8C; background: #f0faf8; }
.wace-upsell-img {
  height: 80px; background: #F7F8FA;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; border-bottom: 1px solid #E4E8EF;
  position: relative; overflow: hidden;
}
.wace-upsell-img img { width: 100%; height: 100%; object-fit: cover; }
.wace-upsell-disc-badge {
  position: absolute; top: 5px; right: 5px;
  background: #B83226; color: #fff;
  font-size: 9px; font-weight: 900;
  padding: 2px 6px; border-radius: 20px;
}
.wace-upsell-body { padding: 8px 9px 10px; }
.wace-upsell-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .75rem; font-weight: 700;
  color: #1A2744; line-height: 1.35; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.wace-upsell-price {
  font-size: .8rem; font-weight: 900;
  color: #1A2744; margin-bottom: 7px;
  font-family: 'Playfair Display', Georgia, serif;
}
.wace-upsell-orig {
  font-size: .7rem; color: #3A4A60;
  text-decoration: line-through; font-weight: 400;
}
.wace-upsell-btn {
  width: 100%; padding: 6px 0;
  border-radius: 7px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 11px;
  background: #1E9E8C; color: #fff; transition: background .18s;
}
.wace-upsell-btn:hover { background: #167d6d; }
.wace-upsell-card.added .wace-upsell-btn { background: #167d6d; }

/* Options (pago / entrega) */
.wace-options { display: flex; flex-direction: column; gap: 8px; }
.wace-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid #E4E8EF;
  border-radius: 10px; cursor: pointer; transition: all .18s;
}
.wace-opt:hover { border-color: #1E9E8C; background: #f0faf8; }
.wace-opt.selected { border-color: #1E9E8C; background: #f0faf8; }
.wace-opt input[type=radio] { accent-color: #1E9E8C; width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.wace-opt-icon { font-size: 20px; }
.wace-opt-label { flex: 1; min-width: 0; }
.wace-opt-label strong { font-size: 14px; font-weight: 700; color: #1A2744; display: block; }
.wace-opt-label span { font-size: 12px; color: #3A4A60; }
.wace-delivery-price { font-weight: 900; font-size: 14px; color: #1A2744; flex-shrink: 0; padding-top: 1px; }

/* Form */
.wace-form-section {}
.wace-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wace-form-row.wace-full { grid-template-columns: 1fr; }
.wace-field { display: flex; flex-direction: column; gap: 5px; }
.wace-field label { font-size: 12px; font-weight: 700; color: #3A4A60; }
.wace-field input {
  padding: 11px 14px;
  border: 1.5px solid #E4E8EF; border-radius: 9px;
  font-family: 'Inter', sans-serif; font-size: 14px; color: #1A2744;
  background: #fff; outline: none; transition: border-color .18s, box-shadow .18s;
}
.wace-field input:focus { border-color: #1E9E8C; box-shadow: 0 0 0 3px rgba(30,158,140,.12); }

/* Custom select */
.wace-custom-select { position: relative; }
.wace-cs-trigger {
  width: 100%; padding: 11px 36px 11px 14px;
  border: 1.5px solid #E4E8EF; border-radius: 9px;
  font-family: 'Inter', sans-serif; font-size: 14px; color: #1A2744;
  background: #fff; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color .18s;
}
.wace-cs-trigger svg { flex-shrink: 0; transition: transform .2s; color: #3A4A60; }
.wace-custom-select.open .wace-cs-trigger { border-color: #1E9E8C; box-shadow: 0 0 0 3px rgba(30,158,140,.12); }
.wace-custom-select.open .wace-cs-trigger svg { transform: rotate(180deg); }
.wace-cs-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1.5px solid #E4E8EF; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(26,39,68,.13); z-index: 100; display: none;
}
.wace-custom-select.open .wace-cs-dropdown { display: block; }
.wace-cs-search {
  padding: 10px 12px; border-bottom: 1px solid #E4E8EF;
  display: flex; align-items: center; gap: 8px;
}
.wace-cs-search-input { border: none; outline: none; font-family: 'Inter', sans-serif; font-size: 13px; color: #1A2744; width: 100%; }
.wace-cs-list { max-height: 200px; overflow-y: auto; padding: 4px 0; }
.wace-cs-list::-webkit-scrollbar { width: 4px; }
.wace-cs-list::-webkit-scrollbar-thumb { background: #E4E8EF; border-radius: 4px; }
.wace-cs-group { padding: 8px 14px 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1E9E8C; }
.wace-cs-option { padding: 8px 14px 8px 22px; font-size: 13px; color: #1A2744; cursor: pointer; transition: background .12s; }
.wace-cs-option.solo { padding-left: 14px; font-weight: 600; }
.wace-cs-option:hover { background: #f0faf8; color: #1E9E8C; }
.wace-cs-option.selected { background: #e6f7f4; color: #1E9E8C; font-weight: 700; }
.wace-cs-option.hidden { display: none; }

/* Gift wrap */
.wace-gift-wrap-row {}
.wace-gift-wrap-label {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px dashed #E4E8EF; border-radius: 12px;
  cursor: pointer; transition: all .2s; background: #fff;
}
.wace-gift-wrap-label:hover { border-color: #1E9E8C; background: #f0faf8; }
.wace-gift-wrap-label.checked { border-color: #1E9E8C; border-style: solid; background: #f0faf8; }
.wace-gift-wrap-label input { display: none; }
.wace-gift-check-box {
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid #E4E8EF; background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .18s; font-size: 13px; color: #fff;
}
.wace-gift-wrap-label.checked .wace-gift-check-box { background: #1E9E8C; border-color: #1E9E8C; }
.wace-gift-icon { font-size: 26px; flex-shrink: 0; }
.wace-gift-info { flex: 1; }
.wace-gift-info strong { font-size: 14px; font-weight: 700; color: #1A2744; display: block; }
.wace-gift-info span { font-size: 12px; color: #3A4A60; }
.wace-gift-price { font-weight: 900; font-size: 14px; color: #1E9E8C; flex-shrink: 0; }

/* Total */
.wace-total-box {
  background: #F7F8FA; border-radius: 12px;
  border: 1px solid #E4E8EF; padding: 16px 18px;
}
.wace-total-row {
  display: flex; justify-content: space-between;
  font-size: 14px; color: #3A4A60; padding: 5px 0;
}
.wace-total-row.wace-total-main {
  font-size: 16px; font-weight: 900; color: #1A2744;
  border-top: 1px solid #E4E8EF; margin-top: 8px; padding-top: 12px;
}
.wace-total-row.wace-total-main span:last-child {
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem;
}

/* Realizar pedido */
.wace-btn-order {
  width: calc(100% + 64px);
  margin: 0 -32px -80px;
  padding: 18px;
  border-radius: 0 0 20px 20px;
  border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 900; font-size: 16px;
  letter-spacing: .02em;
  background: #1E9E8C; color: #fff;
  box-shadow: 0 6px 20px rgba(30,158,140,.32);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: sticky; bottom: 0; z-index: 3;
  transition: background .22s ease;
}
.wace-btn-order:hover { background: #167d6d; }

/* ETA estimada (en opciones de entrega) */
@keyframes wace-eta-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wace-eta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,134,11,.3); }
  50%       { box-shadow: 0 0 0 6px rgba(184,134,11,.0); }
}

.wace-eta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 6px 11px;
  background: #FFFDE7;
  border: 1px solid #F9D64A;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #856404;
  line-height: 1.4;
  animation: wace-eta-in .35s ease both, wace-eta-pulse 2s ease 0.4s 2;
}
.wace-eta svg { flex-shrink: 0; color: #B8860B; }

/* ETA resumen debajo del total */
@keyframes wace-eta-sum-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wace-eta-sum-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,134,11,.3); }
  50%       { box-shadow: 0 0 0 8px rgba(184,134,11,.0); }
}
.wace-eta-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #FFFDE7;
  border: 1px solid #F9D64A;
  border-radius: 12px;
  animation: wace-eta-sum-in .35s ease both, wace-eta-sum-pulse 2s ease .4s 2;
}
.wace-eta-summary-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #FFF3CD;
  border: 1px solid #F9D64A;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #B8860B;
}
.wace-eta-summary-text { flex: 1; }
.wace-eta-summary-label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 2px;
}
.wace-eta-summary-value {
  display: block;
  font-family: Georgia, serif;
  font-size: .95rem; font-weight: 700;
  color: #856404; line-height: 1.3;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .wace-form-row { grid-template-columns: 1fr; }
  .wace-modal-body { padding: 20px 18px 80px; }
  .wace-btn-order { width: calc(100% + 36px); margin: 0 -18px -80px; }
}
