.cart-page {
    padding: 10vh 5vw;
    max-width: 1400px;
    margin: 0 auto;
}

.cart-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--zz-blue);
    text-align: center;
    font-family: var(--zz-font-family);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.cart-items {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item__image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item__image:hover img {
    transform: scale(1.05);
}

.cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item__name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

.cart-item__price {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e0e0e0;
    color: #000;
}

.quantity-input {
    width: 50px;
    height: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

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

.btn-apply-coupon-summary {
    display: inline-block;
    padding: 10px 20px;
    /* Khoảng cách bên trong nút */
    font-size: 14px;
    /* Cỡ chữ */
    font-weight: 600;
    /* Chữ hơi đậm */
    color: #fff;
    /* Màu chữ */
    background-color: #007bff;
    /* Màu nền chính */
    border: none;
    /* Bỏ viền */
    border-radius: 6px;
    /* Bo góc mềm mại */
    cursor: pointer;
    /* Con trỏ khi hover */
    transition: all 0.3s ease;
    /* Hiệu ứng hover mượt */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    /* Bóng nhẹ */
}

.btn-apply-coupon-summary:hover {
    background-color: #0056b3;
    /* Màu nền khi hover */
    transform: translateY(-2px);
    /* Nhấc nhẹ nút khi hover */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.btn-apply-coupon-summary:active {
    transform: translateY(0);
    /* Nhấn xuống */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-apply-coupon-summary:focus {
    outline: none;
    /* Bỏ viền focus mặc định */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
    /* Viền glow */
}

.cart-item__total {
    min-width: 120px;
    text-align: right;
}

.cart-item__total p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e74c3c;
    margin: 0;
}

.cart-item__remove {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item__remove a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cart-item__remove a:hover {
    background: #fee;
    color: #e74c3c;
}

.cart-summary {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
    position: sticky;
    top: 100px;
    color: #fff;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #fff;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
}

.summary-row span:last-child {
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0 30px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: #fff;
    color: #0ea5e9;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #06b6d4;
}

.cart-empty {
    text-align: center;
    padding: 100px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.cart-empty i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 30px;
}

.cart-empty p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 30px;
}

.btn-primary {
    padding: 14px 40px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    margin-top: 20px;
    padding: 12px 30px;
    background: #fff;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0ea5e9;
    color: #fff;
}



.coupon-section {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.coupon-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-title i {
    color: #0ea5e9;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.coupon-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.coupon-input::placeholder {
    color: #999;
}

.btn-apply-coupon {
    padding: 14px 30px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-apply-coupon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.coupon-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.coupon-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.coupon-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.applied-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #d1fae5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
}

.applied-coupon-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #065f46;
    font-weight: 600;
}

.applied-coupon-info i {
    color: #10b981;
}

.btn-remove-coupon {
    background: none;
    border: none;
    color: #991b1b;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.btn-remove-coupon:hover {
    background: rgba(153, 27, 27, 0.1);
}

.summary-row.discount {
    color: #10b981;
}

.summary-row.discount span:last-child {
    font-weight: 700;
}

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

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 100px 10px;
    }

    .cart-page h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .cart-item {
        display: grid;
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto 1fr;
        gap: 10px 15px;
        align-items: start;
        position: relative;
        padding: 15px 0;
    }

    .cart-item__image {
        grid-row: 1 / 3;
        width: 90px;
        height: 90px;
        border-radius: 8px;
    }

    .cart-item__details {
        grid-column: 2;
        grid-row: 1;
        padding-right: 30px;
        /* Space for remove button */
    }

    .cart-item__name {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cart-item__price {
        font-size: 0.9rem;
        color: #666;
    }

    .cart-item__remove {
        position: absolute;
        top: 15px;
        right: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
    }

    .cart-item__remove a {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .cart-item__quantity {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
        justify-self: start;
        margin-top: 5px;
    }

    .quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .quantity-input {
        width: 40px;
        height: 30px;
        font-size: 0.9rem;
    }

    .cart-item__total {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
        justify-self: end;
    }

    .cart-item__total p {
        font-size: 1.1rem;
    }
}


/* Delete Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    margin-bottom: 25px;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-confirm {
    padding: 10px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm:hover {
    background: #dc2626;
}