/* ==========================================
   CART PAGE – cart-page.css
   ========================================== */

.cart-page {
  background: #fff;
  min-height: 60vh;
  padding: 30px 20px 50px;
}

.cart-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #111;
  margin-bottom: 30px;
  text-align: center;
}

.cart-flash {
  max-width: 700px;
  margin: 0 auto 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.cart-flash-success {
  background: #ecfdf3;
  color: #146c43;
  border: 1px solid #b7f3cd;
}

.cart-flash-error {
  background: #fff3f3;
  color: #9b1c1c;
  border: 1px solid #ffd8d8;
}

/* ── Empty State ── */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 60px 20px;
  text-align: center;
}

.cart-empty p {
  font-size: 16px;
  color: #888;
  letter-spacing: 0.5px;
}

.cart-empty .btn {
  padding: 14px 40px;
  margin-top: 10px;
}

/* ── Cart Table Header (desktop) ── */
.cart-table-header {
  display: none;
}

/* ── Cart Item Row ── */
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.cart-item:first-child {
  border-top: 1px solid #eee;
}

/* Product info */
.ci-product {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ci-img {
  flex-shrink: 0;
  width: 80px;
  height: 100px;
  background: #f2f2f2;
  overflow: hidden;
}

.ci-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ci-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ci-name {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  transition: color 0.2s;
}

.ci-name:hover {
  color: #555;
}

.ci-variant {
  font-size: 12px;
  color: #999;
}

.ci-size {
  font-size: 12px;
  color: #666;
}

.ci-unit-price {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin-top: 4px;
}

/* Quantity controls */
.ci-qty {
  display: flex;
  align-items: center;
}

.ci-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
}

.ci-qty-btn {
  width: 32px;
  height: 32px;
  background: #fff;
  border: none;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: background 0.2s;
}

.ci-qty-btn:hover {
  background: #f5f5f5;
}

.ci-qty-val {
  width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  padding: 6px 0;
}

/* Total & Remove */
.ci-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.ci-line-total {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.ci-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #999;
  transition: color 0.2s;
}

.ci-remove:hover {
  color: #111;
}

/* ── Cart Summary ── */
.cart-summary {
  padding: 30px 0;
  max-width: 400px;
  margin-left: auto;
}

.coupon-box {
  margin-bottom: 14px;
}

.coupon-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.coupon-input {
  border: 1px solid #ddd;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}

.coupon-input:focus {
  border-color: #111;
}

.coupon-apply-btn,
.coupon-remove-btn {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
}

.coupon-remove-btn {
  background: #fff;
  color: #111;
}

.coupon-applied-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd;
  padding: 10px 12px;
  font-size: 13px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.cart-summary-row.shipping-note span:last-child {
  font-size: 12px;
  color: #999;
}

.cart-total-row {
  font-size: 18px;
  font-weight: 700;
  border-top: 1px solid #eee;
  padding-top: 16px;
  margin-top: 8px;
}

.cart-discount-row {
  color: #0b7a3e;
  font-weight: 600;
}

.coupon-free-shipping-note {
  margin-top: 8px;
  color: #666;
  font-size: 12px;
}

.cart-checkout-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
  margin-top: 20px;
}

.cart-continue {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #888;
  margin-top: 14px;
  text-decoration: underline;
  transition: color 0.2s;
}

.cart-continue:hover {
  color: #111;
}

/* ==========================================
   RESPONSIVE – TABLET (768px+)
   ========================================== */
@media (min-width: 768px) {
  .cart-page {
    padding: 40px 40px 60px;
  }

  .cart-title {
    text-align: left;
    font-size: 28px;
  }

  .cart-table-header {
    display: grid;
    grid-template-columns: 1fr 140px 120px;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
  }

  .cth-qty {
    text-align: center;
  }

  .cth-total {
    text-align: right;
  }

  .cart-item {
    grid-template-columns: 1fr 140px 120px;
  }

  .ci-img {
    width: 100px;
    height: 120px;
  }

  .ci-qty {
    justify-content: center;
  }
}

/* ==========================================
   RESPONSIVE – DESKTOP (1024px+)
   ========================================== */
@media (min-width: 1024px) {
  .cart-page {
    padding: 40px 60px 80px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .cart-title {
    font-size: 30px;
  }

  .ci-img {
    width: 110px;
    height: 140px;
  }

  .ci-name {
    font-size: 15px;
  }
}
