.cart-page {
  background: linear-gradient(180deg, #fff 0%, #fffaf7 68%, #fff 100%);
  padding: 38px 0 70px;
}
.cart-head {
  margin-bottom: 24px;
}
.cart-head h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
  margin: 0 0 12px;
  font-weight: 500;
  letter-spacing: -.05em;
  color: #302b28;
}
.cart-head p {
  margin: 0;
  color: #766b66;
  font-size: 17px;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: start;
}
.cart-panel,
.checkout-panel,
.order-result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(79, 48, 35, .08);
}
.cart-panel {
  padding: 10px;
}
.cart-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.cart-row:last-child {
  border-bottom: 0;
}
.cart-row img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3e7de;
}
.cart-item-title {
  font-weight: 850;
  margin-bottom: 6px;
}
.cart-item-meta {
  color: #8a7d76;
  font-size: 14px;
}
.cart-item-meta .current-price {
  color: #bb6764;
  font-weight: 850;
}
.cart-item-meta .old-price {
  color: #9d9490;
  text-decoration: line-through;
  font-weight: 700;
}
.cart-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.qty-control button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff7f4;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 900;
}
.qty-control span {
  min-width: 40px;
  text-align: center;
  font-weight: 800;
}
.remove-item {
  border: 0;
  background: transparent;
  color: #9a6b67;
  cursor: pointer;
  font-weight: 800;
}
.cart-sum {
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 900;
}
.cart-empty {
  padding: 34px;
  text-align: center;
  color: #766b66;
}
.checkout-panel {
  padding: 24px;
  position: sticky;
  top: 96px;
}
.checkout-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}
.checkout-form {
  display: grid;
  gap: 14px;
}
.checkout-form label {
  display: grid;
  gap: 7px;
  color: #352f2b;
  font-weight: 800;
}
.checkout-form input,
.checkout-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  background: #fff;
  color: #302b28;
  font: inherit;
}
.checkout-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9a6b67 50%),
    linear-gradient(135deg, #9a6b67 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.np-field {
  position: relative;
}
.np-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(79, 48, 35, .13);
  overscroll-behavior: contain;
}
.np-warehouse-dropdown {
  max-height: min(320px, 46vh);
}
.np-dropdown.open {
  display: block;
}
.np-dropdown button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1e5df;
  background: #fff;
  padding: 11px 13px;
  text-align: left;
  cursor: pointer;
  color: #302b28;
  line-height: 1.35;
  white-space: normal;
}
.np-dropdown button:hover {
  background: #fff7f4;
}
.np-dropdown button b,
.np-dropdown button span {
  display: block;
}
.np-dropdown button b {
  font-size: 14px;
  font-weight: 850;
}
.np-dropdown button span,
.np-help,
.np-empty {
  color: #8a7d76;
  font-size: 13px;
  font-weight: 500;
}
.np-empty {
  padding: 12px 13px;
}
.np-help {
  margin-top: -2px;
}
.np-field input:disabled {
  background: #fff7f4;
  color: #8a7d76;
  cursor: not-allowed;
}
.is-hidden {
  display: none !important;
}
.payment-options {
  display: grid;
  gap: 9px;
  margin: 4px 0 6px;
}
.payment-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fffaf7;
  cursor: pointer;
}
.payment-options input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--accent);
}
.payment-options span {
  display: block;
  color: #8a7d76;
  font-size: 13px;
  font-weight: 500;
}
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 900;
}
.cart-total strong {
  color: var(--accent-dark);
  font-size: 26px;
}
.form-note,
.checkout-error {
  color: #8a7d76;
  font-size: 13px;
  margin: 0;
}
.checkout-error {
  display: none;
  color: #9b3d37;
  background: #fff0ee;
  border-radius: 10px;
  padding: 10px 12px;
}
.order-result {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px;
  text-align: center;
}
.order-result h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 56px);
  margin: 0 0 14px;
  font-weight: 500;
  letter-spacing: -.04em;
}
.order-result p {
  color: #766b66;
  font-size: 17px;
}
.order-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.product-card-actions .quick {
  margin-top: 0;
}
.quick.add-cart-mini {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 860px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .checkout-panel {
    position: static;
  }
}
@media (max-width: 640px) {
  .cart-page {
    padding-top: 24px;
  }
  .cart-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }
  .cart-row img {
    width: 82px;
    height: 82px;
  }
  .cart-controls {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .checkout-panel {
    padding: 18px;
  }
  .product-card-actions {
    grid-template-columns: 1fr;
  }
}
