/* =============================================================
   iLMS Cart Page — cart.css
   ============================================================= */

.ilms-cart-page {
    background: #f8f9fb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', sans-serif;
    min-height: 100vh;
}

.ilms-cart-wrap {
    padding: 48px 0 80px;
}

.ilms-cart-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.ilms-cart-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1d2d44;
    margin: 0 0 32px;
}

/* ── Empty state ── */
.ilms-cart-empty {
    text-align: center;
    padding: 80px 24px;
    color: #9ca3af;
}
.ilms-cart-empty p {
    font-size: 16px;
    margin: 16px 0 24px;
}
.ilms-cart-browse-btn {
    display: inline-block;
    background: #d63a4a;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.ilms-cart-browse-btn:hover { background: #b8303e; color: #fff; }

/* ── Layout ── */
.ilms-cart-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

/* ── Cart items ── */
.ilms-cart-items {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow: hidden;
}

.ilms-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f2f5;
    transition: background .1s;
}
.ilms-cart-item:last-child { border-bottom: none; }
.ilms-cart-item:hover { background: #fafbfc; }

.ilms-cart-item-img {
    flex-shrink: 0;
    width: 88px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}
.ilms-cart-item-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.ilms-cart-item-img--empty {
    background: #eef0f3;
}

.ilms-cart-item-info {
    flex: 1;
    min-width: 0;
}
.ilms-cart-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2d44;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ilms-cart-item-title:hover { color: #d63a4a; }
.ilms-cart-item-plan {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.ilms-cart-item-price {
    flex-shrink: 0;
    text-align: right;
}
.ilms-cart-orig {
    font-size: 12px;
    color: #b0b8c4;
    display: block;
}
.ilms-cart-price {
    font-size: 16px;
    font-weight: 700;
    color: #1d2d44;
}

.ilms-cart-remove {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #c4cdd6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background .15s, color .15s;
    padding: 0;
}
.ilms-cart-remove:hover { background: #fef2f2; color: #d63a4a; }

/* ── Summary ── */
.ilms-cart-summary {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    padding: 24px;
    position: sticky;
    top: 88px;
}
.ilms-cart-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #1d2d44;
    margin: 0 0 20px;
}
.ilms-cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}
.ilms-cart-summary-row--total {
    font-size: 18px;
    font-weight: 700;
    color: #1d2d44;
    border-top: 1px solid #f0f2f5;
    padding-top: 14px;
    margin-top: 4px;
    margin-bottom: 20px;
}
.ilms-cart-checkout-btn {
    display: block;
    width: 100%;
    background: #d63a4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.ilms-cart-checkout-btn:hover { background: #b8303e; color: #fff; }

.ilms-cart-continue-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s;
}
.ilms-cart-continue-link:hover { color: #1d2d44; }

.ilms-cart-login-notice {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 10px;
}

/* ── RWD ── */
@media (max-width: 720px) {
    .ilms-cart-layout {
        grid-template-columns: 1fr;
    }
    .ilms-cart-summary {
        position: static;
    }
    .ilms-cart-item {
        flex-wrap: wrap;
    }
}
