.cart-page {
    max-width: 1200px;
    width: calc(100% - 40px);
    margin: 45px auto 70px;
    color: #222;
    min-height: 55vh;
}

.cart-heading {
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

.cart-heading h1 {
    font-size: 32px;
    margin: 0 0 8px;
}

.cart-heading p {
    margin: 0;
    color: #777;
}

.cart-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 22px;
    font-size: 14px;
}

.cart-notice.success {
    background: #edf7ee;
    color: #236b35;
    border: 1px solid #cce8d1;
}

.cart-notice.error {
    background: #fff0f0;
    color: #a32929;
    border: 1px solid #f0caca;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 20px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fff;
}

.cart-item-image {
    width: 145px;
    height: 145px;
    object-fit: contain;
    background: #f7f7f7;
    border-radius: 5px;
}

.cart-item-no-image {
    width: 145px;
    height: 145px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f4f4;
    color: #888;
    border-radius: 5px;
    font-size: 13px;
}

.cart-item-info h2 {
    font-size: 18px;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}

.cart-item-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    margin-top: 12px;
}

.cart-old-price {
    color: #888;
    text-decoration: line-through;
    font-weight: 400;
    margin-right: 8px;
}

.cart-sale-price {
    color: #c62828;
    font-weight: 700;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.cart-line-total {
    font-weight: 700;
    white-space: nowrap;
}

.cart-remove-button {
    background: none;
    border: none;
    color: #b3261e;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 0;
}

.cart-remove-button:hover {
    color: #7f1712;
}

.cart-summary {
    padding: 24px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fafafa;
    position: sticky;
    top: 20px;
}

.cart-summary h2 {
    margin: 0 0 20px;
    font-size: 21px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 14px 0;
    font-size: 14px;
}

.cart-summary-total {
    border-top: 1px solid #ddd;
    padding-top: 18px;
    margin-top: 18px;
    font-size: 19px;
    font-weight: 700;
}

.cart-summary-note {
    color: #777;
    font-size: 12px;
    line-height: 1.6;
    margin: 16px 0 0;
}

.cart-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid #222;
    border-radius: 5px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
}

.cart-button:hover {
    background: #444;
}

.cart-button-secondary {
    background: #fff;
    color: #222;
    margin-top: 10px;
}

.cart-button-secondary:hover {
    background: #eee;
}

.cart-clear-form {
    margin-top: 15px;
    text-align: center;
}

.cart-clear-form button {
    border: none;
    background: transparent;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
}

.cart-empty {
    text-align: center;
    padding: 65px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fafafa;
}

.cart-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cart-empty h2 {
    margin: 0 0 10px;
}

.cart-empty p {
    color: #777;
    margin-bottom: 24px;
}

.cart-empty .cart-button {
    width: auto;
    min-width: 190px;
}

@media (max-width: 850px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .cart-page {
        width: calc(100% - 24px);
        margin-top: 25px;
    }

    .cart-heading h1 {
        font-size: 27px;
    }

    .cart-item {
        grid-template-columns: 95px minmax(0, 1fr);
        gap: 14px;
        padding: 13px;
    }

    .cart-item-image,
    .cart-item-no-image {
        width: 95px;
        height: 105px;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #eee;
        padding-top: 12px;
    }

    .cart-item-info h2 {
        font-size: 16px;
    }
}
.cart-checkout-heading {
    margin-top: 26px;
}

.cart-checkout-form {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.cart-checkout-form label {
    font-weight: 600;
    margin-top: 5px;
}

.cart-checkout-form input,
.cart-checkout-form select,
.cart-checkout-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font: inherit;
}

.cart-checkout-form textarea {
    resize: vertical;
}

.cart-submit-order {
    margin-top: 12px;
    cursor: pointer;
}

.cart-item-type {
    color: #777;
    font-size: 0.9rem;
    margin-top: 4px;
}
.cart-item-edit-form {
    display: grid;
    gap: 7px;
    margin-top: 12px;
    max-width: 230px;
}
.cart-item-edit-form label {
    font-size: 0.9rem;
    font-weight: 600;
}
.cart-item-edit-form input,
.cart-item-edit-form select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font: inherit;
}
.cart-item-edit-form .cart-update-button {
    margin-top: 4px;
    cursor: pointer;
}