/* ============================================================================
   Cart page — theme-adaptive (mirrors checkout.css: works with light & dark)
   ========================================================================== */

.cart-container {
    max-width: var(--container-width, 1000px);
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.cart-title h1 {
    font-size: var(--h2-size, 36px);
    font-weight: 800;
    color: var(--heading-color);
    margin: 0 0 24px;
    text-align: center;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 820px) {
    .cart-grid { grid-template-columns: 1fr; }
}

/* Cards — solid surface with soft shadow so they stand out on the light theme */
.cart-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Cart line items */
.cart-items { display: flex; flex-direction: column; gap: 16px; }

.cart-item {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 16px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }

.cart-item-thumb {
    width: 84px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(128, 128, 128, 0.12);
    border: 1px solid rgba(128, 128, 128, 0.18);
}
.cart-item-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.7rem;
}

.cart-item-info { min-width: 0; }
.cart-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 4px;
    line-height: 1.3;
}
.cart-item-title a { color: inherit; text-decoration: none; }
.cart-item-title a:hover { text-decoration: underline; }
.cart-item-meta { font-size: 0.8rem; color: var(--text-color); opacity: 0.7; margin: 0 0 8px; }

.cart-item-price { font-weight: 600; color: var(--heading-color); }
.cart-item-price .original {
    text-decoration: line-through;
    color: var(--text-color);
    opacity: 0.6;
    font-weight: 400;
    margin-right: 6px;
    font-size: 0.85em;
}

/* Quantity stepper */
.cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(128, 128, 128, 0.28);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}
.cart-qty a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--heading-color);
    font-size: 1.1rem;
    line-height: 1;
    background: rgba(128, 128, 128, 0.08);
}
.cart-qty a:hover { background: rgba(128, 128, 128, 0.18); }
.cart-qty .qty-val {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--heading-color);
}

.cart-item-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-item-linetotal { font-size: 1.05rem; font-weight: 700; color: var(--heading-color); }

.cart-remove {
    font-size: 0.78rem;
    color: #ef4444;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cart-remove:hover { text-decoration: underline; }

/* Summary card */
.cart-summary h2 {
    font-size: var(--h4-size, 22px);
    margin: 0 0 16px;
    color: var(--heading-color);
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-color);
}
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 4px;
    margin-top: 8px;
    border-top: 2px solid rgba(128, 128, 128, 0.28);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--heading-color);
}

.cart-checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 18px;
    padding: 15px 20px;
    background: var(--button-color, var(--primary-color));
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s ease;
}
.cart-checkout-btn:hover { filter: brightness(1.08); }

.cart-continue {
    display: inline-block;
    margin-top: 14px;
    color: var(--link-color, #60a5fa);
    text-decoration: none;
    font-size: 0.9rem;
}
.cart-continue:hover { text-decoration: underline; }

.cart-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--text-color);
    opacity: 0.75;
}

/* Trust / accepted payment icons */
.cart-payment-icons,
.checkout-payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.cart-payment-icons img,
.checkout-payment-icons img {
    height: 28px;
    width: auto;
    display: block;
}

/* Empty cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}
.cart-empty svg { color: var(--text-color); opacity: 0.35; margin-bottom: 16px; }
.cart-empty h2 { color: var(--heading-color); margin: 0 0 8px; }
.cart-empty p { color: var(--text-color); opacity: 0.75; margin: 0 0 20px; }
.cart-empty .cart-checkout-btn { display: inline-block; width: auto; padding-left: 34px; padding-right: 34px; }

/* Checkout: accepted-payment footer block */
.checkout-accepted {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(128, 128, 128, 0.18);
    text-align: center;
}
.checkout-accepted .label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.6;
    margin: 0 0 10px;
}

/* Checkout: cart line items in the order summary */
.checkout-cart-items { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }
.checkout-cart-item {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
}
.checkout-cart-item img {
    width: 46px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.18);
}
.checkout-cart-item-noimg {
    width: 46px;
    height: 56px;
    border-radius: 8px;
    background: rgba(128, 128, 128, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-color);
    opacity: 0.6;
    text-align: center;
}
.checkout-cart-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checkout-cart-item-name { font-weight: 600; color: var(--heading-color); font-size: 0.9rem; line-height: 1.25; }
.checkout-cart-item-qty { font-size: 0.78rem; color: var(--text-color); opacity: 0.7; }
.checkout-cart-item-price { font-weight: 600; color: var(--heading-color); font-size: 0.9rem; white-space: nowrap; }
.checkout-edit-cart {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--link-color, #60a5fa);
    text-decoration: none;
    margin-bottom: 6px;
}
.checkout-edit-cart:hover { text-decoration: underline; }
.price-block .cart-total-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-color); opacity: 0.6; margin-bottom: 2px; }

/* Checkout: professional order summary (subtotal / discount / total) */
.order-summary {
    margin-top: 14px;
    padding-top: 6px;
}
.order-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    font-size: 0.95rem;
    color: var(--text-color);
}
.order-summary-row .os-label { opacity: 0.85; }
.order-summary-row .os-value { font-weight: 600; white-space: nowrap; }
.order-summary-row.os-discount .os-value { color: #16a34a; }
.order-summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid rgba(128, 128, 128, 0.28);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--heading-color);
}
.order-summary-total .os-value { white-space: nowrap; }
.order-summary-total .os-value .currency { font-size: 0.7em; font-weight: 600; opacity: 0.7; margin-left: 2px; }

