/* =====================================================
   carrito.css — Me Visto Como Quiero
   Shopping cart page styles
   ===================================================== */

.carrito-page {
  padding-top: var(--site-nav-height, 78px);
  background: #faf8f6;
  min-height: 100vh;
}

/* ── Top bar ── */
.carrito-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(88, 62, 49, 0.08);
  padding: 1.2rem 0 1rem;
}
.carrito-topbar .breadcrumb {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.carrito-topbar .breadcrumb a {
  color: #7a2b3b;
  text-decoration: none;
}
.carrito-page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.1;
  margin: 0;
}
.carrito-page-count {
  font-size: 0.82rem;
  color: #999;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* ── Layout ── */
.carrito-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  padding: 2.5rem 0 5rem;
  align-items: start;
}

/* ── Items section ── */
.carrito-items-section {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.carrito-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(88, 62, 49, 0.08);
}
.carrito-items-header h2 {
  font-family: 'Staatliches', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2c1a14;
  margin: 0;
}
.carrito-clear-btn {
  border: none;
  background: none;
  color: #c0392b;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.carrito-clear-btn:hover {
  background: rgba(192, 57, 43, 0.07);
}

/* ── Cart item ── */
.carrito-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(88, 62, 49, 0.07);
  transition: background 0.15s;
}
.carrito-item-bottom {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.carrito-item:last-child { border-bottom: none; }
.carrito-item:hover { background: rgba(250, 248, 246, 0.7); }

.item-img-wrap {
  width: 88px;
  height: 110px;
  border-radius: 6px;
  overflow: hidden;
  background: #f2edea;
  flex-shrink: 0;
}
.item-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-info {
  min-width: 0;
}
.item-cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a0a0a0;
  display: block;
  margin-bottom: 3px;
}
.item-nombre {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-variante {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(88, 62, 49, 0.07);
  font-size: 0.72rem;
  font-weight: 700;
  color: #4b2319;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.item-remove {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: #bbb;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.item-remove:hover { color: #c0392b; }
.item-remove i { font-size: 0.68rem; }

/* ── Quantity stepper ── */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0d8d2;
  border-radius: 8px;
  overflow: hidden;
  height: 40px;
  flex-shrink: 0;
}
.qty-btn {
  width: 36px;
  height: 40px;
  border: none;
  background: none;
  color: #555;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.qty-btn:hover:not(:disabled) { background: rgba(88, 62, 49, 0.07); color: #7a2b3b; }
.qty-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.qty-val {
  width: 36px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  border-left: 1px solid #e0d8d2;
  border-right: 1px solid #e0d8d2;
  line-height: 40px;
  flex-shrink: 0;
  user-select: none;
}

/* ── Item price ── */
.item-precio-col {
  text-align: right;
  flex-shrink: 0;
  min-width: 80px;
}
.item-precio-unit {
  font-size: 0.72rem;
  color: #bbb;
  display: block;
  margin-bottom: 2px;
}
.item-precio-total {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* ── Empty state ── */
.carrito-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  gap: 0.75rem;
}
.carrito-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(122, 43, 59, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #7a2b3b;
  margin-bottom: 0.5rem;
}
.carrito-empty h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #2c1a14;
  margin: 0;
}
.carrito-empty p {
  color: #999;
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.65;
}
.btn-ir-productos {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.8rem;
  background: #1a1a1a;
  color: #fff;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s;
}
.btn-ir-productos:hover { background: #7a2b3b; color: #fff; }

/* ── Order summary ── */
.carrito-resumen {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  overflow: hidden;
  position: sticky;
  top: calc(var(--site-nav-height, 78px) + 2rem);
}
.resumen-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(88, 62, 49, 0.08);
}
.resumen-header h3 {
  font-family: 'Staatliches', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2c1a14;
  margin: 0;
}

.resumen-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.resumen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #555;
}
.resumen-row-label { font-weight: 500; }
.resumen-row-val { font-weight: 600; color: #1a1a1a; }
.resumen-row--envio .resumen-row-val { color: #00a650; }
.resumen-row--descuento .resumen-row-val { color: #7a2b3b; }

.resumen-divider {
  border: none;
  border-top: 1px solid rgba(88, 62, 49, 0.1);
  margin: 0.2rem 0;
}
.resumen-row--total {
  font-size: 1rem;
  color: #1a1a1a;
}
.resumen-row--total .resumen-row-label { font-weight: 700; }
.resumen-row--total .resumen-row-val { font-size: 1.3rem; font-weight: 800; }

.resumen-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #7a2b3b 0%, #a33d52 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(122, 43, 59, 0.28);
  transition: box-shadow 0.25s, transform 0.15s;
  text-decoration: none;
}
.btn-checkout:hover {
  box-shadow: 0 6px 24px rgba(122, 43, 59, 0.4);
  transform: translateY(-1px);
  color: #fff;
}
.btn-checkout:active { transform: translateY(0); }
.btn-checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.resumen-cuotas {
  text-align: center;
  font-size: 0.78rem;
  color: #888;
}
.resumen-cuotas strong { color: #1a1a1a; }

.resumen-trust {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1.5rem;
  border-top: 1px solid rgba(88, 62, 49, 0.07);
  background: rgba(250, 248, 246, 0.5);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #777;
}
.trust-item i { color: #7a2b3b; font-size: 0.8rem; width: 14px; flex-shrink: 0; }

.seguir-comprando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #7a2b3b;
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem;
  transition: gap 0.2s;
}
.seguir-comprando:hover { gap: 0.7rem; color: #7a2b3b; }

/* ── Coupon section ── */
.resumen-cupon {
  padding: 0 1.5rem 0.5rem;
}
.cupon-form {
  display: flex;
  gap: 6px;
}
.cupon-input {
  flex: 1;
  border: 1.5px solid rgba(88, 62, 49, 0.18);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  color: #2c1a14;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.cupon-input::placeholder { color: #bbb; }
.cupon-input:focus { border-color: #7a2b3b; }
.cupon-apply-btn {
  padding: 0.5rem 0.9rem;
  border: 1.5px solid #7a2b3b;
  border-radius: 6px;
  background: transparent;
  color: #7a2b3b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.cupon-apply-btn:hover { background: #7a2b3b; color: #fff; }
.cupon-msg {
  font-size: 0.75rem;
  margin-top: 5px;
  font-weight: 600;
}
.cupon-msg--ok { color: #00a650; }
.cupon-msg--err { color: #c0392b; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .carrito-layout {
    grid-template-columns: 1fr;
  }
  .carrito-resumen {
    position: static;
  }
}

@media (max-width: 600px) {
  .carrito-item {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
    padding: 1rem;
    gap: 0.75rem;
  }
  .item-img-wrap {
    width: 72px;
    height: 90px;
    grid-row: 1 / 3;
  }
  .item-info { grid-column: 2; }
  .carrito-item-bottom {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .item-precio-col { text-align: left; }
  .carrito-page-title { font-size: 1.5rem; }
}

/* ── Toast stack (reused from productos) ── */
.toast-stack {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.55rem;
  pointer-events: none;
}
.toast-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.82rem 1.2rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transform: translateX(calc(100% + 2.5rem));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  max-width: 320px;
  white-space: nowrap;
}
.toast-item.is-visible { transform: translateX(0); }
.toast-item--success { background: #1a1a1a; color: #fff; }
.toast-item--info    { background: #2d4480; color: #fff; }
.toast-item--warn    { background: #c07000; color: #fff; }
.toast-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.72rem;
}
@media (max-width: 576px) {
  .toast-stack { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast-item { max-width: 100%; white-space: normal; }
}
