/* ===========================================================
   PHARMATAC — cart page (extends styles.css)
   =========================================================== */

.cart-section {
  padding: 52px 44px 100px;
}

.cart-title {
  font-family: inherit;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 36px;
}

.cart-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

/* ---------- products list ---------- */
.cart-products { width: 812px; flex: none; }

.cart-products__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cart-products__count {
  margin: 0;
  font-size: 16px;
  color: #717171;
}
.cart-products__count strong { font-weight: 600; color: var(--ink); }

.cart-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--green-700);
  cursor: pointer;
}

.cart-items { display: flex; flex-direction: column; gap: 8px; }

.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #A9A9A9;
  border-radius: 16px;
  padding: 17px;
}

.cart-item__left { display: flex; gap: 20px; width: 421px; }
.cart-item__media {
  width: 126px;
  height: 126px;
  border-radius: 6px;
  background: var(--gray-bg);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cart-item__media .ph-block { width: 80px; height: 80px; border-radius: 6px; }

.cart-item__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 126px;
  width: 275px;
}
.cart-item__name h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.cart-item__name p {
  margin: 0;
  font-size: 12px;
  color: var(--text-gray);
}

.cart-item__counters { display: flex; gap: 24px; align-items: center; }
.qty-field { display: flex; flex-direction: column; gap: 4px; }
.qty-field > span { font-size: 12px; color: var(--text-gray); }

.qty-control {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid #A9A9A9;
  border-radius: 4px;
  overflow: hidden;
}
.qty-control button {
  width: 40px;
  height: 100%;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-control input {
  width: 40px;
  height: 100%;
  border: none;
  border-left: 1px solid #A9A9A9;
  border-right: 1px solid #A9A9A9;
  text-align: center;
  font-size: 16px;
  color: var(--ink);
  background: none;
}

.cart-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  width: 91px;
}
.cart-item__delete {
  width: 40px;
  height: 40px;
  border-radius: 200px;
  border: 1px solid #A9A9A9;
  background: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cart-item__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.cart-item__price-old {
  font-size: 14px;
  color: var(--text-gray);
  text-decoration: line-through;
}
.cart-item__price-new {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- order summary ---------- */
.cart-summary { width: 508px; flex: none; position: sticky; top: 88px; }

.cart-summary__card {
  background: var(--gray-bg);
  border-radius: 16px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cart-summary__card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: #1a1a1a;
}

.cart-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #A9A9A9;
}
.cart-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: var(--ink);
}
.cart-summary__row .is-muted { color: #717171; }

.cart-promo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 17px;
  border-bottom: 1px solid #A9A9A9;
}
.cart-promo__label { margin: 0; font-size: 16px; color: var(--ink); }
.cart-promo__row {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 200px;
  padding: 4px;
}
.cart-promo__row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 12px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.cart-promo__row input::placeholder { color: var(--text-gray); }
.cart-promo__row button {
  flex: none;
  border: none;
  background: none;
  border-radius: 200px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-gray);
  cursor: pointer;
}

.cart-summary__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-summary__total span { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.cart-summary__total strong { font-size: 20px; font-weight: 600; color: #1a1a1a; }

.cart-summary__actions { display: flex; flex-direction: column; gap: 12px; }
.cart-summary__cta {
  width: 100%;
  justify-content: center;
  background: #11251A;
}
.cart-summary__note {
  margin: 0;
  font-size: 12px;
  color: #717171;
  text-align: center;
}

/* ---------- empty state (Figma 2935-38492 / mobile 2935-38892) ---------- */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 0;
}
.cart-empty__icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #004120;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.cart-empty__icon img { width: 45px; height: 44px; }
.cart-empty__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-align: center;
}
.cart-empty__desc {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text-gray);
  text-align: center;
}
.cart-empty__btn {
  min-width: 218px;
  justify-content: center;
  background: #11251A;
}
.cart-empty__cats {
  border-top: 1px solid #A9A9A9;
  margin-top: 48px;
  padding-top: 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cart-empty__cats-label {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gray);
  text-align: center;
}
.cart-empty__cats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.cart-empty__cats-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 9px 17px;
  border: 1px solid #A9A9A9;
  border-radius: 200px;
  background: #fff;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
}
.cart-empty__cats-list a:hover { border-color: var(--ink); }

/* ---------- clear-cart confirmation modal (Figma 2935-38671 / 2935-39014) ---------- */
.clear-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clear-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(234, 234, 234, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.clear-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 306px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .16);
}
.clear-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  padding: 4px;
  color: var(--ink);
  cursor: pointer;
}
.clear-modal__title { margin: 0 0 8px; font-size: 20px; font-weight: 600; line-height: 1.2; padding-right: 28px; }
.clear-modal__desc { margin: 0 0 20px; font-size: 14px; line-height: 1.3; color: var(--text-gray); }
.clear-modal__actions { display: flex; gap: 10px; }
.clear-modal__actions .btn { flex: 1; justify-content: center; padding: 12px 16px; font-size: 15px; }
.clear-modal__confirm { background: #11251A; }

@media (max-width: 640px) {
  .clear-modal { align-items: flex-end; }
  .clear-modal__panel {
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 24px 16px 28px;
  }
  .clear-modal__actions { flex-direction: column; }
  .clear-modal__actions .clear-modal__confirm { order: -1; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cart-section { padding: 32px 20px 64px; }
  .cart-layout { flex-direction: column; }
  .cart-products, .cart-summary { width: 100%; }
  .cart-summary { position: static; }
  .cart-item { flex-direction: column; gap: 16px; }
  .cart-item__left { width: 100%; }
  .cart-item__right { flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; }
}
@media (max-width: 640px) {
  .cart-item__left { flex-direction: column; }
  .cart-item__content { width: 100%; height: auto; gap: 16px; }
  .cart-empty__title { font-size: 24px; }
  .cart-empty__cats-list { gap: 8px; padding: 0 8px; }
  .cart-empty__cats-list a { min-width: 0; flex: 0 1 auto; }
}
