/* ================================================================
   CART PAGE — Web/Desktop CSS
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Nunito Sans', sans-serif;
    background: var(--bg-color, #f5f5f5);
    color: var(--text-color, #1a1a2e);
    padding-bottom: 62px;
}
@media(min-width:768px) { body { padding-bottom: 0; } }

.pw { max-width: 1300px; margin: 0 auto; padding: 20px 16px 60px; }
@media(min-width:768px) { .pw { padding: 28px 24px 80px; } }

/* ── Header Row ── */
.cart-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.cart-h1 { font-family: 'Nunito Sans', sans-serif; font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 900; }
.cart-h1 i { color: var(--primary-color); }
.cart-count-badge { background: var(--primary-light, rgba(52,152,219,.12)); color: var(--primary-color); padding: 4px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }

/* ── Login Nudge ── */
.nudge { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; gap: 10px; flex-wrap: wrap; }
.nudge a { color: #16a34a; font-weight: 700; text-decoration: none; }

/* ── Reorder Notice ── */
.reorder-notice { background: #d1fae5; color: #065f46; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; font-size: .88rem; border: 1px solid #a7f3d0; }
.reorder-skip { color: #92400e; }

/* ── Layout ── */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media(min-width:900px) { .cart-layout { grid-template-columns: 1fr 360px; gap: 28px; } }

/* ── Cart Item ── */
.cart-item { background: var(--card-bg, #fff); border-radius: 16px; border: 1px solid var(--border-color, #eee); padding: 16px; margin-bottom: 10px; display: flex; gap: 14px; align-items: flex-start; transition: box-shadow .2s; }
.cart-item:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
.ci-img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-color, #f0f0f0); }
@media(min-width:480px) { .ci-img { width: 104px; height: 104px; } }
.ci-body { flex: 1; min-width: 0; }
.ci-name { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: .92rem; color: var(--text-color, #1a1a2e); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 5px; line-height: 1.35; }
.ci-variant { font-size: .76rem; color: #aaa; font-weight: 500; margin-bottom: 9px; }
.ci-price-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ci-price { font-family: 'Nunito Sans', sans-serif; font-size: .98rem; font-weight: 800; color: var(--primary-color); }
.ci-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── Qty Control ── */
.qty-ctrl { display: flex; align-items: center; border: 1.5px solid var(--border-color, #e4e4e4); border-radius: 9px; overflow: hidden; }
.qty-ctrl button { width: 32px; height: 32px; border: none; background: none; cursor: pointer; font-size: 1rem; font-weight: 800; color: var(--text-color); transition: background .15s; }
.qty-ctrl button:hover { background: var(--bg-color, #f5f5f5); }
.qty-ctrl .qty-num { width: 34px; text-align: center; font-weight: 800; font-size: .88rem; font-family: 'Nunito Sans', sans-serif; border: none; background: transparent; color: var(--text-color); }

/* ── Action Links ── */
.act-link { background: none; border: none; cursor: pointer; font-size: .78rem; font-weight: 700; padding: 5px 9px; border-radius: 7px; transition: .15s; font-family: 'Nunito Sans', sans-serif; }
.act-rm { color: #e74c3c; }
.act-rm:hover { background: #fee2e2; }
.act-sv { color: var(--primary-color); }
.act-sv:hover { background: var(--primary-light, rgba(52,152,219,.1)); }

/* ── Low Stock ── */
.low-stock { font-size: .76rem; font-weight: 700; color: #f59e0b; display: flex; align-items: center; gap: 4px; margin-top: 5px; }

/* ── Line Total ── */
.line-total { font-family: 'Nunito Sans', sans-serif; font-size: 1rem; font-weight: 900; color: var(--text-color, #1a1a2e); flex-shrink: 0; padding-top: 4px; }
@media(max-width:480px) { .line-total { display: none; } }

/* ── Cart Footer ── */
.cart-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 4px; }
.clear-btn { background: none; border: none; cursor: pointer; font-size: .8rem; color: #bbb; font-weight: 600; font-family: 'Nunito Sans', sans-serif; display: flex; align-items: center; gap: 5px; }
.clear-btn:hover { color: #e74c3c; }
.add-more-link { font-size: .8rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }

/* ── Order Summary ── */
.summ-card { background: var(--card-bg, #fff); border-radius: 18px; border: 1px solid var(--border-color, #eee); padding: 22px; }
@media(min-width:900px) { .summ-card { position: sticky; top: 80px; } }
.summ-title { font-family: 'Nunito Sans', sans-serif; font-weight: 800; font-size: 1rem; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-color, #eee); }
.summ-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: .88rem; }
.summ-row:not(:last-child) { border-bottom: 1px solid var(--border-color, #f5f5f5); }
.summ-val { font-weight: 700; }
.summ-free { font-weight: 700; color: #16a34a; }
.summ-total-row { border-bottom: none; padding-top: 12px; }
.summ-total { font-family: 'Nunito Sans', sans-serif; font-size: 1.2rem; font-weight: 900; color: var(--primary-color); }
.save-badge { background: #dcfce7; color: #16a34a; padding: 8px 12px; border-radius: 10px; font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.checkout-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; background: var(--primary-color); color: #fff; border-radius: 12px; font-weight: 800; font-size: .95rem; text-decoration: none; font-family: 'Nunito Sans', sans-serif; transition: opacity .2s; margin-top: 14px; }
.checkout-btn:hover { opacity: .88; color: #fff; }
.checkout-btn i { font-size: .85rem; }
.shop-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px; border: 1.5px solid var(--border-color, #e4e4e4); border-radius: 12px; color: var(--text-color); font-weight: 700; font-size: .84rem; text-decoration: none; font-family: 'Nunito Sans', sans-serif; transition: .15s; margin-top: 8px; }
.shop-more:hover { border-color: var(--primary-color); color: var(--primary-color); }
.shop-more i { font-size: .78rem; }
.secure-txt { text-align: center; font-size: .72rem; color: #bbb; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ── Empty State ── */
.empty-cart { text-align: center; padding: 72px 20px; background: var(--card-bg, #fff); border-radius: 20px; border: 1px solid var(--border-color, #eee); }
.empty-cart .ei { font-size: 4rem; opacity: .2; margin-bottom: 18px; }
.empty-cart h3 { font-family: 'Nunito Sans', sans-serif; font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.empty-cart p { color: #aaa; font-size: .88rem; margin-bottom: 22px; }
.browse-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-color); color: #fff; padding: 12px 28px; border-radius: 12px; font-weight: 700; text-decoration: none; font-family: 'Nunito Sans', sans-serif; font-size: .9