/* ============================================================
   Košarica (cart) — shares the visual language with checkout
   ============================================================ */

/* page.css overrides :root (green #7ab32e, Jost headings) — re-assert the
   main-site brand tokens (base.css) so the cart matches home/product/category. */
.cart-page {
  --green: #a2c054;
  --green-dark: #7a9a2e;
  --green-light: #f0f6e0;
  --teal: #54a2c0;
  --teal-dark: #3a7a96;
  --teal-light: #e8f4fa;
  --text: #3f3f3f;
  --text-light: #777;
  --text-xlight: #aaa;
  --border: #e0e0e0;
  --border-light: #efefef;
  --bg-gray: #f8f8f8;
  --red: #e53935;
  --radius: 4px;
  --radius-lg: 8px;
  --font-heading: "Cormorant", Georgia, serif;
}

.cart-page {
  padding: 32px 0 72px;
  background:
    linear-gradient(180deg, var(--teal-light) 0%, rgba(232,244,250,0) 220px);
}

.cart-page__head {
  margin-bottom: 24px;
}

.cart-page__eyebrow {
  display: inline-block;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.cart-page__title {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 8px;
}

.cart-page__breadcrumbs {
  font-size: 12px;
  color: var(--text-light);
}
.cart-page__breadcrumbs a { color: var(--text-light); }
.cart-page__breadcrumbs a:hover { color: var(--green); }
.cart-page__breadcrumbs span { margin: 0 6px; color: var(--text-xlight); }

/* ---- Layout ---- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

/* ---- Items panel ---- */
.cart-items {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  overflow: hidden;
}

.cart-items__header {
  display: grid;
  grid-template-columns: 1fr 120px 128px 110px 36px;
  gap: 12px;
  padding: 14px 24px;
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-light);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 120px 128px 110px 36px;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }

.cart-item__product { display: flex; gap: 14px; align-items: center; min-width: 0; }
.cart-item__img {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item__img img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.cart-item__info { min-width: 0; }
.cart-item__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item__name:hover { color: var(--green); }
.cart-item__sku { font-size: 11px; color: var(--text-xlight); margin-top: 3px; }
.cart-item__price { font-size: 14px; font-weight: 600; color: var(--text-light); }

.cart-item__qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 100px;
  width: fit-content;
  background: #fff;
  overflow: hidden;
}
.cart-item__qty-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.cart-item__qty-btn:hover { background: var(--green-light); color: var(--green-dark); }
.cart-item__qty-input {
  width: 38px;
  height: 34px;
  text-align: center;
  border: none;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  color: var(--text);
  -moz-appearance: textfield;
}
.cart-item__qty-input::-webkit-outer-spin-button,
.cart-item__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cart-item__subtotal { font-size: 15px; font-weight: 700; color: var(--green-dark); }
.cart-item__remove {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xlight);
  border-radius: 50%;
  transition: all .15s;
  cursor: pointer;
  border: none;
  background: none;
  flex-shrink: 0;
}
.cart-item__remove:hover { color: var(--red); background: #fff0f0; }

/* ---- Summary panel ---- */
.cart-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  padding: 24px;
  position: sticky;
  top: 96px;
}
.cart-summary__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.cart-summary__row strong { color: var(--text); font-weight: 600; }
.cart-summary__free { color: var(--green-dark); font-weight: 600; }
.cart-summary__row--total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
  margin-bottom: 18px;
}
.cart-summary__row--total span:last-child { color: var(--green-dark); font-size: 22px; }
.cart-summary__shipping-note {
  font-size: 11.5px;
  color: var(--text-xlight);
  margin-bottom: 18px;
  line-height: 1.5;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  letter-spacing: .2px;
  box-shadow: 0 2px 8px rgba(122,154,46,.25);
}
.btn-checkout:hover { background: var(--green-dark); box-shadow: 0 4px 14px rgba(122,154,46,.32); }
.btn-checkout:active { transform: scale(.99); }
.btn-checkout:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; }

.btn-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 24px;
  background: #fff;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  margin-top: 10px;
  transition: all .15s;
  text-decoration: none;
}
.btn-continue:hover { border-color: var(--green); color: var(--green-dark); }

.cart-summary__trust {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.cart-summary__trust svg { flex-shrink: 0; color: var(--green); }

.cart-summary__pay {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.cart-summary__pay span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text-light);
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
}

/* ---- Empty state ---- */
.cart-empty {
  text-align: center;
  padding: 72px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.cart-empty__icon {
  width: 84px;
  height: 84px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  color: var(--teal);
}
.cart-empty__title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 10px;
}
.cart-empty__text { font-size: 14px; color: var(--text-light); margin-bottom: 26px; }
.btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(122,154,46,.25);
}
.btn-shop:hover { background: var(--green-dark); color: #fff; box-shadow: 0 4px 14px rgba(122,154,46,.32); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-items__header { display: none; }
  .cart-item {
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 10px 12px;
  }
  .cart-item__product { grid-column: 1 / -1; }
  .cart-item__price { display: none; }
  .cart-item__remove { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (max-width: 600px) {
  .cart-page__title { font-size: 32px; }
}
@media (max-width: 480px) {
  .cart-item { grid-template-columns: 1fr auto; padding: 14px 16px; }
  .cart-item__qty { grid-column: 1; }
  .cart-item__subtotal { grid-column: 2; text-align: right; }
  .cart-item__remove { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }
}
