/* ─── Cart Page ─── */

.cart-page {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* ─── Cart Items List ─── */

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* ─── Cart Item Card ─── */

.cart-item {
  display: flex;
  gap: var(--sp-12);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--sp-12);
}

.cart-item__img-wrap {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-gray-light);
}

.cart-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item__img--placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-gray-light);
}

.cart-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: var(--sp-12);
}

.cart-item__top {
  display: flex;
  gap: var(--sp-8);
  align-items: flex-start;
}

.cart-item__title {
  flex: 1;
  margin: 0;
  margin-top: var(--sp-12);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-16);
  color: var(--color-black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item__card-text {
  font-size: var(--fs-sm);
  color: var(--color-icon);
  font-weight: var(--fw-regular);
  display: block;
  margin-top: var(--sp-2);
}

.cart-item__remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s ease;
  padding: 0;
}

.cart-item__remove:hover {
  opacity: 0.7;
}

.cart-item__remove img {
  width: 20px;
  height: 20px;
}

/* Bottom row: price + qty in one line */

.cart-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}

.cart-item__prices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cart-item__price-line {
  height: 15px;
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
}

.cart-item__price {
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  line-height: var(--lh-17);
  color: var(--color-black);
}

.cart-item__currency {
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  line-height: var(--lh-17);
  color: var(--color-black);
}

.cart-item__old-price {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-icon);
  line-height: var(--lh-10);
  text-decoration: line-through;
  opacity: 0.64;
}

.cart-item__qty {
  display: inline-flex;
  align-items: center;
  height: 36px;
  background: var(--color-gray-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.cart-item__qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cart-item__qty-btn img {
  width: 20px;
  height: 20px;
}

.cart-item__qty-val {
  min-width: 28px;
  text-align: center;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--color-black);
}

.cart-item__edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-gray-light);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.cart-item__edit-btn:active {
  opacity: 0.7;
}

.cart-item__edit-btn img {
  width: 20px;
  height: 20px;
}

/* ─── Empty Cart ─── */

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--sp-48) var(--sp-24);
}

.cart-empty__title {
  margin: 0 0 var(--sp-8);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--color-black);
}

.cart-empty__text {
  margin: 0 0 var(--sp-24);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: 1.4;
  color: var(--color-icon);
}

.cart-empty__cta {
  text-decoration: none;
}

/* ─── Cart Bottom Bar ─── */

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--max-width-desktop);
  margin: 0 auto;
  bottom: 0;
  z-index: 200;
  background: var(--color-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-bottom-bar);
  padding: var(--sp-12);
  padding-bottom: calc(var(--sp-12) + env(safe-area-inset-bottom, 0px));
}

.cart-bar--hidden {
  display: none;
}

.cart-bar__inner {
  max-width: var(--max-width-desktop);
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);

  padding: var(--sp-12) 0;
}

.cart-bar__header {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.cart-bar__icon {
  flex-shrink: 0;
}

.cart-bar__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--color-black);
}

.cart-bar__rows {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.cart-bar__row {
  height: 11px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 0.64;
}

.cart-bar__label {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-10);
  color: var(--color-black);

}

.cart-bar__value {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-13);
  color: var(--color-black);
  margin-bottom: -3px;
}

.cart-bar__total-block {
  height: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cart-bar__total-block .cart-bar__label {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: var(--lh-13);
  color: var(--color-black);
}

.cart-bar__total-block .cart-bar__value {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-17);
  color: var(--color-black);
}