/* Стилі сторінки «Кошик» */

/* ===== «Ваш кошик» ===== */
.cart__head { max-width: 1240px; margin: 0px auto; padding: 46px 28px 18px; }
.cart__crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: rgb(154, 148, 134); margin-bottom: 20px; }
.cart__crumb { cursor: pointer; }
.cart__crumb:hover { color: var(--green); }
.cart__crumb-current { color: var(--accent,#C53A2B); }
.cart__title { font-family: Montserrat, system-ui, -apple-system, sans-serif; font-weight: 600; font-size: 42px; line-height: 1.08; color: var(--green-dark,#1C4A2A); margin: 0px; }

/* ===== «Подрібнена томатна пульпа SOLANA» ===== */
.cart__layout { max-width: 1240px; margin: 0px auto; padding: 24px 28px 80px; display: grid; grid-template-columns: 1.62fr 1fr; gap: 30px; align-items: start; }
.cart__items { display: flex; flex-direction: column; gap: 14px; }
.cart__item { display: flex; align-items: center; gap: 18px; background: rgb(255, 255, 255); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.cart__item-media { width: 84px; height: 84px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: rgb(236, 231, 214); }
.cart__item-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart__item-info { flex: 1 1 0%; min-width: 0px; }
.cart__item-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green,#2E7D32); }
.cart__item-name { font-family: Montserrat, system-ui, -apple-system, sans-serif; font-size: 18px; font-weight: 600; line-height: 1.2; color: var(--ink); margin: 4px 0px 6px; }
.cart__item-pack { font-size: 13.5px; color: var(--muted); }
.cart__item-pack-strong { color: var(--ink); }
.cart__item-qty { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart__stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.cart__stepper-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 19px; font-weight: 600; color: var(--green-dark,#1C4A2A); }
.cart__stepper-btn:hover { background: var(--cream2); }
.cart__stepper-val { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; color: var(--ink); }
.cart__item-weight { font-size: 12px; color: rgb(154, 148, 134); }
.cart__item-total-wrap { min-width: 130px; text-align: right; }
.cart__item-total { font-size: 18px; font-weight: 800; color: var(--green-dark,#1C4A2A); }
.cart__item-remove { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: rgb(154, 148, 134); font-size: 20px; }
.cart__item-remove:hover { background: rgb(244, 226, 223); color: var(--accent); }
.cart__continue { align-self: flex-start; margin-top: 6px; font-size: 14.5px; font-weight: 700; color: var(--green-dark,#1C4A2A); cursor: pointer; }
.cart__continue:hover { color: var(--accent); }
.cart__summary { background: rgb(255, 255, 255); border: 1px solid var(--line); border-radius: 20px; padding: 28px; position: sticky; top: 96px; min-width: 0; max-width: 100%;}
.cart__summary-title { font-family: Montserrat, system-ui, -apple-system, sans-serif; font-size: 23px; font-weight: 600; color: var(--green-dark,#1C4A2A); margin: 0px 0px 20px; }
.cart__summary-meta { display: flex; flex-direction: column; gap: 13px; font-size: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cart__summary-row { display: flex; justify-content: space-between; color: var(--muted); }
.cart__summary-value { font-weight: 700; color: var(--ink); white-space: nowrap; }
.cart__promo { padding: 18px 0px; border-bottom: 1px solid var(--line); }
.cart__promo-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.cart__promo-form { display: flex; gap: 8px; }
.cart__promo-input { flex: 1 1 0%; min-width: 0px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; font-family: Montserrat; font-size: 14px; background: var(--cream,#F5F2E8); color: var(--ink); outline: none; text-transform: uppercase; }
.cart__promo-apply { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 12px; background: var(--green-dark,#1C4A2A); color: rgb(255, 255, 255); font-size: 14px; font-weight: 700; cursor: pointer; }
.cart__promo-apply:hover { background: rgb(20, 56, 32); }
.cart__promo-hint { font-size: 11.5px; color: rgb(154, 148, 134); margin-top: 8px; }
.cart__promo-hint-strong { color: var(--muted); }
.cart__subtotal { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; margin: 16px 0px 0px; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0px 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.cart__total-label { font-size: 16px; font-weight: 700; color: var(--ink); }
.cart__total-value { font-family: Montserrat, system-ui, -apple-system, sans-serif; font-size: 28px; font-weight: 700; color: var(--green-dark,#1C4A2A); white-space: nowrap; }
.cart__checkout { text-align: center; padding: 16px; border-radius: 999px; background: var(--accent,#C53A2B); color: rgb(255, 255, 255); font-size: 16px; font-weight: 700; cursor: pointer; margin: 12px 0; }
.cart__checkout:hover { background: var(--accent-dark,#A82E22); }
.cart__pay { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.cart__pay-card { display: inline-flex; align-items: center; justify-content: center; background: rgb(255, 255, 255); border: 1px solid rgba(28, 74, 42, 0.12); border-radius: 7px; padding: 6px 10px; height: 34px; }
.cart__pay-card img { width: auto; display: block; }
.cart__pay-card:nth-child(1) img { height: 22px; }
.cart__pay-card:nth-child(2) img { height: 17px; }
.cart__pay-card:nth-child(3) img { height: 17px; }
.cart__pay-card:nth-child(4) img { height: 23px; }
.cart__pay-card:nth-child(5) img { height: 14px; }
.cart__pay-card-wide { display: inline-flex; align-items: center; justify-content: center; background: rgb(255, 255, 255); border: 1px solid rgba(28, 74, 42, 0.12); border-radius: 7px; padding: 5px 9px; height: 32px; }

/* ===== Стани, що формуються в app.js ===== */
.cart__discount { display: flex; justify-content: space-between; color: var(--green,#2E7D32); font-size: 15px; font-weight: 700; margin-top: 11px; }
.cart__discount-val { white-space: nowrap; }
.cart__promo-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(46,125,50,0.1); border: 1px solid rgba(46,125,50,0.35); border-radius: 12px; padding: 11px 14px; }
.cart__promo-applied-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cart__promo-applied-code { font-size: 14px; font-weight: 700; color: var(--green-dark,#1C4A2A); }
.cart__promo-clear { font-size: 13px; font-weight: 700; color: #9A9486; cursor: pointer; }
.cart__promo-error { font-size: 12.5px; font-weight: 600; color: var(--accent,#C53A2B); margin-top: 8px; }
.cart__empty { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 64px 32px; text-align: center; }
.cart__empty-icon { width: 74px; height: 74px; border-radius: 50%; background: var(--cream2,#EFEADA); margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--green-dark,#1C4A2A); }
.cart__empty-title { font-family: Montserrat, sans-serif; font-size: 26px; font-weight: 600; color: var(--green-dark,#1C4A2A); margin: 0 0 10px; }
.cart__empty-text { font-size: 16px; color: var(--muted); margin: 0 0 26px; }
.cart__empty-btn { display: inline-flex; text-decoration: none; padding: 15px 30px; border-radius: 999px; background: var(--accent,#C53A2B); color: #fff; font-size: 16px; font-weight: 700; }

/* =====================  АДАПТИВНІСТЬ  ===================== */
@media (max-width: 860px) {
  .cart__layout { grid-template-columns: 1fr; gap: 24px; }
  .cart__summary { position: static; top: auto; }
  .cart__title { font-size: 34px; }
}
@media (max-width: 640px) {
  .cart__head { padding: 36px 18px 14px; }
  .cart__layout { padding: 20px 18px 56px; }
  .cart__item { display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: "media info remove" "qty qty total"; gap: 10px 12px; align-items: center; padding: 14px; }
  .cart__item-media { grid-area: media; width: 64px; height: 64px; }
  .cart__item-info { grid-area: info; }
  .cart__item-name { font-size: 16px; }
  .cart__item-remove { grid-area: remove; align-self: flex-start; position: relative; left: 60%; }
  .cart__item-qty { grid-area: qty; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
  .cart__item-total-wrap { grid-area: total; min-width: auto; }
  .cart__summary { padding: 24px 20px; }
  .cart__title { font-size: 30px; }
}

/* =========================================================
   Інтеграція з WooCommerce
   ========================================================= */

/* Посилання на товар усередині картки — без підкреслення й без синього */
.cart__item-name a { text-decoration: none; color: inherit; }
.cart__item-name a:hover { color: var(--green,#2E7D32); }
.cart__item-media a { display: block; width: 100%; height: 100%; }

/* Хрестик видалення: перебиваємо дефолт WooCommerce */
.cart__item-remove {
  text-decoration: none;
  font-weight: 400;
  background: none;
  line-height: 1;
}

/* Степпер: справжній <input type="number"> */
.cart__stepper-btn { border: 0; }
.cart__stepper-val {
  appearance: textfield;
  -moz-appearance: textfield;
  background: transparent;
  border: 0; outline: 0;
  padding: 0;
  font-family: inherit;
  width: 40px;
}
.cart__stepper-val::-webkit-outer-spin-button,
.cart__stepper-val::-webkit-inner-spin-button { appearance: none; -webkit-appearance: none; margin: 0; }

/* Кнопки/посилання */
.cart__promo-apply { border: 0; font-family: inherit; }
.cart__promo-clear { text-decoration: none; }
.cart__continue { text-decoration: none; }
.cart__checkout { display: block; text-decoration: none; }
.cart__empty-btn { text-decoration: none; }

/* Схована кнопка «Оновити кошик» — її тисне JS */
.cart__update {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Поки WooCommerce перераховує кошик */
.woocommerce-cart-form.is-updating { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Нотатка «Мінімальне замовлення…» */
.cart__note {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(28,74,42,.06);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--muted);
  margin: 18px 0;
}
.cart__note-icon { color: var(--accent,#C53A2B); font-weight: 800; flex: 0 0 auto; }

/* Порожній кошик */
.cart__layout--empty { grid-template-columns: 1fr; }

/* Обгортки */
.cart__form { margin: 0; }
.cart__collaterals:empty { display: none; }

/* ===== Міні-кошик (віджет) ===== */
.mini-cart__list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.mini-cart__item { display: flex; align-items: center; gap: 10px; position: relative; }
.mini-cart__link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.mini-cart__link img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; background: var(--cream2,#EFEADA); }
.mini-cart__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.mini-cart__qty { font-size: 13px; font-weight: 700; color: var(--green-dark,#1C4A2A); white-space: nowrap; }
.mini-cart__remove { color: #9A9486; text-decoration: none; font-size: 18px; line-height: 1; }
.mini-cart__remove:hover { color: var(--accent,#C53A2B); }
.mini-cart__total { display: flex; justify-content: space-between; margin: 16px 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--green-dark,#1C4A2A); }
.mini-cart__buttons { display: flex; gap: 8px; }
.mini-cart__buttons .cart__continue,
.mini-cart__buttons .cart__checkout { flex: 1; margin: 0; padding: 12px; text-align: center; font-size: 14px; }
.mini-cart__empty { font-size: 14px; color: var(--muted); margin: 0; }
