/* ==================== MODERN SHOPPING CART - FIXED ==================== */

.shopping-cart-modern {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 10rem;
     margin-bottom: 5rem;
}

/* Store Section */
.store-section {
    background: var(--white);
    border-radius: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    border: var(--border);
}

.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, var(--main-color), #003a99);
    color: var(--white);
}

.store-select {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.store-select input[type="checkbox"] {
    width: 1.8rem;
    height: 1.8rem;
    cursor: pointer;
    accent-color: var(--white);
}

.store-select label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    margin: 0;
}

.store-select label i {
    font-size: 1.8rem;
}

.item-count {
    font-size: 1.3rem;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
}

.store-items {
    padding: 0.8rem;
}

/* Cart Item Card */
.cart-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border-radius: 0.8rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,0.08);
    border: 0.1rem solid var(--light-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-item-card:hover {
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.12);
}

/* Item Info - Left Side */
.item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.item-top {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.item-header-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.item-checkbox {
    width: 1.8rem;
    height: 1.8rem;
    cursor: pointer;
    accent-color: var(--main-color);
    flex-shrink: 0;
}

.item-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--black);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.item-price-block {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-right: 2.4rem;
}

.current-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--main-color);
}

.old-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gray);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--red);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 5rem;
}

/* Item Bottom Section */
.item-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qty-controls-modern {
    display: inline-flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: 0.6rem;
    overflow: hidden;
    border: 0.1rem solid rgba(0,0,0,0.1);
    width: fit-content;
}

.qty-btn {
    width: 3rem;
    height: 3rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--main-color);
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--main-color);
    color: var(--white);
}

.qty-input {
    width: 4.5rem;
    height: 3rem;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.item-subtotal {
    font-size: 1.4rem;
    color: var(--light-color);
}

.item-subtotal strong {
    color: var(--red);
    font-size: 1.6rem;
}

.action-icons {
    display: flex;
    gap: 0.5rem;
}

.action-icon {
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s;
}

.note-btn {
    background: var(--orange);
    color: var(--white);
}

.note-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.delete-btn {
    background: var(--red);
    color: var(--white);
}

.delete-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.item-note {
    font-size: 1.2rem;
    color: var(--light-color);
    margin: 0;
    padding: 0.5rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.item-note i {
    color: var(--main-color);
    font-size: 1.1rem;
}

/* Item Image - Right Side */
.item-image {
    flex-shrink: 0;
    width: 8rem;
    height: 8rem;
    border-radius: 0.6rem;
    overflow: hidden;
    position: relative;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fixed Checkout Bar - COMPACT & PROFESSIONAL */
.checkout-bar-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 0.2rem solid var(--light-bg);
    padding: 0.8rem 1rem;
    box-shadow: 0 -0.4rem 1.5rem rgba(0,0,0,0.1);
    z-index: 1000;
    margin-bottom: 7.5rem;
}

.checkout-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.checkout-info {
    display: flex;
    flex-direction: none;
    gap: 0.1rem;
}

.checkout-label {
    font-size: 2.2rem;
    color: var(--light-color);
}

.checkout-total {
    font-size: 2.2rem;
    color: var(--main-color);
    font-weight: 900;
}

.checkout-btn-modern {
    background: var(--btn-bg);
    color: var(--white);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 0.8rem;
    font-size: 1.7rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s;
    box-shadow: 0 0.4rem 1.2rem rgba(0, 186, 43, 0.3);
    white-space: nowrap;
}

.checkout-btn-modern:hover:not(:disabled) {
    background: #009a23;
    transform: translateY(-2px);
    box-shadow: 0 0.6rem 1.5rem rgba(0, 186, 43, 0.4);
}

.checkout-btn-modern:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Empty Cart */
.empty-cart-modern {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 1.2rem;
    box-shadow: var(--box-shadow);
}

.empty-cart-modern i {
    font-size: 7rem;
    color: var(--light-bg);
    margin-bottom: 1.5rem;
}

.empty-cart-modern h3 {
    font-size: 2.2rem;
    color: var(--black);
    margin-bottom: 0.8rem;
}

.empty-cart-modern p {
    font-size: 1.5rem;
    color: var(--light-color);
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    background: var(--main-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 0.8rem;
    font-size: 1.7rem;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #003a99;
    transform: translateY(-2px);
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.popup-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 1.2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.3);
    animation: popupIn 0.3s ease;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-box h4 {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.popup-box h4 i {
    color: var(--orange);
}

.popup-box textarea {
    width: 100%;
    height: 100px;
    padding: 1rem;
    border: 0.2rem solid var(--light-bg);
    border-radius: 0.8rem;
    font-size: 1.5rem;
    font-family: 'Nunito', sans-serif;
    resize: vertical;
    margin-bottom: 1.2rem;
}

.popup-box textarea:focus {
    border-color: var(--main-color);
}

.popup-buttons {
    display: flex;
    gap: 0.8rem;
}

.popup-buttons button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 0.8rem;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: var(--light-bg);
    color: var(--black);
}

.btn-cancel:hover {
    background: #ddd;
}

.btn-save {
    background: var(--main-color);
    color: var(--white);
}

.btn-save:hover {
    background: #003a99;
}

/* Desktop View */
@media (min-width: 769px) {
    .shopping-cart-modern {
        padding: 1.5rem;
        padding-bottom: 10rem;
    }
    
    .cart-item-card {
        padding: 1.2rem;
        gap: 1.2rem;
    }
    
    .item-name {
        font-size: 1.8rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .item-image {
        width: 10rem;
        height: 10rem;
    }
    
    .checkout-bar-fixed {
        padding: 1rem 2rem;
    }
    
    .checkout-total {
        font-size: 2.4rem;
    }
    
    .checkout-btn-modern {
        padding: 1rem 2.5rem;
        font-size: 1.8rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shopping-cart-modern {
        padding: 0.6rem;
        padding-bottom: 9rem;
    }
    
    .store-header {
        padding: 0.8rem 1rem;
    }
    
    .store-select label {
        font-size: 1.5rem;
    }
    
    .item-count {
        font-size: 1.2rem;
    }
    
    .cart-item-card {
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .item-name {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.7rem;
    }
    
    .item-image {
        width: 7rem;
        height: 7rem;
    }
    
    .qty-btn {
        width: 2.8rem;
        height: 2.8rem;
    }
    
    .qty-input {
        width: 4rem;
        height: 2.8rem;
    }
    
    .action-icon {
        width: 2.8rem;
        height: 2.8rem;
    }
    
    .checkout-bar-fixed {
        padding: 0.7rem 0.8rem;
        margin-bottom: 7.5rem;
    }
    
    .checkout-label {
        font-size: 1.9rem;
    }
    
    .checkout-total {
        font-size: 2rem;
    }
    
    .checkout-btn-modern {
        padding: 0.8rem 1.8rem;
        font-size: 1.6rem;
    }
}

@media (max-width: 450px) {
    .cart-item-card {
        padding: 0.7rem;
    }
    
    .item-header-row {
        flex-wrap: wrap;
    }
    
    .item-name {
        font-size: 1.4rem;
    }
    
    .current-price {
        font-size: 1.6rem;
    }
    
    .item-price-block {
        margin-right: 0;
    }
    
    .item-image {
        width: 6.5rem;
        height: 6.5rem;
    }
    
    .qty-controls-modern {
        transform: scale(0.9);
        transform-origin: left;
    }
    
    .action-icons {
        transform: scale(0.9);
        transform-origin: right;
    }
    
    .item-subtotal {
        font-size: 1.3rem;
    }
    
    .checkout-content {
        flex-direction: row;
        gap: 0.8rem;
    }
    
    .checkout-info {
        flex: 1;
    }
    
    .checkout-total {
        font-size: 1.9rem;
    }
    
    .checkout-btn-modern {
        flex-shrink: 0;
        padding: 0.7rem 1.5rem;
        font-size: 1.5rem;
    }
}

.store-closed-header {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    opacity: 0.9;
    pointer-events: none;
   user-select: none;
}
.store-closed-header .store-checkbox {
    cursor: not-allowed;
}