/* ==========================================
   CART PAGE
========================================== */
.cart-page {
    min-height: 70vh;
    padding: 64px 24px 96px;
    background: #faf8f5;
    color: #292625;
}
.cart-page [hidden] { display: none; }
.cart-container { width: min(100%, 1200px); margin: 0 auto; }
.cart-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.cart-heading h1 { margin: 0 0 8px; font: 400 clamp(32px, 4vw, 44px)/1.2 Georgia, serif; }
.cart-heading p { margin: 0; color: #746d68; font-size: 15px; line-height: 1.6; }
.cart-continue { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 17px; border: 1px solid #704d40; border-radius: 5px; color: #704d40; font-size: 14px; font-weight: 600; white-space: nowrap; transition: color 200ms ease, background-color 200ms ease; }
.cart-continue:hover { color: #fff; background: #704d40; }
.cart-page a:focus-visible, .cart-page button:focus-visible { outline: 2px solid #704d40; outline-offset: 3px; }

/* ==========================================
   CART LAYOUT
========================================== */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px; }
.cart-items, .cart-summary, .cart-empty { border: 1px solid #e9e3dc; border-radius: 8px; background: #fff; }
.cart-items { min-width: 0; padding: 26px 28px; }
.cart-items-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 13px; }
.cart-items-heading h2, .cart-summary h2 { margin: 0; font: 400 23px/1.3 Georgia, serif; }
.cart-items-heading > span { color: #80766e; font-size: 13px; white-space: nowrap; }
.cart-item { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-top: 1px solid #eee7e1; }
.cart-item-image { display: flex; align-items: center; justify-content: center; width: 126px; aspect-ratio: 1 / 1.15; overflow: hidden; border-radius: 5px; background: #f5f0eb; }
.cart-item-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cart-image-placeholder { padding: 12px; color: #80766e; font-size: 12px; text-align: center; }
.cart-item-info { min-width: 0; display: flex; flex-direction: column; }
.cart-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cart-item-info h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.cart-item-info h3 a:hover { color: #704d40; }
.cart-item-subtitle { margin: 0 0 8px; color: #746d68; font-size: 13px; line-height: 1.5; }
.cart-item-unit-price { margin: 0 0 16px; color: #746d68; font-size: 13px; }
.cart-item-bottom { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.cart-item-subtotal { color: #704d40; font-size: 17px; white-space: nowrap; }

/* ==========================================
   CART QUANTITY CONTROLS
========================================== */
.cart-quantity { display: inline-flex; align-items: center; height: 42px; border: 1px solid #d8cbc1; border-radius: 5px; }
.cart-quantity button { display: grid; place-items: center; width: 42px; height: 40px; padding: 0; border: 0; background: transparent; color: #704d40; font-size: 20px; cursor: pointer; }
.cart-quantity button:hover:not(:disabled) { background: #f5f0eb; }
.cart-quantity button:disabled, .cart-remove-button:disabled { opacity: 0.38; cursor: not-allowed; }
.cart-quantity span { min-width: 30px; color: #292625; font-size: 14px; font-weight: 600; text-align: center; }
.cart-remove-button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin: -7px -7px 0 0; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #80766e; cursor: pointer; }
.cart-remove-button:hover:not(:disabled) { color: #704d40; background: #f5f0eb; }

/* ==========================================
   ORDER SUMMARY
========================================== */
.cart-summary { position: sticky; top: 24px; padding: 27px; }
.cart-summary h2 { margin-bottom: 26px; }
.cart-summary-row, .cart-summary-total { display: flex; justify-content: space-between; gap: 12px; }
.cart-summary-row { margin-bottom: 17px; color: #655e59; font-size: 14px; }
.cart-delivery-note { margin: 22px 0; padding: 13px 0; border-top: 1px solid #eee7e1; border-bottom: 1px solid #eee7e1; color: #746d68; font-size: 13px; line-height: 1.6; }
.cart-summary-total { align-items: baseline; margin-bottom: 22px; font-size: 15px; font-weight: 600; }
.cart-summary-total strong { color: #704d40; font-size: 21px; white-space: nowrap; }
.cart-checkout-button, .cart-primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border: 1px solid #704d40; border-radius: 5px; background: #704d40; color: #fff; font: 600 14px/1.3 Arial, sans-serif; text-align: center; }
.cart-checkout-button { width: 100%; }
.cart-checkout-button:disabled { opacity: 0.58; cursor: not-allowed; }
.cart-primary-button:hover { color: #fff; background: #563a30; }
.cart-checkout-note { margin: 12px 0 0; color: #80766e; font-size: 12px; line-height: 1.5; text-align: center; }

/* ==========================================
   EMPTY CART
========================================== */
.cart-empty { display: flex; flex-direction: column; align-items: center; padding: 72px 24px; text-align: center; }
.cart-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; color: #704d40; }
.cart-empty h2 { margin: 0 0 9px; font: 400 27px/1.3 Georgia, serif; }
.cart-empty p { margin: 0 0 25px; color: #746d68; font-size: 14px; line-height: 1.6; }

/* ==========================================
   RESPONSIVE CART
========================================== */
@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 600px) {
    .cart-page { padding: 38px 16px 70px; }
    .cart-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 26px; }
    .cart-items, .cart-summary { padding: 18px; }
    .cart-item { grid-template-columns: 88px minmax(0, 1fr); gap: 13px; }
    .cart-item-image { width: 88px; }
    .cart-item-info h3 { font-size: 14px; }
    .cart-item-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
    .cart-item-unit-price { margin-bottom: 12px; }
    .cart-empty { padding: 58px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .cart-page a, .cart-page button { transition: none; }
}
