/* ── Cart Page Specific Styles ── */

.cart-page-main {
  padding: 60px 0 100px;
}

.cart-header {
  margin-bottom: 40px;
}

.cart-title {
  font-size: 36px;
  color: var(--brown);
  margin: 0 0 10px;
  font-family: 'Georgia', serif;
  display: flex;
  align-items: center;
  gap: 15px;
}

.item-count {
  font-size: 16px;
  background: var(--gold);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  vertical-align: middle;
}

.cart-layout {
  display: grid;
  grid-template-columns: 65% 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Cart Items ── */
.cart-items-container {
  display: flex;
  flex-direction: column;
}

.cart-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--light-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--light-border);
}

.item-product {
  display: flex;
  align-items: center;
  gap: 20px;
}

.item-img {
  width: 80px;
  height: 80px;
  background: #fdf8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid rgba(209, 181, 63, 0.2);
}

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

.item-details h4 {
  margin: 0 0 5px;
  font-size: 16px;
  color: var(--brown);
  font-weight: 600;
}

.item-details p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.item-price, .item-subtotal {
  font-size: 16px;
  color: var(--brown);
  font-weight: 500;
}

.item-subtotal {
  color: var(--gold);
  font-weight: 600;
}

.item-qty .qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--light-border);
  border-radius: 30px;
  padding: 2px;
  height: 40px;
  width: 100px;
}

.item-qty .qty-btn {
  width: 30px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.item-qty .qty-btn:hover {
  color: var(--gold);
}

.item-qty .qty-input {
  width: 30px;
  border: none;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--brown);
  background: transparent;
  pointer-events: none;
}

.item-remove {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 10px;
}

.item-remove:hover {
  color: #d9534f;
}

/* ── Order Summary ── */
.order-summary {
  background: #fdf8f0;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(221, 213, 200, 0.5);
  position: sticky;
  top: 100px;
}

.summary-title {
  font-size: 22px;
  color: var(--brown);
  margin: 0 0 25px;
  font-weight: 600;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 16px;
  color: var(--text-muted);
}

.summary-row span:last-child {
  color: var(--brown);
  font-weight: 500;
}

.summary-row.shipping span:last-child {
  color: #28a745;
}

.discount-code {
  display: flex;
  margin: 25px 0;
  gap: 10px;
}

.discount-code input {
  flex: 1;
  height: 46px;
  border: 1px solid var(--light-border);
  border-radius: 10px;
  padding: 0 15px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.discount-code input:focus {
  border-color: var(--gold);
}

.discount-code button {
  height: 46px;
  padding: 0 20px;
  background: var(--brown);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
  font-family: inherit;
}

.discount-code button:hover {
  background: var(--gold);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin: 25px 0;
  font-size: 22px;
  color: var(--brown);
  font-weight: 700;
}

.summary-total span:last-child {
  color: var(--gold);
}

.checkout-btn {
  display: block;
  width: 100%;
  height: 56px;
  line-height: 56px;
  text-align: center;
  background: var(--gold);
  color: #fff;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.checkout-btn:hover {
  background: var(--brown);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(135, 85, 25, 0.15);
}

.continue-shopping {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

.continue-shopping:hover {
  color: var(--brown);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cart-table-header, .cart-item {
    grid-template-columns: 2fr 1fr 1fr auto;
  }
  .cart-table-header span:nth-child(2), .item-price {
    display: none;
  }
}

@media (max-width: 860px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .order-summary {
    position: static;
  }
  .cart-table-header {
    display: none;
  }
  .cart-item {
    grid-template-columns: 1fr auto;
    row-gap: 15px;
  }
  .item-product {
    grid-column: 1 / -1;
  }
  .item-qty, .item-subtotal, .item-remove {
    grid-row: 2;
  }
  .item-subtotal {
    text-align: right;
  }
  
  /* Sticky Mobile Action Bar */
  .order-summary {
    padding-bottom: 90px;
  }
  .checkout-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    border-radius: 0;
    z-index: 900;
    height: 70px;
    line-height: 70px;
    font-size: 18px;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.1);
  }
  .cart-page-main {
    padding-bottom: 120px;
  }
}
