/* Cart Page Styles */

/* Mobile Cart Styles */
@media (max-width: 768px) {
    /* Completely hide desktop table on mobile */
    .cart-table,
    .cart-table table,
    .table,
    table.table {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Force show mobile layout */
    .cart-mobile {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        clear: both !important;
        position: relative !important;
    }
    
    /* Hide desktop checkout section */
    .cart-table + div {
        display: none !important;
    }
    
    .cart-item-mobile {
        background: linear-gradient(135deg, #ffffff 0%, #f6f9fa 100%);
        border: 2px solid rgba(255, 198, 26, 0.2);
        border-radius: 15px;
        margin-bottom: 20px;
        padding: 25px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        width: 100%;
        box-sizing: border-box;
        position: relative;
        clear: both;
        transition: all 0.3s ease;
    }
    
    .cart-item-mobile:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.15);
        border-color: rgba(255, 198, 26, 0.4);
    }
    
    .cart-item-mobile .item-image {
        text-align: center;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .cart-item-mobile .item-image img {
        max-width: 150px;
        height: auto;
        border-radius: 8px;
        display: block;
        margin: 0 auto;
    }
    
    .cart-item-mobile .item-details {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .cart-item-mobile .item-details h5 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 10px;
        color: #353535;
        line-height: 1.3;
    }
    
    .cart-item-mobile .item-price {
        font-size: 20px;
        font-weight: bold;
        color: #ffc61a;
        margin-bottom: 15px;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .cart-item-mobile .quantity-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 20px 0;
        flex-wrap: wrap;
    }
    
    .cart-item-mobile .quantity-controls label {
        margin-right: 10px;
        font-weight: 600;
        color: #333;
    }
    
    .cart-item-mobile .quantity-controls input {
        width: 80px;
        text-align: center;
        border: 2px solid #ddd;
        border-radius: 8px;
        padding: 8px;
        margin: 0 10px;
        font-size: 16px;
        font-weight: bold;
    }
    
    .cart-item-mobile .item-total {
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        color: #333;
        margin: 20px 0;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .cart-item-mobile .item-actions {
        text-align: center;
        margin-top: 15px;
    }
    
    .cart-item-mobile .btn-remove {
        background: #dc3545;
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .cart-item-mobile .btn-remove:hover {
        background: #c82333;
        transform: translateY(-2px);
    }
    
    .cart-summary {
        background: linear-gradient(135deg, #f6f9fa 0%, #ffffff 100%);
        border: 2px solid rgba(255, 198, 26, 0.3);
        border-radius: 15px;
        padding: 25px;
        margin-top: 30px;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        width: 100%;
        box-sizing: border-box;
    }
    
    .cart-summary h4 {
        color: #353535;
        margin-bottom: 20px;
        font-size: 22px;
        font-weight: 700;
    }
    
    .cart-summary .total-amount {
        font-size: 28px;
        font-weight: bold;
        color: #ffc61a;
        margin-bottom: 25px;
        padding: 15px;
        background: rgba(255, 198, 26, 0.1);
        border-radius: 10px;
        border: 2px solid rgba(255, 198, 26, 0.3);
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .checkout-btn {
        width: 100%;
        padding: 18px;
        font-size: 20px;
        font-weight: bold;
        border-radius: 10px;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        border: none;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .checkout-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .cart-mobile {
        display: none;
    }
    
    .cart-item-mobile {
        display: none;
    }
    
    .cart-summary {
        display: none;
    }
}

/* Enhanced color scheme */
.cart-header {
    background: linear-gradient(135deg, #242424 0%, #000 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.cart-header h2 {
    color: #ffc61a;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cart-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.checkout-sidebar {
    position: sticky;
    top: 20px;
}

.checkout-sidebar .card {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.checkout-sidebar .card-header {
    background: linear-gradient(135deg, #ffc61a 0%, #d4b06a 100%);
    border: none;
    padding: 20px;
    color: #242424;
}

.checkout-sidebar .card-body {
    background: linear-gradient(135deg, #f6f9fa 0%, #ffffff 100%);
    padding: 25px;
}

.cart-items-section {
    background: linear-gradient(135deg, #ffffff 0%, #f6f9fa 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 198, 26, 0.2);
}

.cart-items-section h4 {
    color: #353535;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffc61a;
}

.table thead th {
    background: linear-gradient(135deg, #242424 0%, #000 100%);
    color: #ffc61a;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f6f9fa 0%, #e9ecef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.table tbody td {
    border-color: rgba(255, 198, 26, 0.1);
    vertical-align: middle;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #ffc61a 0%, #d4b06a 100%);
    border: none;
    color: #242424;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #d4b06a 0%, #ffc61a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 198, 26, 0.4);
}

.empty-cart {
    background: linear-gradient(135deg, #242424 0%, #000 100%);
    color: white;
    padding: 60px 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.empty-cart h2 {
    color: #ffc61a;
    font-weight: 700;
}

.empty-cart p {
    color: rgba(255, 255, 255, 0.9);
}

.empty-cart-icon {
    opacity: 0.8;
    color: #ffc61a;
}

.empty-cart-actions .btn {
    margin: 8px;
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-cart-actions .btn-primary {
    background: linear-gradient(135deg, #ffc61a 0%, #d4b06a 100%);
    border: none;
    color: #242424;
}

.empty-cart-actions .btn-primary:hover {
    background: linear-gradient(135deg, #d4b06a 0%, #ffc61a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 198, 26, 0.4);
}

.empty-cart-actions .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.empty-cart-actions .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* Modal Responsive Styles */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px !important;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: 16px;
        padding: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 16px;
    }
    
    /* Mobile payment options */
    .payment-options {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .payment-option {
        flex: none !important;
        width: 100% !important;
    }
}

/* Checkout Modal Styles */
#checkoutModal .modal-dialog {
    max-width: 600px;
}

#checkoutModal .modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#checkoutModal .modal-header {
    border-bottom: none;
    padding: 20px 25px 15px;
}

#checkoutModal .modal-body {
    padding: 25px;
}

#checkoutModal .modal-footer {
    border-top: none;
    padding: 15px 25px 20px;
}

#checkoutModal .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#checkoutModal .form-control:focus {
    border-color: #d4b06a;
    box-shadow: 0 0 0 0.2rem rgba(212, 176, 106, 0.25);
}

#checkoutModal .input-group-text {
    background: linear-gradient(135deg, #d4b06a 0%, #c97064 100%);
    border: 2px solid #d4b06a;
    color: white;
    font-weight: 600;
}

#checkoutModal .payment-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

#checkoutModal .payment-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#checkoutModal .btn-primary {
    background: linear-gradient(135deg, #d4b06a 0%, #c97064 100%);
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#checkoutModal .btn-primary:hover {
    background: linear-gradient(135deg, #c97064 0%, #d4b06a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 176, 106, 0.4);
}

/* Quantity input styles */
.quantity {
    width: 80px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

/* Cart header styles */
.cart-header {
    background: linear-gradient(135deg, #242424 0%, #000 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.cart-header h2 {
    color: #ffc61a;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cart-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

/* Checkout sidebar styles */
.checkout-sidebar {
    position: sticky;
    top: 20px;
}

.checkout-sidebar .card {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.checkout-sidebar .card-header {
    background: linear-gradient(135deg, #ffc61a 0%, #d4b06a 100%);
    border: none;
    padding: 20px;
    color: #242424;
}

.checkout-sidebar .card-body {
    background: linear-gradient(135deg, #f6f9fa 0%, #ffffff 100%);
    padding: 25px;
}

/* Cart items section styles */
.cart-items-section {
    background: linear-gradient(135deg, #ffffff 0%, #f6f9fa 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 198, 26, 0.2);
}

.cart-items-section h4 {
    color: #353535;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffc61a;
}

/* Table styles */
.table thead th {
    background: linear-gradient(135deg, #242424 0%, #000 100%);
    color: #ffc61a;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f6f9fa 0%, #e9ecef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.table tbody td {
    border-color: rgba(255, 198, 26, 0.1);
    vertical-align: middle;
}

/* Button styles */
.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #ffc61a 0%, #d4b06a 100%);
    border: none;
    color: #242424;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #d4b06a 0%, #ffc61a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 198, 26, 0.4);
}

/* Empty cart styles */
.empty-cart {
    background: linear-gradient(135deg, #242424 0%, #000 100%);
    color: white;
    padding: 60px 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.empty-cart h2 {
    color: #ffc61a;
    font-weight: 700;
}

.empty-cart p {
    color: rgba(255, 255, 255, 0.9);
}

.empty-cart-icon {
    opacity: 0.8;
    color: #ffc61a;
}

.empty-cart-actions .btn {
    margin: 8px;
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-cart-actions .btn-primary {
    background: linear-gradient(135deg, #ffc61a 0%, #d4b06a 100%);
    border: none;
    color: #242424;
}

.empty-cart-actions .btn-primary:hover {
    background: linear-gradient(135deg, #d4b06a 0%, #ffc61a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 198, 26, 0.4);
}

.empty-cart-actions .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.empty-cart-actions .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}
