/*
  Cart page (/el/cart) design.
  Used by resources/views/cart/index.blade.php and cart/partials/*.
  All classes start with "cp-" so they don't clash with style.css.
*/

.cp-page { padding: 28px 0 64px; background: #f6f7f9; }

/* ---------- Page title ---------- */
.cp-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 22px;
}
.cp-head h1 {
  margin: 0; font-size: 28px; font-weight: 700; color: #111;
  display: flex; align-items: center; gap: 10px;
}
.cp-head__count {
  font-size: 13px; font-weight: 700; line-height: 1;
  background: #111; color: #fff; border-radius: 999px; padding: 6px 10px;
}
.cp-head__back { color: #555; font-size: 14px; text-decoration: none; }
.cp-head__back:hover { color: #02c1a4; }

/* ---------- Two columns: products + summary ---------- */
.cp-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px; align-items: start;
}
.cp-list { display: flex; flex-direction: column; gap: 14px; }

/* ---------- One product card ---------- */
.cp-card {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 40px;
  gap: 18px; align-items: center;
  background: #fff; border: 1px solid #e8e9ec; border-radius: 14px;
  padding: 16px;
}
.cp-card__thumb {
  width: 112px; height: 112px; border-radius: 10px; overflow: hidden;
  background: #f3f4f6; display: flex; align-items: center; justify-content: center;
}
.cp-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.cp-card__title { font-size: 15px; font-weight: 600; color: #111; line-height: 1.35; margin-bottom: 6px; }
.cp-card__comments { font-size: 13px; color: #666; line-height: 1.3; margin-bottom: 6px; }
.cp-card__comments hr { margin: 6px 0; }

.cp-card__specs { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; color: #333; }
.cp-card__specs li { margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cp-card__specs span { color: #777; }
.cp-card__swatch {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
}
.cp-card__qty {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; background: #f1f3f5; border-radius: 999px; padding: 5px 12px; color: #333;
}

.cp-card__price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cp-card__old { font-size: 13px; color: #999; text-decoration: line-through; }
.cp-card__now { font-size: 20px; font-weight: 700; color: #111; white-space: nowrap; }
.cp-card__reward { font-size: 12px; font-weight: 700; color: #02a68d; }

.cp-card__delete {
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  color: #888; background: transparent; border: 1px solid transparent;
}
.cp-card__delete:hover { color: #d63939; background: #fdecec; border-color: #f6caca; }

/* ---------- Summary box ---------- */
.cp-summary {
  position: sticky; top: 140px;
  background: #fff; border: 1px solid #e8e9ec; border-radius: 14px; padding: 22px;
}
.cp-summary__title { font-size: 18px; font-weight: 700; color: #111; margin: 0 0 14px; }
.cp-summary__rows { margin: 0; }
.cp-summary__rows > div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.cp-summary__rows dt { font-weight: 400; color: #555; }
.cp-summary__rows dd { margin: 0; color: #111; font-weight: 600; }
.cp-summary__save dt, .cp-summary__save dd, .cp-summary__free { color: #02a68d !important; }

.cp-summary__total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid #eee; margin-top: 8px; padding-top: 14px;
}
.cp-summary__total span { font-size: 15px; font-weight: 600; color: #111; }
.cp-summary__total strong { font-size: 26px; color: #111; }
.cp-summary__vat { font-size: 12px; color: #888; margin: 2px 0 16px; text-align: right; }

.cp-summary__cta, .cp-summary__share {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border-radius: 10px; font-weight: 700;
}
.cp-summary__cta {
  background: #02c1a4; color: #fff; padding: 14px 18px; font-size: 16px; border: none;
}
.cp-summary__cta:hover { background: #02a68d; color: #fff; }
.cp-summary__share {
  margin-top: 10px; padding: 10px 18px; font-size: 14px;
  background: #fff; color: #333; border: 1px solid #dcdfe4;
}
.cp-summary__share:hover { border-color: #02c1a4; color: #02a68d; }

.cp-summary__trust { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid #eee; }
.cp-summary__trust li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #555; padding: 4px 0; }
.cp-summary__trust i { color: #02c1a4; font-size: 16px; }

/* ---------- Empty cart ---------- */
.cp-empty {
  background: #fff; border: 1px solid #e8e9ec; border-radius: 14px;
  padding: 48px 20px; text-align: center; max-width: 520px; margin: 0 auto;
}
.cp-empty i { font-size: 44px; color: #c5c9cf; }
.cp-empty p { font-size: 16px; margin: 12px 0 20px; }
.cp-empty .cp-summary__cta { display: inline-flex; width: auto; padding: 12px 28px; }

/* ---------- Tablet: summary goes under the products ---------- */
@media (max-width: 991px) {
  .cp-layout { grid-template-columns: 1fr; }
  .cp-summary { position: static; }
}

/* ---------- Phone: card becomes photo + info, price under the info ---------- */
@media (max-width: 575px) {
  .cp-page { padding-top: 18px; }
  .cp-head h1 { font-size: 22px; }
  .cp-card {
    grid-template-columns: 80px minmax(0, 1fr) 36px;
    grid-template-areas: "thumb info del" "thumb price del";
    gap: 8px 12px; align-items: start; padding: 12px;
  }
  .cp-card__thumb { grid-area: thumb; width: 80px; height: 80px; }
  .cp-card__info { grid-area: info; }
  .cp-card__price { grid-area: price; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px; }
  .cp-card__delete { grid-area: del; width: 36px; height: 36px; }
  .cp-card__title { font-size: 14px; }
  .cp-card__now { font-size: 18px; }
}
