.cart-page {
    --hs-blue: #173fbd;
    --hs-deep: #082992;
    --hs-yellow: #f5d947;
    --hs-yellow-hover: #e8c923;
    --hs-green: #168342;
    --hs-red: #b42331;
    --hs-text: #172033;
    --hs-muted: #5f6778;
    --hs-line: #d9deea;
    --hs-bg: #f5f6f8;
    --hs-white: #fff;
    max-width: 1240px;
    margin: 0 auto 64px;
    padding: 0 24px;
    color: var(--hs-text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.cart-page *,
.cart-page *::before,
.cart-page *::after {
    box-sizing: border-box;
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 10px;
    color: var(--hs-muted);
    font-size: 13px;
}

.cart-breadcrumb a {
    color: var(--hs-blue);
}

.cart-breadcrumb a:hover,
.cart-breadcrumb a:focus-visible {
    text-decoration: underline;
}

.cart-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.cart-header h1 {
    margin: 0;
    color: var(--hs-deep);
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.2;
}

.cart-header p {
    margin: 5px 0 0;
    color: var(--hs-muted);
    font-size: 14px;
}

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

.cart-clear-button {
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--hs-red);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cart-clear-button:hover,
.cart-clear-button:focus-visible {
    text-decoration: underline;
    outline: 2px solid rgba(180, 35, 49, 0.18);
    outline-offset: 2px;
}

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

.cart-list {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--hs-line);
    border-radius: 16px;
    background: var(--hs-white);
}

.cart-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--hs-line);
}

.cart-list-heading h2 {
    margin: 0;
    font-size: 21px;
}

.cart-list-heading span {
    color: var(--hs-muted);
    font-size: 13px;
}

.cart-item {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 156px 150px;
    gap: 20px;
    align-items: center;
    padding: 24px 22px;
    border: 0;
    border-bottom: 1px solid var(--hs-line);
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item-image {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    padding: 9px;
    border: 1px solid #e2e6ef;
    border-radius: 12px;
    background: var(--hs-white);
}

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

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

.cart-item-name {
    display: block;
    color: var(--hs-text);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.cart-item-name:hover,
.cart-item-name:focus-visible {
    color: var(--hs-blue);
    text-decoration: underline;
}

.cart-item-sku,
.cart-item-unit-price {
    display: block;
    margin-top: 6px;
    color: var(--hs-muted);
    font-size: 13px;
}

.cart-item-stock {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
}

.cart-item-stock.is-available {
    color: var(--hs-green);
}

.cart-item-stock.is-unavailable {
    color: var(--hs-red);
}

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

.cart-remove-button {
    min-height: 40px;
    padding: 0 5px;
    border: 0;
    background: transparent;
    color: var(--hs-red);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cart-remove-button:hover,
.cart-remove-button:focus-visible {
    text-decoration: underline;
    outline: 2px solid rgba(180, 35, 49, 0.18);
    outline-offset: 2px;
}

.cart-item-controls {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.cart-item-controls > label {
    font-size: 13px;
    font-weight: 700;
}

.cart-item-controls > small {
    color: var(--hs-muted);
    font-size: 11px;
}

.cart-quantity-stepper {
    display: grid;
    grid-template-columns: 42px 54px 42px;
    overflow: hidden;
    border: 1px solid #b9c2d7;
    border-radius: 10px;
    background: var(--hs-white);
}

.cart-quantity-stepper button,
.cart-quantity-stepper input {
    min-height: 42px;
    border: 0;
    background: transparent;
    color: var(--hs-text);
    font: inherit;
    text-align: center;
}

.cart-quantity-stepper button {
    font-size: 21px;
    cursor: pointer;
}

.cart-quantity-stepper button:hover,
.cart-quantity-stepper button:focus-visible {
    background: var(--hs-bg);
    color: var(--hs-blue);
    outline: 2px solid var(--hs-blue);
    outline-offset: -2px;
}

.cart-quantity-stepper input {
    width: 54px;
    border-right: 1px solid var(--hs-line);
    border-left: 1px solid var(--hs-line);
    font-weight: 700;
    appearance: textfield;
}

.cart-quantity-stepper input::-webkit-inner-spin-button,
.cart-quantity-stepper input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.cart-item-total {
    display: grid;
    justify-items: end;
    gap: 4px;
    text-align: right;
}

.cart-item-total span {
    color: var(--hs-muted);
    font-size: 12px;
}

.cart-item-total strong {
    color: var(--hs-blue);
    font-size: 20px;
    white-space: nowrap;
}

.cart-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-top: 1px solid var(--hs-line);
    background: #fbfcfe;
}

.cart-continue-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    color: var(--hs-blue);
    font-size: 14px;
    font-weight: 700;
}

.cart-continue-link:hover,
.cart-continue-link:focus-visible {
    text-decoration: underline;
}

.cart-update-button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--hs-blue);
    border-radius: 10px;
    background: var(--hs-white);
    color: var(--hs-blue);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.cart-update-button:hover,
.cart-update-button:focus-visible,
.cart-update-button.is-dirty {
    background: #edf1ff;
    outline: 3px solid rgba(23, 63, 189, 0.16);
    outline-offset: 2px;
}

.cart-summary {
    position: sticky;
    top: 18px;
    padding: 24px;
    border: 1px solid var(--hs-line);
    border-radius: 16px;
    background: var(--hs-white);
    box-shadow: 0 8px 26px rgba(8, 41, 146, 0.08);
}

.cart-summary h2 {
    margin: 0 0 20px;
    color: var(--hs-deep);
    font-size: 22px;
}

.cart-summary-values {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hs-line);
}

.cart-summary-values div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.cart-summary-values dt,
.cart-summary-values dd {
    margin: 0;
    font-size: 14px;
}

.cart-summary-values dt {
    color: var(--hs-muted);
}

.cart-summary-values dd {
    max-width: 145px;
    text-align: right;
    font-weight: 700;
}

.cart-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 0 8px;
}

.cart-summary-total span {
    font-size: 17px;
    font-weight: 700;
}

.cart-summary-total strong {
    color: var(--hs-blue);
    font-size: 25px;
}

.cart-summary-shipping {
    margin: 0 0 18px;
    color: var(--hs-muted);
    font-size: 12px;
    line-height: 1.5;
}

.cart-checkout-button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    background: var(--hs-yellow);
    color: var(--hs-text);
    font-size: 16px;
    font-weight: 700;
    transition: background 0.15s ease, transform 0.15s ease;
}

.cart-checkout-button:hover,
.cart-checkout-button:focus-visible {
    background: var(--hs-yellow-hover);
    outline: 3px solid rgba(23, 63, 189, 0.2);
    outline-offset: 2px;
}

.cart-checkout-button:active {
    transform: translateY(1px);
}

.cart-summary-security {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--hs-line);
    color: var(--hs-muted);
}

.cart-summary-security > span {
    display: grid;
    place-items: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #e6f5ec;
    color: var(--hs-green);
    font-weight: 700;
}

.cart-summary-security p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.cart-summary-security b {
    color: var(--hs-text);
    font-size: 13px;
}

.cart-empty-state {
    max-width: 680px;
    margin: 54px auto 80px;
    padding: 50px 28px;
    border: 1px solid var(--hs-line);
    border-radius: 16px;
    background: var(--hs-white);
    text-align: center;
}

.cart-empty-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #edf1ff;
    font-size: 33px;
}

.cart-empty-state h2 {
    margin: 0;
    color: var(--hs-deep);
    font-size: 27px;
}

.cart-empty-state p {
    margin: 10px auto 22px;
    color: var(--hs-muted);
}

.cart-primary-link {
    display: inline-grid;
    place-items: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 10px;
    background: var(--hs-blue);
    color: var(--hs-white);
    font-weight: 700;
}

@media (max-width: 1050px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 20px;
    }

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

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

    .cart-item-total {
        grid-column: 2 / -1;
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 820px) {
    .cart-page {
        padding: 0 16px;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 620px) {
    .cart-header {
        align-items: flex-start;
    }

    .cart-item {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 15px;
        padding: 20px 16px;
    }

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

    .cart-item-controls,
    .cart-item-total {
        grid-column: 2;
    }

    .cart-item-total {
        justify-items: start;
        text-align: left;
    }

    .cart-list-heading {
        padding: 17px 16px;
    }

    .cart-list-heading span {
        display: none;
    }

    .cart-list-footer {
        align-items: stretch;
        flex-direction: column-reverse;
        padding: 18px 16px;
    }

    .cart-update-button,
    .cart-continue-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 390px) {
    .cart-page {
        padding: 0 12px;
    }

    .cart-header {
        display: grid;
    }

    .cart-clear-button {
        padding-left: 0;
    }

    .cart-item {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        padding: 17px 12px;
    }

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

    .cart-item-name {
        font-size: 15px;
    }

    .cart-quantity-stepper {
        grid-template-columns: 40px 50px 40px;
    }

    .cart-summary {
        padding: 20px;
    }
}
