body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f7;
    margin: 0;
    padding: 0;
    color: #1d1d1f;
}

.cart-page-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.section-eyebrow,
.price-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-eyebrow {
    color: #006edc;
    margin-bottom: 12px;
}

.cart-hero {
    margin-bottom: 26px;
}

.cart-hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.cart-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #6e6e73;
    font-size: 18px;
    line-height: 1.75;
}

.cart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.continue-shopping-link,
.clear-cart-link,
.remove-link,
.ghost-link-btn {
    text-decoration: none;
    font-weight: 600;
}

.continue-shopping-link,
.clear-cart-link,
.remove-link {
    color: #D00000;
}

.continue-shopping-link:hover,
.clear-cart-link:hover,
.remove-link:hover {
    text-decoration: underline;
}

.empty-cart-box,
.cart-table-wrapper,
.cart-summary-box {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.empty-cart-box {
    text-align: center;
    padding: 54px 28px;
}

.empty-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    font-size: 32px;
    margin-bottom: 16px;
}

.empty-cart-box h2 {
    margin: 0 0 12px;
    font-size: 34px;
    letter-spacing: -0.03em;
}

.empty-cart-box p {
    max-width: 520px;
    margin: 0 auto 24px;
    color: #6e6e73;
    line-height: 1.7;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.cart-main-column {
    min-width: 0;
}

.cart-table-wrapper {
    padding: 28px;
}

.cart-table-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cart-table-header h2,
.cart-summary-box h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -0.03em;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    padding: 20px;
    border-radius: 24px;
    background: #fbfbfd;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cart-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    border-color: rgba(0, 113, 227, 0.08);
}

.cart-item-media {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    overflow: hidden;
}

.cart-item-media img {
    width: 100%;
    max-width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.cart-item-card:hover .cart-item-media img {
    transform: scale(1.06);
}

.cart-item-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.cart-item-top-row,
.cart-item-bottom-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.item-category {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #6e6e73;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.cart-item-content h3 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.item-stock-label {
    margin: 0;
    color: #6e6e73;
    font-size: 15px;
    line-height: 1.6;
}

.item-stock-label.low-stock {
    color: #9a6700;
    font-weight: 600;
}

.item-stock-label.max-stock {
    color: #c62828;
    font-weight: 600;
}

.item-stock-label.ready-stock {
    color: #1f7a37;
    font-weight: 600;
}

.price-block,
.quantity-block,
.subtotal-block {
    min-width: 120px;
}

.price-label {
    color: #6e6e73;
    margin-bottom: 8px;
}

.price-block strong,
.subtotal-block strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: #111111;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quantity-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.quantity-input {
    width: 86px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
    color: #111111;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quantity-input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.cart-actions-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.primary-link-btn,
.secondary-btn,
.ghost-link-btn,
.checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-link-btn,
.secondary-btn,
.ghost-link-btn {
    min-height: 50px;
    padding: 0 20px;
    font-size: 15px;
}

.primary-link-btn,
.checkout-btn {
    background: #111111;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.primary-link-btn:hover,
.checkout-btn:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.secondary-btn {
    background: #111111;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.secondary-btn:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.ghost-link-btn {
    background: #f3f4f6;
    color: #111111;
}

.ghost-link-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.top-update-btn {
    min-height: 48px;
}

.cart-summary-box {
    position: sticky;
    top: 110px;
    padding: 28px;
}

.cart-summary-box h2 {
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    font-size: 16px;
}

.summary-line strong {
    font-size: 18px;
    transition: color 0.2s ease;
}

.grand-total-line {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.grand-total-line strong {
    font-size: 24px;
    letter-spacing: -0.03em;
}

.membership-summary-card,
.shipping-note-card {
    margin-top: 20px;
    padding: 18px 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.membership-summary-card h3,
.shipping-note-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.membership-summary-card p,
.shipping-note-card p {
    margin: 0;
    color: #6e6e73;
    line-height: 1.65;
}

.checkout-btn {
    width: 100%;
    max-width: 100%;
    min-height: 54px;
    margin-top: 24px;
    font-size: 16px;
    box-sizing: border-box;
    animation: checkoutPulse 2.8s ease-in-out infinite;
}

@keyframes checkoutPulse {
    0%, 100% {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
    }
}

@media (max-width: 960px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-box {
        position: static;
        top: auto;
    }
}

@media (max-width: 768px) {
    .cart-page-wrapper {
        padding: 24px 16px 60px;
    }

    .cart-hero h1 {
        font-size: 38px;
    }

    .cart-table-wrapper,
    .cart-summary-box {
        padding: 22px 18px;
    }

    .cart-item-card {
        grid-template-columns: 1fr;
    }

    .cart-item-media {
        min-height: 180px;
    }

    .cart-item-media img {
        max-width: 150px;
        height: 150px;
    }

    .cart-item-bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-actions-row {
        flex-direction: column;
    }

    .secondary-btn,
    .ghost-link-btn,
    .top-update-btn {
        width: 100%;
    }
}

/* --- Premium micro-interactions & polish --- */
.shipping-note-card p,
.membership-summary-card p,
.summary-line strong,
.item-subtotal {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.cart-summary-box {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.cart-summary-box:hover {
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
}

.remove-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

@media (max-width: 768px) {
    .quantity-control {
        width: 100%;
    }

    .quantity-input {
        flex: 1;
        width: auto;
    }

    .quantity-btn {
        flex-shrink: 0;
    }
}