/* cistella.css — cart page (/<slug_mercat>/cistella)
   Mobile first. Reuses the site tokens (--color-forest, --color-evergreen)
   and the card look of the rest of MercatDigital (white boxes, 12px radius,
   soft borders/shadows). Steppers keep their global styles from cart.css. */

.cistella-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
}

/* -----------------------------
   Header
   ----------------------------- */
.cistella-header { padding: 8px 0 16px; }

.cistella-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-evergreen, #304040);
}

.cistella-meta {
  margin-top: 2px;
  font-size: 0.9rem;
  color: #6b7773;
}

/* -----------------------------
   Parada group card
   ----------------------------- */
.cistella-parada {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 0 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.cistella-parada-nom {
  margin: 0;
  padding: 12px 0;
  padding-inline: 0; /* override global `main h2` gutter */
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-forest, #04202C);
}

/* -----------------------------
   Product row
   ----------------------------- */
.cistella-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cistella-item-img {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-fog, #C9D1C8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-pine, #5B7065);
  font-size: 1.5rem;
}

.cistella-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cistella-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cistella-item-nom {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-forest, #04202C);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cistella-item-linia2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cistella-item-preu-unitari {
  flex: 1 1 0;
  font-size: 0.8rem;
  color: #6b7773;
  white-space: nowrap;
}

.cistella-item-stepper { flex: 0 0 auto; }

.cistella-item-total {
  flex: 1 1 0;
  text-align: right;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-forest, #04202C);
  white-space: nowrap;
}

/* -----------------------------
   Parada subtotal
   ----------------------------- */
.cistella-parada-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  color: var(--color-forest, #04202C);
}

.cistella-parada-subtotal-import { font-weight: 700; }

/* -----------------------------
   Resum
   ----------------------------- */
.cistella-resum {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 0 12px;
  margin: 20px 0 16px;
  overflow: hidden;
}

.cistella-resum-titol {
  margin: 0;
  padding: 12px 0;
  padding-inline: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-forest, #04202C);
}

.cistella-resum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  color: var(--color-forest, #04202C);
}

.cistella-resum-row--total {
  font-weight: 700;
  font-size: 1.05rem;
}

/* -----------------------------
   Continuar
   ----------------------------- */
.cistella-continuar {
  display: block;
  width: 100%;
  padding: 14px 12px;
  border: none;
  border-radius: 12px;
  background: var(--color-evergreen, #304040);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform .12s, background .18s;
  -webkit-tap-highlight-color: transparent;
}

.cistella-continuar:active { transform: scale(0.98); }

/* -----------------------------
   Empty state
   ----------------------------- */
.cistella-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 12px;
  text-align: center;
}

.cistella-empty-icon {
  font-size: 3rem;
  color: var(--color-pine, #5B7065);
}

.cistella-empty-text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-evergreen, #304040);
}

/* "Continuar comprant" reuses the shared .btn-pill.btn-solid (styles.css) —
   same component as mercat.html's "Explora tots els productes del mercat". */
.cistella-empty .btn-pill { margin-top: 4px; }
