/* ============================================
   Cart Page – Figma-aligned styles
   Two-column layout: products left, summary right
   ============================================ */

/* --- Page-level two-column grid --- */
.cart-page {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}
@media screen and (max-width: 999px) {
  .cart-page {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* --- Left column: title + shipping bar + products --- */
.cart-page__main {
  min-width: 0;
}

/* Title */
.cart-page__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 16px;
}
@media screen and (max-width: 767px) {
  .cart-page__title {
    font-size: 22px;
  }
}

/* Free shipping bar */
.cart-page__shipping-bar {
  margin-bottom: 24px;
}
.cart-page__shipping-bar--text {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 8px;
}
@media screen and (max-width: 767px) {
  .cart-page__shipping-bar--text {
    font-size: 13px;
  }
}
.cart-page__shipping-bar--text strong {
  font-weight: 700;
}
.cart-page__shipping-bar--track {
  width: 100%;
  height: 6px;
  background-color: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.cart-page__shipping-bar--fill {
  height: 100%;
  background-color: #000;
  transition: width 0.4s ease;
}

/* --- Product cards --- */
.cart-page__items {
  display: flex;
  flex-direction: column;
}

.cart-page__product-card {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.cart-page__product-card:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.cart-page__product-card:last-child {
  border-bottom: none;
}
@media screen and (max-width: 767px) {
  .cart-page__product-card {
    gap: 16px;
    padding: 16px 0;
  }
}

.cart-page__product-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}
@media screen and (max-width: 767px) {
  .cart-page__product-image {
    width: 80px;
    height: 80px;
  }
}
.cart-page__product-image img,
.cart-page__product-image .theme-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-page__product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-page__product-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-word;
}
@media screen and (max-width: 767px) {
  .cart-page__product-title {
    font-size: 13px;
  }
}
.cart-page__product-title a {
  color: inherit;
  text-decoration: none;
}

.cart-page__product-subtitle {
  font-size: 13px;
  line-height: 1.54;
  color: #231F20;
  word-break: break-word;
}

.cart-page__product-meta {
  font-size: 12px;
  color: var(--text-color-transparent7, rgba(0,0,0,0.55));
}
.cart-page__product-meta span:first-child:not(:only-child) {
  color: var(--text-color-transparent7, rgba(0,0,0,0.55));
}

.cart-page__product-badge {
  width: fit-content;
  color: var(--badge-font-color);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  padding: 5px 8px;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--badge-border-radius);
}
.cart-page__product-badge--sale {
  background: var(--sale-badge-color);
}
.cart-page__product-badge--preorder {
  background: var(--preorder-badge-color);
}

.cart-page__product-remove {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.69;
  color: #231F20;
  text-decoration: underline;
  cursor: pointer;
  margin-top: auto;
}
.cart-page__product-remove:hover {
  opacity: 0.7;
}

.cart-page__product-price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-align: right;
  word-break: break-word;
}
@media screen and (max-width: 767px) {
  .cart-page__product-price {
    font-size: 13px;
  }
}
.cart-page__product-price--compare {
  text-decoration: line-through;
  color: rgba(0, 0, 0, 0.5);
  display: block;
}
.cart-page__product-price--sale {
  color: var(--on-sale-color);
}

/* line-item discount badges */
.cart-page__line-discount {
  width: fit-content;
  color: var(--badge-font-color);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  padding: 5px 8px;
  text-transform: uppercase;
  background: var(--sale-badge-color);
  border-radius: var(--badge-border-radius);
}

/* properties */
.cart-page__property {
  font-size: 12px;
}
.cart-page__property .property-name {
  color: var(--text-color-transparent7, rgba(0,0,0,0.55));
}

/* --- Right column: Order summary --- */
.cart-page__summary {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 8px;
  padding: 24px;
  background-color: #F2EFEC;
}
@media screen and (max-width: 999px) {
  .cart-page__summary {
    position: static;
    border: none;
    padding: 20px;
  }
}

/* Add Order Note trigger */
.cart-page__note-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.6;
  color: inherit;
}
@media screen and (max-width: 767px) {
  .cart-page__note-trigger {
    font-size: 13px;
  }
}
.cart-page__note-trigger:hover {
  opacity: 0.7;
}
.cart-page__note-trigger-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Note panel (collapsible) */
.cart-page__note-panel {
  display: none;
  padding-top: 12px;
}
.cart-page__note-panel.is-open {
  display: block;
}
.cart-page__note-textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

/* Discount badges in summary */
.cart-page__cart-discount {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-page__cart-discount .cart-page__product-badge {
  margin-left: auto;
}

/* Subtotal */
.cart-page__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 16px;
  padding-bottom: 16px;
}
.cart-page__subtotal-label {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.56;
}
.cart-page__subtotal-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.56;
}
@media screen and (max-width: 767px) {
  .cart-page__subtotal-label,
  .cart-page__subtotal-value {
    font-size: 15px;
  }
}
.cart-page__subtotal-compare {
  text-decoration: line-through;
  color: rgba(0, 0, 0, 0.5);
}
.cart-page__subtotal-sale {
  color: var(--on-sale-color);
}
.cart-page__subtotal-currency {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.54;
  color: #231F20;
}

/* Shipping estimate */
.cart-page__shipping-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.6;
}
@media screen and (max-width: 767px) {
  .cart-page__shipping-info {
    font-size: 13px;
  }
}

/* Checkout button */
.cart-page__checkout-btn {
  width: 100%;
  border-radius: 100px;
  padding: 13px 32px;
  font-size: 15px;
  line-height: 1.47;
  text-align: center;
}

/* Additional checkout buttons */
.cart-page__additional-checkout {
  margin-top: 4px;
}

/* --- Empty cart --- */
.cart--empty-cart {
  display: flex;
  flex-direction: column;
  align-items: var(--empty-cart-content-alignment);
}
.cart--empty-btn-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media screen and (max-width: 767px) {
  .cart--empty-btn-container {
    gap: 15px;
  }
}
.cart--empty-btn {
  width: 100%;
}

/* --- Recommendations --- */
.cart--recommendations {
  margin-top: 32px;
}
.cart--recommendations .section-title--container {
  margin: 0;
}
@media screen and (min-width: 1024px) {
  .cart--recommendations {
    margin-top: 80px;
  }
}
.cart--recommendations-heading {
  margin-bottom: 15px;
}

/* --- Vendor --- */
.cart--vendor {
  font-size: 12px;
  word-break: break-word;
}
.cart--vendor:not(:first-child) {
  margin-top: 2px;
}