.cart-page,
body {
    background-color: #000;
    background-image: url('/images/hero-premium.png');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body {
    padding-top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cart-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 100px 1.25rem 2.5rem;
    position: relative;
}

.cart-page::before {
    content: "";
    position: absolute;
    inset: 84px auto auto 50%;
    width: min(72vw, 760px);
    height: 220px;
    transform: translateX(-50%);
    background: radial-gradient(circle at center, rgba(227, 32, 46, 0.22), transparent 68%);
    filter: blur(12px);
    pointer-events: none;
    z-index: -1;
}

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

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) 190px 170px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(24, 24, 24, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cart-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 59, 73, 0.22);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.cart-item-image {
    width: 108px;
    height: 108px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.4rem;
}

.cart-item-image span {
    font-size: 2rem;
    line-height: 1;
}

.cart-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-item-head {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cart-item-name {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.cart-item-name:hover {
    color: #ff5a66;
}

.cart-item-price {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.94rem;
}


.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cart-remove-form {
    margin: 0;
}

.cart-item-actions .form-label {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 600;
}

.cart-qty-wrap {
    position: relative;
}

.cart-qty {
    width: 100%;
    max-width: 132px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.36);
    color: #ffffff;
    box-shadow: none;
}

.cart-qty:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 59, 73, 0.55);
    box-shadow: 0 0 0 0.18rem rgba(255, 59, 73, 0.14);
    color: #ffffff;
}

.cart-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: fit-content;
    min-height: 46px;
    border-radius: 10px;
    padding: 0 0.9rem;
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(220, 53, 69, 0.32);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.24);
}

.cart-action-btn:hover {
    background: rgba(220, 53, 69, 0.38);
    border-color: rgba(255, 255, 255, 0.42);
    color: #ffffff;
}

.cart-remove-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.cart-item-total {
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    text-align: right;
}

.cart-item-total span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cart-item-total strong {
    color: #ffffff;
    font-size: 1.08rem;
}

.cart-summary {
    position: sticky;
    top: 106px;
    padding: 1.25rem;
    border-radius: 20px;
    background: rgba(24, 24, 24, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px) saturate(110%);
    -webkit-backdrop-filter: blur(6px) saturate(110%);
}

.cart-summary h2 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-summary-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 46px;
    padding: 0 0.95rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.36);
    color: rgba(255, 255, 255, 0.9);
}

.cart-summary-row strong {
    color: #ffffff;
    font-size: 1rem;
}

.cart-summary-row--accent {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.42);
}

.cart-summary-note {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
    line-height: 1.55;
}

.cart-summary-action {
    width: 100%;
    margin-top: 1rem;
    font-weight: 700;
}

.cart-item-actions .cart-action-btn {
    padding: 0 0.9rem;
}

.cart-summary-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.cart-empty {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-radius: 24px;
    background: rgba(24, 24, 24, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.cart-page:has(.cart-empty) {
    flex: 1;
    min-height: calc(100vh - 78px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-page:has(.cart-empty) .cart-empty {
    width: 100%;
}

.cart-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.cart-empty__icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.cart-empty h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.55rem;
}

.cart-empty p {
    max-width: 40ch;
    margin: 0.75rem auto 1.25rem;
    color: rgba(255, 255, 255, 0.75);
}

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

    .cart-summary {
        position: static;
    }
}

@media (max-width: 900px) {
    .cart-page {
        padding-top: 88px;
    }

    .cart-item {
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: start;
    }

    .cart-item-total {
        grid-column: 1 / -1;
        justify-self: start;
        align-items: flex-start;
        text-align: left;
        padding-top: 0.1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }

    .cart-action-btn,
    .cart-qty {
        max-width: none;
        width: 100%;
    }

    .cart-action-btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .cart-page {
        padding-top: 78px;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .cart-summary,
    .cart-empty {
        border-radius: 18px;
    }

    .cart-item {
        padding: 0.9rem;
        gap: 0.85rem;
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .cart-item-image {
        width: 76px;
        height: 76px;
        border-radius: 14px;
    }

    .cart-item-name {
        font-size: 1rem;
    }
}
