.cart-page-wrap {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.cart-page-head {
    max-width: 760px;
    margin: 0 0 26px;
}

.cart-page-head .page-eyebrow {
    display: inline-flex;
    margin: 0 0 10px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cart-page-head h1 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -.05em;
}

.cart-page-head p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
}

.cart-alert {
    margin: 0 0 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    padding: 14px 16px;
}

.cart-alert-success {
    border: 1px solid #bbf7d0;
    background: #dcfce7;
    color: #166534;
}

.cart-alert-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.cart-empty {
    display: grid;
    min-height: 280px;
    align-content: center;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 28px;
    background:
        radial-gradient(circle at right top, rgba(220, 38, 38, .08), transparent 35%),
        #ffffff;
    box-shadow: 0 20px 52px rgba(17, 24, 39, .08);
    padding: 34px;
}

.cart-empty h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -.035em;
}

.cart-empty p {
    max-width: 620px;
    margin: 0 0 20px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
}

.cart-primary-link,
.cart-checkout-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    padding: 0 18px;
    text-decoration: none;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cart-primary-link:hover,
.cart-checkout-button:hover {
    background: #991b1b;
    box-shadow: 0 16px 34px rgba(220, 38, 38, .22);
    transform: translateY(-1px);
}

.cart-layout {
    display: grid;
    align-items: start;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.cart-items {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.cart-item {
    display: grid;
    align-items: center;
    gap: 18px;
    grid-template-columns: 124px minmax(0, 1fr) auto;
    min-width: 0;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(17, 24, 39, .07);
    padding: 16px;
}

.cart-item-image {
    display: grid;
    width: 124px;
    height: 98px;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.cart-item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-body {
    min-width: 0;
}

.cart-item-body h2 {
    margin: 0 0 7px;
    color: #111827;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.cart-item-body h2 a {
    color: inherit;
    text-decoration: none;
}

.cart-item-body h2 a:hover {
    color: #dc2626;
}

.cart-item-store {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 800;
}

.cart-item-warning {
    margin: 0 0 10px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 850;
    padding: 8px 10px;
}

.cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cart-item-meta span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border: 1px solid #eef2f7;
    border-radius: 999px;
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    font-weight: 850;
    padding: 0 10px;
}

.cart-item-total {
    color: #111827;
    font-size: 18px;
    font-weight: 950;
    white-space: nowrap;
}

.cart-summary {
    position: sticky;
    top: 104px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 26px;
    background:
        radial-gradient(circle at right top, rgba(220, 38, 38, .08), transparent 36%),
        #ffffff;
    box-shadow: 0 18px 46px rgba(17, 24, 39, .08);
    padding: 22px;
}

.cart-summary h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 23px;
    font-weight: 950;
    letter-spacing: -.035em;
}

.cart-summary dl {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.cart-summary dl div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    background: #f9fafb;
    padding: 12px;
}

.cart-summary dt {
    color: #6b7280;
    font-size: 13px;
    font-weight: 900;
}

.cart-summary dd {
    margin: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 950;
}

.cart-checkout-button {
    width: 100%;
}

.cart-summary-note {
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 680px) {
    .cart-page-wrap {
        width: min(100% - 28px, 1240px);
        padding: 24px 0 44px;
    }

    .cart-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .cart-item-image {
        width: 96px;
        height: 86px;
    }

    .cart-item-total {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .cart-item {
        grid-template-columns: 1fr;
    }

    .cart-item-image {
        width: 100%;
        height: 180px;
    }
}
