/* DeAza — Carrito + Admin page styles */

/* Carrito */
.cart-page {
  background: var(--dz-bg);
  min-height: 60vh;
  padding: 24px 0 40px;
}
.cart-page .layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.cart-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.4px;
  margin: 0 0 4px;
}
.cart-subtitle { color: var(--dz-muted); font-size: 13px; margin-bottom: 20px; }

.cart-progress {
  background: var(--dz-gold-tint);
  border: 1px solid rgba(201,162,74,0.3);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.cart-progress.complete {
  background: var(--dz-green-tint);
  border-color: rgba(21,128,61,0.25);
  color: var(--dz-green);
  font-weight: 700;
  font-size: 13px;
}
.cart-progress .text {
  font-size: 12px; font-weight: 700; color: var(--dz-amber); margin-bottom: 8px;
}
.cart-progress .bar {
  height: 5px; background: rgba(180,83,9,0.15);
  border-radius: 99px; overflow: hidden;
}
.cart-progress .fill {
  height: 100%; background: var(--dz-gold); border-radius: 99px;
  transition: width 0.3s;
}

.cart-empty {
  background: white;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  padding: 48px 24px;
  text-align: center;
}
.cart-empty .icon { font-size: 64px; margin-bottom: 12px; }
.cart-empty h3 { font-size: 18px; margin: 0 0 8px; }
.cart-empty p { color: var(--dz-muted); margin: 0 0 20px; font-size: 13px; }

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-item {
  background: white;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}
.cart-item .img {
  aspect-ratio: 1;
  background: repeating-linear-gradient(135deg, #F0F4F9, #F0F4F9 10px, #E5EAF2 10px, #E5EAF2 20px);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 9px; color: var(--dz-muted);
  font-family: ui-monospace, monospace; padding: 6px; text-align: center;
}
.cart-item .info { min-width: 0; }
.cart-item .brand { font-size: 10px; font-weight: 700; color: var(--dz-muted); letter-spacing: 0.4px; text-transform: uppercase; }
.cart-item .name { font-size: 13px; font-weight: 700; margin: 2px 0 4px; line-height: 1.3; }
.cart-item .stock { font-size: 11px; color: var(--dz-green); font-weight: 700; }
.cart-item .actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.cart-item .qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--dz-border); border-radius: 8px; overflow: hidden;
}
.cart-item .qty button {
  background: white; border: none;
  width: 32px; height: 32px;
  font-size: 14px; font-weight: 800; color: var(--dz-ink);
}
.cart-item .qty button:hover { background: var(--dz-blue-soft); }
.cart-item .qty .v { width: 32px; text-align: center; font-size: 13px; font-weight: 700; }
.cart-item .price-col { text-align: right; }
.cart-item .price-col .was { font-size: 10px; color: var(--dz-muted); text-decoration: line-through; }
.cart-item .price-col .now { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.cart-item .remove {
  background: transparent; border: none; color: var(--dz-muted);
  font-size: 11px; padding: 0; margin-top: 4px; font-family: inherit;
}
.cart-item .remove:hover { color: var(--dz-red); text-decoration: underline; }

@media (min-width: 768px) {
  .cart-page { padding: 36px 0 60px; }
  .cart-page .layout {
    grid-template-columns: 1fr 380px;
    gap: 28px;
  }
  .cart-title { font-size: 32px; }
  .cart-item { grid-template-columns: 130px 1fr 180px; padding: 18px; }
  .cart-item .img { aspect-ratio: 1; font-size: 10px; }
  .cart-item .price-col { text-align: right; padding-top: 4px; }
  .cart-item .price-col .now { font-size: 20px; }
  .cart-item .actions { margin-top: 12px; }
}

/* Coupon */
.coupon-box {
  background: white;
  border: 1px dashed var(--dz-gold);
  border-radius: var(--dz-radius);
  padding: 14px;
}
.coupon-box .label {
  font-size: 11px; font-weight: 800; color: var(--dz-gold);
  letter-spacing: 0.6px; margin-bottom: 8px;
}
.coupon-box .row { display: flex; gap: 8px; }
.coupon-box input {
  flex: 1; height: 38px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--dz-border);
  outline: none; font-size: 13px; text-transform: uppercase;
}
.coupon-box input:focus { border-color: var(--dz-blue); }
.coupon-box .help { font-size: 10px; color: var(--dz-muted); margin-top: 6px; }
.coupon-applied {
  display: flex; justify-content: space-between; align-items: center;
}
.coupon-applied .code {
  font-size: 14px; font-weight: 800; color: var(--dz-green);
  font-family: ui-monospace, monospace;
}
.coupon-applied .meta { font-size: 11px; color: var(--dz-muted); }
.coupon-applied .remove {
  background: transparent; border: none; color: var(--dz-red);
  font-size: 11px; font-weight: 700;
}
.coupon-msg { margin-top: 6px; font-size: 11px; font-weight: 700; }
.coupon-msg.ok { color: var(--dz-green); }
.coupon-msg.err { color: var(--dz-red); }

/* Summary */
.cart-summary {
  background: white;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  padding: 18px;
  position: sticky;
  top: 16px;
}
.cart-summary h3 {
  font-size: 16px; font-weight: 800; margin: 0 0 14px;
}
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 6px 0;
}
.summary-row.muted { color: var(--dz-muted); }
.summary-row.green { color: var(--dz-green); font-weight: 700; }
.summary-row.gold { color: var(--dz-gold-dark); font-weight: 700; }
.summary-row.total {
  font-size: 14px; font-weight: 800;
  border-top: 1px solid var(--dz-border);
  padding-top: 14px; margin-top: 8px;
  align-items: baseline;
}
.summary-row.total .num {
  font-size: 24px; letter-spacing: -0.5px;
}
.cart-summary .cuotas {
  font-size: 11px; color: var(--dz-muted);
  text-align: right; margin-top: 2px;
}
.cart-summary .checkout-btn { margin-top: 16px; }
.cart-summary .secure {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: 11px; color: var(--dz-muted);
  margin-top: 10px;
}

/* ───── Welcome popup ───── */
.dz-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,14,46,0.7);
  z-index: 1500;
  display: none;
  place-items: center;
  padding: 16px;
}
.dz-popup-overlay.open { display: grid; }
.dz-popup {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  position: relative;
  animation: dz-popup-in 0.3s;
}
@keyframes dz-popup-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.dz-popup .close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  display: grid; place-items: center;
  z-index: 2;
}
.dz-popup .close:hover { background: rgba(255,255,255,0.35); }
.dz-popup .top {
  background: linear-gradient(135deg, var(--dz-blue-darker), var(--dz-blue));
  color: white;
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
}
.dz-popup .top .gift { font-size: 56px; margin-bottom: 8px; }
.dz-popup .top h2 {
  font-size: 22px; font-weight: 800; margin: 0 0 6px;
  letter-spacing: -0.4px;
}
.dz-popup .top p { font-size: 13px; opacity: 0.85; margin: 0; }
.dz-popup .top .pct {
  display: inline-block;
  background: var(--dz-gold);
  color: var(--dz-blue-darker);
  font-size: 32px;
  font-weight: 900;
  padding: 6px 18px;
  border-radius: 10px;
  letter-spacing: -1px;
  margin: 14px 0 6px;
}
.dz-popup .body { padding: 24px; }
.dz-popup .body p { font-size: 13px; color: var(--dz-muted); margin: 0 0 16px; }
.dz-popup .body input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--dz-border);
  outline: none;
  font-size: 14px;
  margin-bottom: 10px;
}
.dz-popup .body input:focus { border-color: var(--dz-blue); }
.dz-popup .legal {
  font-size: 11px; color: var(--dz-muted);
  text-align: center; margin-top: 14px; line-height: 1.5;
}
.dz-popup .skip {
  background: transparent; border: none; color: var(--dz-muted);
  font-size: 11px; padding: 8px;
}
.dz-popup .skip:hover { color: var(--dz-blue); text-decoration: underline; }

/* Admin */
.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  background: var(--dz-bg);
}
.admin-side {
  background: var(--dz-blue-darker);
  color: white;
  padding: 12px 8px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-side .logo {
  display: none;
  padding: 0 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
}
.admin-side .logo img { height: 28px; width: auto; }
.admin-side .lbl { display: none; }
.admin-side button {
  background: transparent; border: none;
  color: rgba(255,255,255,0.75);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-side button:hover { background: rgba(255,255,255,0.06); color: white; }
.admin-side button.active { background: var(--dz-gold); color: var(--dz-blue-darker); font-weight: 800; }
.admin-side button .badge {
  background: var(--dz-red);
  color: white;
  font-size: 9px;
  font-weight: 800;
  border-radius: 99px;
  padding: 1px 6px;
}
.admin-main {
  padding: 20px 16px 80px;
}
.admin-greeting h1 {
  font-size: 22px; font-weight: 800;
  margin: 0 0 4px; letter-spacing: -0.4px;
}
.admin-greeting p {
  color: var(--dz-muted); font-size: 13px; margin: 0 0 20px;
}
.admin-greeting .accent { color: var(--dz-blue); font-weight: 800; }

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.admin-kpi {
  background: white;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius);
  padding: 14px;
}
.admin-kpi .lbl {
  font-size: 10px; font-weight: 800;
  color: var(--dz-muted); letter-spacing: 0.6px;
  text-transform: uppercase;
}
.admin-kpi .v { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -0.5px; }
.admin-kpi .d {
  font-size: 11px; font-weight: 700; margin-top: 2px;
}
.admin-kpi .d.up { color: var(--dz-green); }
.admin-kpi .d.down { color: var(--dz-red); }

.admin-card {
  background: white;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.admin-card .head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.admin-card h3 { font-size: 15px; font-weight: 800; margin: 0; }
.admin-card a.see-all {
  font-size: 12px; color: var(--dz-blue); font-weight: 700;
}

.order-row {
  padding: 12px 0;
  border-top: 1px solid var(--dz-border-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.order-row:first-child { border-top: none; padding-top: 0; }
.order-row .id {
  font-size: 12px; font-weight: 700;
  font-family: ui-monospace, monospace;
}
.order-row .cust { font-size: 11px; color: var(--dz-muted); margin-top: 2px; }
.order-row .total-col { text-align: right; }
.order-row .total-col .total { font-size: 13px; font-weight: 800; }
.order-row .status {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  margin-top: 4px;
}
.order-row .status.green { background: var(--dz-green-tint); color: var(--dz-green); }
.order-row .status.blue { background: var(--dz-blue-tint); color: var(--dz-blue); }
.order-row .status.amber { background: var(--dz-amber-tint); color: var(--dz-amber); }

.bestseller {
  margin-bottom: 14px;
}
.bestseller .row {
  display: flex; justify-content: space-between;
  font-size: 12px; margin-bottom: 6px;
}
.bestseller .name { font-weight: 700; }
.bestseller .meta { color: var(--dz-muted); font-weight: 700; }
.bestseller .meta strong { color: var(--dz-ink); }
.bestseller .bar {
  height: 6px; background: var(--dz-border);
  border-radius: 99px; overflow: hidden;
}
.bestseller .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dz-blue), var(--dz-blue-accent));
  border-radius: 99px;
}

.admin-alert {
  background: oklch(0.97 0.04 25);
  border: 1px solid oklch(0.85 0.08 25);
  border-radius: var(--dz-radius-lg);
  padding: 16px;
}
.admin-alert .head {
  font-size: 13px; font-weight: 800; color: var(--dz-red);
  margin-bottom: 10px;
}
.admin-alert .row {
  display: flex; justify-content: space-between;
  font-size: 12px; padding: 4px 0;
}
.admin-alert .row .name { color: var(--dz-ink); font-weight: 600; }
.admin-alert .row .stock { color: var(--dz-red); font-weight: 800; }

@media (min-width: 768px) {
  .admin-shell { grid-template-columns: 240px 1fr; }
  .admin-side {
    padding: 24px 16px;
    flex-direction: column;
    overflow: visible;
    gap: 4px;
    border-right: 1px solid rgba(255,255,255,0.08);
    min-height: 100vh;
  }
  .admin-side .logo { display: block; }
  .admin-side .lbl {
    display: block;
    font-size: 10px; font-weight: 800;
    color: var(--dz-gold); letter-spacing: 1.5px;
    padding: 0 12px 12px;
  }
  .admin-side button {
    padding: 12px;
    text-align: left;
    font-size: 13px;
  }
  .admin-main { padding: 32px 32px 60px; }
  .admin-greeting h1 { font-size: 28px; }
  .admin-kpis { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
  .admin-kpi { padding: 18px; }
  .admin-kpi .v { font-size: 26px; }
  .admin-card { padding: 24px; margin-bottom: 20px; }
  .admin-card h3 { font-size: 17px; }
  .admin-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
  }
}
