:root {
    --primary-black: #111;
    --muted-text: #666;
    --border-color: #eee;
    --bg-light: #f8f9fa;
}

.cart-page-wrapper {
    max-width: 1200px;
    margin: 40px auto 100px;
    padding: 0 20px;
    min-height: 70vh;
}

.cart-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: left;
}

/* Empty Cart Style */
.cart-container-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0;
}

.empty-cart-card {
    background: white;
    padding: 60px 40px;
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.04);
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border-color);
}

.cart-icon-bg {
    width: 110px;
    height: 110px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #ddd;
}

.empty-cart-card h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 12px;
}

.empty-cart-card p {
    color: var(--muted-text);
    margin-bottom: 35px;
    line-height: 1.6;
    font-size: 16px;
}

.btn-shop-now {
    display: inline-block;
    background: var(--primary-black);
    color: white;
    padding: 18px 45px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border: none;
    cursor: pointer;
}

.btn-shop-now:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: #333;
}

@media (max-width: 640px) {
    .empty-cart-card {
        padding: 40px 25px;
        border-radius: 24px;
    }
    .cart-icon-bg {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
    .cart-icon-bg svg {
        width: 32px !important;
        height: 32px !important;
    }
    .empty-cart-card h1 {
        font-size: 24px;
    }
    .empty-cart-card p {
        font-size: 14px;
    }
}

/* Filled Cart Style */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.cart-items-panel {
    background: white;
    border-radius: 28px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 20px 25px;
    background: var(--bg-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-row {
    border-bottom: 1px solid var(--border-color);
}

.cart-item-row:last-child {
    border-bottom: none;
}

.product-cell {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-img {
    width: 90px;
    height: 90px;
    background: var(--bg-light);
    border-radius: 16px;
    padding: 10px;
    object-fit: contain;
}

.product-details h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-details p {
    font-size: 14px;
    color: var(--muted-text);
}

.price-cell, .total-cell {
    padding: 25px;
    font-weight: 700;
    font-size: 16px;
}

.quantity-cell {
    padding: 25px;
    vertical-align: middle;
}

.quantity-ctrl {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 12px;
    width: fit-content;
    padding: 5px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.qty-btn:hover {
    background: var(--primary-black);
    color: white;
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 15px;
}

.remove-btn {
    color: #ff4757;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.2s;
}

.remove-btn:hover {
    transform: scale(1.1) rotate(5deg);
    color: #ff3838;
}

.cart-item-row {
    transition: background 0.3s ease;
}

.cart-item-row:hover {
    background: #fafafa;
}

.cart-footer-actions a:hover {
    color: var(--primary-black) !important;
    transform: translateX(-3px);
    transition: all 0.3s ease;
}

/* Summary Panel */
.summary-panel {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 30px;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-row.total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--bg-light);
    font-size: 22px;
    font-weight: 900;
}

.promo-box {
    margin: 25px 0;
    display: flex;
    gap: 10px;
}

.promo-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    font-family: inherit;
}

.btn-apply {
    background: #333;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-checkout {
    width: 100%;
    background: var(--primary-black);
    color: white;
    padding: 20px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-checkout:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .summary-panel {
        position: static;
        margin-bottom: 50px;
    }
}

@media (max-width: 768px) {
    .cart-page-wrapper {
        margin-top: 20px;
    }

    .cart-title {
        font-size: 26px;
        margin-bottom: 25px;
    }

    .cart-table thead {
        display: none;
    }

    .cart-item-row {
        display: grid;
        grid-template-areas: 
            "product product"
            "price quantity"
            "total total";
        padding: 20px;
        gap: 15px;
        position: relative;
    }

    .product-cell {
        grid-area: product;
        padding: 0;
        border-bottom: 1px solid #f5f5f5;
        padding-bottom: 15px;
    }

    .price-cell {
        grid-area: price;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .price-cell::before {
        content: "Price";
        font-size: 11px;
        text-transform: uppercase;
        color: #999;
        margin-bottom: 4px;
    }

    .quantity-cell {
        grid-area: quantity;
        padding: 0;
        display: flex;
        justify-content: flex-end;
    }

    .remove-btn {
        position: static;
        margin: 0;
        font-size: 18px;
    }

    .total-cell {
        grid-area: total;
        padding: 15px 0 0;
        border-top: 1px solid #f5f5f5;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .total-cell::before {
        content: "Subtotal";
        font-weight: 600;
        font-size: 15px;
    }


    .summary-panel {
        padding: 25px 20px;
        border-radius: 24px;
    }

    .promo-box {
        flex-direction: column;
    }

    .btn-apply {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .product-img {
        width: 70px;
        height: 70px;
    }
    .product-details h4 {
        font-size: 15px;
    }
    .summary-row.total {
        font-size: 20px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 50px 40px;
    border-radius: 32px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.2);
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary-black);
}

.modal-icon {
    width: 90px;
    height: 90px;
    background: #f1f5f9;
    color: var(--primary-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.modal-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--primary-black);
}

.modal-content p {
    color: var(--muted-text);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 35px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-modal-login {
    background: var(--primary-black);
    color: white;
    padding: 18px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    display: block;
}

.btn-modal-login:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-modal-register {
    background: transparent;
    color: var(--primary-black);
    padding: 18px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--primary-black);
    transition: all 0.3s;
    display: block;
}

.btn-modal-register:hover {
    background: #f1f5f9;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 500px) {
    .modal-content {
        padding: 40px 25px;
        border-radius: 28px;
    }
    .modal-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    .modal-icon i, .modal-icon svg {
        width: 32px !important;
        height: 32px !important;
    }
    .modal-content h2 {
        font-size: 22px;
    }
    .modal-content p {
        font-size: 14px;
        margin-bottom: 25px;
    }
    .btn-modal-login, .btn-modal-register {
        padding: 16px;
        font-size: 15px;
        border-radius: 14px;
    }
}
    