/* =========================
   VARIABLES
========================= */
:root {
  --cec-primary: #24306c;
  --cec-primary-light: #2f3ea5;
  --cec-bg: #f5f7fb;
  --cec-card: #ffffff;
  --cec-border: #e4e7ec;
  --cec-text: #1d2939;
  --cec-muted: #667085;
  --cec-success: #12b76a;
  --cec-error: #f04438;
  --cec-warning: #f79009;

  --cec-radius: 12px;
  --cec-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* =========================
   BASE
========================= */
.cec-cart-page {
  background: var(--cec-bg);
  min-height: 100vh;
  padding: 30px 20px;
}

.cec-cart-shell {
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================
   STEPPER
========================= */
.cec-stepper-card {
  background: var(--cec-card);
  border-radius: var(--cec-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--cec-shadow);
}

.cec-stepper {
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.cec-step {
  flex: 1;
  text-align: center;
  color: var(--cec-muted);
}

.cec-step span {
  display: inline-block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d0d5dd;
  color: white;
  line-height: 34px;
  font-weight: bold;
}

.cec-step.active span {
  background: var(--cec-primary);
}

.cec-step.active {
  color: var(--cec-primary);
}

/* =========================
   HEADER
========================= */
.cec-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.cec-cart-header h1 {
  margin: 5px 0;
  font-size: 28px;
  color: var(--cec-text);
}

.cec-cart-header p {
  color: var(--cec-muted);
}

.cec-cart-back {
  text-decoration: none;
  color: var(--cec-primary);
  font-weight: 600;
}

/* =========================
   GRID
========================= */
.cec-cart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* =========================
   LISTA
========================= */
.cec-cart-list-card {
  background: var(--cec-card);
  border-radius: var(--cec-radius);
  padding: 20px;
  box-shadow: var(--cec-shadow);
}

/* ITEM */
.cec-cart-item {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--cec-border);
}

.cec-cart-item:last-child {
  border-bottom: none;
}

.cec-cart-item-info h3 {
  margin: 0;
  font-size: 18px;
  color: var(--cec-text);
}

.cec-cart-item-info p {
  margin: 4px 0;
  color: var(--cec-muted);
}

.cec-cart-meta {
  font-weight: 600;
  margin-top: 6px;
}

/* acciones */
.cec-cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* cantidad */
.cec-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cec-qty button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--cec-border);
  background: white;
  cursor: pointer;
}

.cec-qty button:hover {
  background: #f2f4f7;
}

/* eliminar */
.cec-remove {
  background: none;
  border: none;
  color: var(--cec-error);
  cursor: pointer;
  font-size: 13px;
}

/* =========================
   EMPTY
========================= */
.cec-cart-empty {
  text-align: center;
  padding: 40px 20px;
}

.cec-cart-empty-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

/* =========================
   SUMMARY
========================= */
.cec-cart-summary-card {
  background: var(--cec-card);
  border-radius: var(--cec-radius);
  padding: 20px;
  box-shadow: var(--cec-shadow);
  position: sticky;
  top: 20px;
}

.cec-summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cec-summary-line.total {
  font-size: 18px;
  font-weight: bold;
  margin-top: 15px;
}

.cec-summary-note {
  font-size: 13px;
  color: var(--cec-muted);
  margin: 10px 0 20px;
}

/* =========================
   BOTONES
========================= */
.cec-btn-primary {
  width: 100%;
  background: var(--cec-primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--cec-radius);
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.cec-btn-primary:hover {
  background: var(--cec-primary-light);
}

.cec-btn-outline {
  border: 1px solid var(--cec-border);
  padding: 10px 14px;
  border-radius: var(--cec-radius);
  background: white;
  cursor: pointer;
}

.cec-btn-outline.danger {
  color: var(--cec-error);
  border-color: var(--cec-error);
}

/* =========================
   ALERTS
========================= */
.cec-alert {
  padding: 12px;
  border-radius: var(--cec-radius);
  margin-bottom: 15px;
}

.cec-alert.error {
  background: #fde2e1;
  color: var(--cec-error);
}

.cec-alert.success {
  background: #e7f8f0;
  color: var(--cec-success);
}

.cec-alert.warning {
  background: #fff4e5;
  color: var(--cec-warning);
}

.cec-hidden {
  display: none;
}

/* =========================
   STATUS
========================= */
.cec-status-box {
  margin-top: 15px;
  font-size: 14px;
  color: var(--cec-muted);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .cec-cart-grid {
    grid-template-columns: 1fr;
  }

  .cec-cart-summary-card {
    position: static;
  }

  .cec-cart-header {
    flex-direction: column;
    gap: 10px;
  }
}