/* public/css/cart-page.css */
/* Estilo “carrito pro” (similar a la imagen) - namespaced con cp- */

.shoping-cart.cp-cart {
  background: #f5f6fb;
}

.cp-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(20, 20, 40, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.cp-card__head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cp-card__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.cp-table-wrap {
  overflow-x: auto;
}

.cp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
}

.cp-table thead th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 800;
  color: #334155;
  background: #f7f8fe;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.cp-table tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: middle;
  color: #0f172a;
}

.cp-table tbody tr:last-child td {
  border-bottom: none;
}

/* Producto cell */
.cp-prod {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.cp-prod__img {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  flex: 0 0 auto;
}

.cp-prod__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-prod__name {
  font-weight: 900;
  font-size: 18px;
  margin: 0;
  color: #0f172a;
}

.cp-prod__meta {
  display: none;
}

.cp-prod__actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-center { text-align: center; }
.cp-right  { text-align: right; }

.cp-money {
  white-space: nowrap; /* evita el bug del $ separado */
  font-weight: 800;
}

/* Qty stepper */
.cp-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.cp-qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.cp-qty-btn:hover {
  background: #eef2ff;
}

.cp-qty-input {
  width: 44px;
  height: 34px;
  border: none;
  outline: none;
  text-align: center;
  font-weight: 800;
  color: #0f172a;
}

/* Missing labels */
.cp-missing {
  color: #b45309;
  font-weight: 800;
}

/* Trash */
.cp-del {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
}
.cp-del:hover { color: #ef4444; }

/* Footer inside card */
.cp-card__foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfbff;
}

.cp-link {
  color: #64748b;
  font-weight: 700;
  text-decoration: none;
}
.cp-link:hover { color: #0f172a; text-decoration: underline; }

.cp-foot-total {
  font-size: 18px;
  color: #334155;
  font-weight: 700;
}
.cp-foot-total strong {
  font-weight: 900;
  margin-left: 6px;
  color: #0f172a;
}

/* Summary card */
.cp-summary {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(20, 20, 40, 0.10);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.cp-summary__head {
  padding: 16px 18px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  background-color: #1db190;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.cp-summary__body {
  padding: 16px 18px;
  background: linear-gradient(180deg, #1db190 0%, #158068 50%, #2f6464 100%);
  color: #e6fffb;
}

.cp-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  font-size: 16px;
}
.cp-line strong {
  color: #fff;
  font-weight: 900;
}
.cp-line--total {
  border-bottom: none;
  margin-bottom: 12px;
}

.cp-btn-main {
  font-weight: 900;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  color: #0f172a;
}

.cp-btn-wpp {
  margin-top: 10px;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
}

.cp-help {
  margin-top: 12px;
  background: rgba(255,255,255,0.88);
  color: #475569;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
/* Resumen: items list */
#cpResumenItems {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}

.cp-rsum-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.cp-rsum-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cp-rsum-name {
  color: #ffffff;
  font-weight: 900;
  line-height: 1.15;
}

.cp-rsum-qty {
  font-weight: 900;
  opacity: 0.95;
}

.cp-rsum-opts {
  color: rgba(255,255,255,0.85);
  font-weight: 650;
  font-size: 13px;
  margin-top: 2px;
}

.cp-rsum-right {
  color: #ffffff;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 991px) {
  .site-public-root .cp-cart > .container { width: 100% !important; max-width: none !important; padding-inline: 8px; }
  .cp-cart > .container > .row { margin-inline: -4px; }
  .cp-cart > .container > .row > [class*="col-"] { padding-inline: 4px; }
  .cp-table-wrap { overflow: visible; }
  .cp-table { display: block; min-width: 0; }
  .cp-table thead { display: none; }
  .cp-table tbody { display: block; width: 100%; }
  .cp-table .cp-cart-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; padding: 14px 12px; border-bottom: 1px solid var(--store-primary-border); }
  .site-public-root .cp-table .cp-cart-row > td { min-width: 0; padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; }
  .cp-cell-product { grid-column: 1 / -1; grid-row: 1; padding-right: 40px !important; }
  .cp-cell-color { grid-column: 1; grid-row: 2; }
  .cp-cell-size { grid-column: 2; grid-row: 2; }
  .cp-cell-price { grid-column: 1 / -1; grid-row: 3; }
  .cp-cell-quantity { grid-column: 1; grid-row: 4; align-self: end; }
  .site-public-root .cp-table .cp-cart-row > .cp-cell-total { grid-column: 2; grid-row: 4; text-align: right; align-self: end; }
  .cp-cart-row td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--store-ink); font-size: 13px; }
  .cp-cell-price::before { display: inline !important; margin-right: 8px; }
  .cp-prod { min-width: 0; align-items: flex-start; gap: 10px; }
  .cp-prod > div:last-child { min-width: 0; }
  .cp-prod__img { width: 64px; height: 80px; border-radius: 6px; }
  .cp-prod__img img { object-fit: contain; }
  .cp-prod__name { font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
  .cp-prod__actions { margin-top: 6px; }
  .cp-prod__actions button { min-height: 44px; padding: 8px 12px; }
  .cp-cell-price .cp-money { font-size: 16px; }
  .cp-cell-total .cp-money { font-size: 18px; white-space: nowrap; }
  .cp-stepper { display: inline-flex; max-width: 100%; }
  .cp-qty-btn { width: 44px; height: 44px; flex: 0 0 44px; }
  .cp-qty-input { width: 36px; min-width: 0; height: 44px; }
  .cp-cell-delete { position: absolute; right: 4px; top: 6px; }
  .cp-del { display: grid; place-items: center; width: 44px; height: 44px; color: var(--store-primary); }
  .cp-card__foot { flex-wrap: wrap; }
  .cp-card__foot .cp-link { display: inline-flex; align-items: center; min-height: 44px; }
  .cp-foot-total { margin-left: auto; }
  .cp-rsum-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
  .site-public-root .cp-money,
  .site-public-root .cp-foot-total strong { font-family: Cairo, Arial, sans-serif !important; font-variant-numeric: tabular-nums; }
  .cp-help { font-size: 14px; line-height: 1.4; }
}
@media (min-width: 992px) and (max-width: 1279px) {
  .cp-cart > .container > .row > [class*="col-lg-"] { flex: 0 0 100%; max-width: 100%; }
  .cp-summary { margin-top: 26px; }
}
