/* ==========================================================================
   Cesta — estilos. Cambia solo las variables para adaptarla a tu marca.
   ========================================================================== */
:root {
  --cesta-bg: #fbf8f2;
  --cesta-ink: #0d1b2a;
  --cesta-muted: #5d6b78;
  --cesta-line: rgba(13, 27, 42, .1);
  --cesta-accent: #ff6b2c;
  --cesta-accent-ink: #ffffff;
  --cesta-soft: #eef2f4;
  --cesta-radius: 16px;
  --cesta-font: inherit;
  --cesta-font-display: inherit;
  --cesta-width: 440px;
}

.cesta-lock, .cesta-lock body { overflow: hidden; }
.cesta { position: fixed; inset: 0; z-index: 1000; pointer-events: none; font-family: var(--cesta-font); }
.cesta.is-open { pointer-events: auto; }
.cesta-veil { position: absolute; inset: 0; background: rgba(5, 12, 20, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .4s; }
.cesta.is-open .cesta-veil { opacity: 1; }
.cesta-panel {
  position: absolute; min-width: 0; overflow-x: hidden; top: 0; right: 0; bottom: 0; width: min(100%, var(--cesta-width));
  display: flex; flex-direction: column; background: var(--cesta-bg); color: var(--cesta-ink);
  transform: translateX(100%); transition: transform .55s cubic-bezier(.2, .8, .1, 1), box-shadow .55s; outline: none;
}
.cesta.is-open .cesta-panel { transform: none; box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .35); }

.cesta-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--cesta-line); }
.cesta-head h2 { font-family: var(--cesta-font-display); font-size: 1.5rem; font-weight: 500; line-height: 1; }
.cesta-n { color: var(--cesta-muted); font-size: .8em; }
.cesta-x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cesta-line); background: none; color: inherit; cursor: pointer; transition: transform .3s, background .3s; }
.cesta-x:hover { transform: rotate(90deg); background: var(--cesta-soft); }

.cesta-body { flex: 1; min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 18px 24px 24px; overscroll-behavior: contain; }
.cesta-foot { padding: 18px 24px 24px; border-top: 1px solid var(--cesta-line); background: var(--cesta-bg); }
.cesta-foot:empty { display: none; }

.cesta-ship { padding: 14px 16px; border-radius: 12px; background: var(--cesta-soft); margin-bottom: 18px; font-size: .88rem; }
.cesta-ship b { color: var(--cesta-accent); }
.cesta-ship-bar { height: 5px; border-radius: 9px; background: var(--cesta-line); margin-top: 10px; overflow: hidden; }
.cesta-ship-bar span { display: block; height: 100%; background: var(--cesta-accent); border-radius: inherit; transition: width .6s cubic-bezier(.2, .8, .1, 1); }

.cesta-list { list-style: none; margin: 0; padding: 0; }
.cesta-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--cesta-line); animation: cesta-in .45s cubic-bezier(.2, .8, .1, 1); transition: opacity .2s, transform .2s; }
.cesta-item.is-out { opacity: 0; transform: translateX(30px); }
@keyframes cesta-in { from { opacity: 0; transform: translateY(8px); } }
.cesta-thumb { aspect-ratio: 1; border-radius: 12px; background: var(--cesta-soft); display: grid; place-items: center; padding: 8px; overflow: hidden; }
.cesta-thumb > * { width: 100%; height: auto; max-height: 100%; object-fit: contain; display: block; }
.cesta-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cesta-info b { font-weight: 600; font-size: .98rem; line-height: 1.25; }
.cesta-info > span { color: var(--cesta-muted); font-size: .8rem; }
.cesta-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.cesta-qty { display: inline-flex; align-items: center; border: 1px solid var(--cesta-line); border-radius: 999px; }
.cesta-qty button { width: 32px; height: 32px; border: 0; background: none; color: inherit; font-size: 1.05rem; cursor: pointer; border-radius: 50%; }
.cesta-qty button:hover { background: var(--cesta-soft); }
.cesta-qty output { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }
.cesta-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.cesta-rm { align-self: flex-start; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--cesta-muted); font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cesta-rm:hover { color: var(--cesta-ink); }

.cesta-ups { margin-top: 22px; }
.cesta-ups > span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cesta-muted); margin-bottom: 10px; }
.cesta-ups-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px dashed var(--cesta-line); border-radius: 12px; }
.cesta-ups-item b { display: block; font-size: .86rem; font-weight: 600; }
.cesta-ups-item span { font-size: .8rem; color: var(--cesta-muted); }

.cesta-gift { display: flex; gap: 10px; align-items: center; margin-top: 20px; font-size: .88rem; cursor: pointer; }
.cesta-gift input { accent-color: var(--cesta-accent); width: 18px; height: 18px; }
.cesta-note { width: 100%; margin-top: 10px; min-height: 80px; padding: 12px; border-radius: 12px; border: 1px solid var(--cesta-line); background: transparent; color: inherit; font: inherit; font-size: .9rem; resize: vertical; }

.cesta-totals { margin: 0 0 16px; }
.cesta-totals div { display: flex; justify-content: space-between; padding: 3px 0; font-size: .9rem; color: var(--cesta-muted); }
.cesta-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.cesta-totals .cesta-total { color: var(--cesta-ink); font-weight: 600; font-size: 1.05rem; padding-top: 8px; }

.cesta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 13px 22px; border: 0; border-radius: 999px;
  background: var(--cesta-ink); color: var(--cesta-bg); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: transform .25s, background .25s;
}
.cesta-btn:hover { transform: translateY(-1px); }
.cesta-btn-sm { padding: 8px 14px; font-size: .8rem; }
.cesta-btn-xl { width: 100%; justify-content: space-between; padding: 18px 26px; background: var(--cesta-accent); color: var(--cesta-accent-ink); font-size: 1rem; }
.cesta-btn-xl span { opacity: .85; font-variant-numeric: tabular-nums; }

.cesta-empty { text-align: center; padding: 48px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cesta-empty svg { width: 110px; color: var(--cesta-muted); margin-bottom: 10px; }
.cesta-empty h3 { font-family: var(--cesta-font-display); font-size: 1.4rem; font-weight: 500; }
.cesta-empty p { color: var(--cesta-muted); font-size: .92rem; max-width: 280px; margin-bottom: 14px; }
.cesta-done svg { color: var(--cesta-accent); width: 80px; }
.cesta-check { stroke-dasharray: 60; stroke-dashoffset: 60; animation: cesta-draw .7s .2s cubic-bezier(.2, .8, .1, 1) forwards; }
@keyframes cesta-draw { to { stroke-dashoffset: 0; } }
.cesta-done code { font-size: .85rem; padding: 6px 12px; border-radius: 8px; background: var(--cesta-soft); margin-bottom: 14px; }

.cesta-back { border: 0; background: none; color: var(--cesta-muted); font: inherit; font-size: .85rem; cursor: pointer; padding: 0; margin-bottom: 16px; }
.cesta-form { display: flex; flex-direction: column; gap: 12px; }
.cesta-form label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; color: var(--cesta-muted); min-width: 0; }
.cesta-form input { width: 100%; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--cesta-line); background: transparent; color: var(--cesta-ink); font: inherit; font-size: .95rem; }
.cesta-form input:focus { outline: 2px solid var(--cesta-accent); outline-offset: 0; border-color: transparent; }
.cesta-form input.is-bad { border-color: #d64545; }
.cesta-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.cesta-demo { font-size: .76rem; color: var(--cesta-muted); }
.cesta-mini { list-style: none; padding: 14px 0 0; margin: 16px 0 0; border-top: 1px solid var(--cesta-line); font-size: .85rem; }
.cesta-mini li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }

.cesta-fly { position: fixed; z-index: 1001; width: 14px; height: 14px; border-radius: 50%; background: var(--cesta-accent); pointer-events: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .5); }
[data-cesta-count].is-bump { animation: cesta-bump .5s cubic-bezier(.2, .8, .1, 1); }
@keyframes cesta-bump { 40% { transform: scale(1.4); } }
.cesta-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  .cesta-panel, .cesta-veil, .cesta-item { transition: none; animation: none; }
}
