/* ============================================================
   CART PAGE — Корзина
   Unified cart card, table rows, quantity counter, suggestions
   ============================================================ */

/* --- Unified Cart Card --- */
.cart-unified {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.cart-unified__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-unified__title {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 24px;
  color: var(--color-dark);
}

/* --- Table Head (desktop only) --- */
.cart-table__head {
  display: none;
}

/* --- Cart Row --- */
.cart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "product product"
    "price   days"
    "qty     subtotal";
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-bg);
  align-items: center;
}

.cart-row:last-child {
  border-bottom: none;
}

.cart-row__product {
  grid-area: product;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-row__img {
  width: 80px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 4px;
  background-color: #ECECEC;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-row__img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-row__name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-dark);
}

.cart-row__price { grid-area: price; }
.cart-row__days { grid-area: days; }
.cart-row__qty { grid-area: qty; }
.cart-row__subtotal { grid-area: subtotal; }

.cart-row__label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 11px;
  color: var(--color-grey);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.cart-row__val {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-dark);
}

.cart-row__subtotal .cart-row__val {
  color: var(--color-orange);
  font-weight: 700;
}

/* --- Quantity Counter --- */
.qty-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-counter__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 5px;
  background-color: var(--color-bg);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.qty-counter__btn:hover {
  background-color: #b8cad9;
}

.qty-counter__btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-blue);
  stroke-width: 3;
}

.qty-counter__value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  text-align: center;
  color: var(--color-blue);
  min-width: 20px;
}

/* --- Empty State --- */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
}

.cart-empty__icon {
  width: 100px;
  height: 100px;
  color: var(--color-grey);
  opacity: 0.3;
}

.cart-empty__text {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-grey);
  opacity: 0.6;
}

/* --- Total Row --- */
.cart-unified__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 2px solid var(--color-bg);
}

.cart-unified__total-label {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 22px;
  color: var(--color-dark);
}

.cart-unified__total-value {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 24px;
  color: var(--color-orange);
}

/* --- Checkout Button --- */
.cart-unified__checkout {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.cart-unified__btn {
  height: 50px;
  padding: 0 3rem;
  font-size: 1rem;
}

/* --- Clear Cart Button --- */
.btn-clear {
  background-color: var(--color-bg);
  color: #294082;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.17;
  padding: 8px 20px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-clear:hover {
  background-color: #b8cad9;
}

/* --- Suggestion Card (Снаряжение) --- */
.suggest-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.suggest-card__photo {
  width: 100%;
  height: 108px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #ECECEC;
}

.suggest-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggest-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggest-card__name {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--color-dark);
}

.suggest-card__pricing {
  display: flex;
  flex-direction: column;
}

.suggest-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.suggest-card__price-value {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.5;
  color: var(--color-orange);
}

.suggest-card__price-rub {
  font-size: 14px;
  color: var(--color-orange);
}

.suggest-card__price-note {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(37, 37, 37, 0.8);
}

.suggest-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background-color: var(--color-blue);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.17;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.suggest-card__btn:hover {
  opacity: 0.85;
}

.suggest-card__btn-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* --- Desktop tweaks --- */
@media (min-width: 1024px) {
  .cart-unified {
    padding: 32px 40px;
  }

  .cart-unified__title {
    font-size: 36px;
  }

  .cart-unified__btn {
    height: 60px;
    padding: 0 4rem;
    font-size: 1.25rem;
  }

  .cart-table__head {
    display: grid;
    grid-template-columns: 3fr 100px 70px 140px 110px;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 2px solid var(--color-bg);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 13px;
    color: var(--color-grey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .cart-table__head span:nth-child(n+2) {
    text-align: center;
  }

  .cart-row {
    grid-template-columns: 3fr 100px 70px 140px 110px;
    grid-template-areas: none;
    gap: 16px;
    padding: 14px 0;
  }

  .cart-row > * {
    grid-area: auto;
  }

  .cart-row__img {
    width: 120px;
    height: 60px;
  }

  .cart-row__name {
    font-size: 18px;
  }

  .cart-row__label {
    display: none;
  }

  .cart-row__price,
  .cart-row__days,
  .cart-row__subtotal {
    text-align: center;
  }

  .cart-row__qty {
    display: flex;
    justify-content: center;
  }

  .cart-row__val {
    font-size: 17px;
  }

  .cart-unified__total-label {
    font-size: 24px;
  }

  .cart-unified__total-value {
    font-size: 28px;
  }

  .btn-clear {
    font-size: 16px;
    padding: 10px 26px;
  }

  .suggest-card__btn {
    font-size: 20px;
    padding: 14px;
  }
}

/* ============================================================
   UPSELL MODAL — предложение стоянки / кемпинга
   ============================================================ */

.upsell-modal {
  max-width: 720px;
}

.upsell-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.upsell-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.upsell-card__photo {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upsell-card__photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.upsell-card__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upsell-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--color-dark);
}

.upsell-card__price {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-orange);
  white-space: nowrap;
}

.upsell-card__btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  transition: opacity .2s ease, background-color .2s ease;
}

.upsell-card__btn.btn-disabled {
  opacity: .6;
  cursor: default;
  pointer-events: none;
}

.upsell-actions {
  display: flex;
  justify-content: center;
}

.upsell-actions__btn {
  height: 50px;
  padding: 0 3rem;
  font-size: 1rem;
}

@media (min-width: 1024px) {
  .upsell-cards {
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 20px;
    margin-bottom: 32px;
  }

  .upsell-card {
    width: 100%;
  }

  .upsell-card:only-child {
    grid-column: 1 / -1;
    max-width: 50%;
  }

  .upsell-card__photo {
    height: 180px;
  }

  .upsell-card__name {
    font-size: 24px;
  }

  .upsell-card__price {
    font-size: 20px;
  }

  .upsell-actions__btn {
    height: 60px;
    padding: 0 4rem;
    font-size: 1.25rem;
  }
}
