/* DESKTOP CART GRID LAYOUT FIX */
/* This file ensures the desktop grid layout works properly */

/* ==========================================================================
   PAYPAL MODAL BUTTON LAYOUT IMPROVEMENTS
   ========================================================================== */

/* PayPal Modal Button Container - Vertical Stack */
.paypal-button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    width: 100%;
}

/* PayPal Modal Buttons - Improved Styling */
.paypal-modal-btn {
    width: 100% !important;
    min-height: 50px !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important; /* Remove any inline margins */
}

/* Primary PayPal Button */
.paypal-modal-btn.btn-primary {
    background: linear-gradient(135deg, #0070ba, #003087) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 112, 186, 0.3) !important;
}

.paypal-modal-btn.btn-primary:hover {
    background: linear-gradient(135deg, #005ea6, #002d7a) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 112, 186, 0.4) !important;
}

/* Success Button (Back to Shop) */
.paypal-modal-btn.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
}

.paypal-modal-btn.btn-success:hover {
    background: linear-gradient(135deg, #218838, #1c7430) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4) !important;
}

/* Secondary Button (Cancel) */
.paypal-modal-btn.btn-secondary {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border: 2px solid #dee2e6 !important;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2) !important;
}

.paypal-modal-btn.btn-secondary:hover {
    background: #e9ecef !important;
    color: #5a6268 !important;
    border-color: #adb5bd !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
}

/* PayPal Modal Content Spacing */
#paypal-direct-modal .modal-content {
    padding: 30px !important;
}

/* Button Icons */
.paypal-modal-btn i {
    font-size: 18px !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS FOR PAYPAL BUTTONS
   ========================================================================== */

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .paypal-button-container {
        gap: 12px;
        margin-top: 20px;
    }
    
    .paypal-modal-btn {
        min-height: 48px !important;
        padding: 14px 18px !important;
        font-size: 15px !important;
    }
    
    .paypal-modal-btn i {
        font-size: 16px !important;
    }
}

/* Desktop-only cart grid layout (minimum 1024px to ensure it's truly desktop) */
@media (min-width: 1024px) {
    /* Force grid layout for desktop */
    #cart-items-list .cart-item {
        display: grid !important;
        grid-template-columns: 100px 1fr 120px 140px 120px 60px !important;
        grid-gap: 15px !important;
        align-items: center !important;
        padding: 15px 20px !important;
        background: white !important;
        border-radius: 8px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        text-align: left !important;
    }
    
    /* Force grid layout for header */
    #cart-items-list .cart-header {
        display: grid !important;
        grid-template-columns: 100px 1fr 120px 140px 120px 60px !important;
        grid-gap: 15px !important;
        align-items: center !important;
        padding: 15px 20px !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        margin-bottom: 20px !important;
        font-weight: bold !important;
        text-align: left !important;
    }
    
    /* Ensure all grid cells behave properly */
    #cart-items-list .cart-item > div,
    #cart-items-list .cart-header > div {
        display: block !important;
        margin: 0 !important;
        flex-direction: row !important;
    }
    
    /* Reset any mobile flexbox styles for desktop */
    #cart-items-list .cart-item {
        flex-direction: row !important;
    }
}

/* Medium desktop (min 769px) */
@media (min-width: 769px) and (max-width: 1023px) {
    #cart-items-list .cart-item {
        display: grid !important;
        grid-template-columns: 80px 1fr 100px 120px 100px 50px !important;
        grid-gap: 10px !important;
        align-items: center !important;
        padding: 12px 15px !important;
        text-align: left !important;
    }
    
    #cart-items-list .cart-header {
        display: grid !important;
        grid-template-columns: 80px 1fr 100px 120px 100px 50px !important;
        grid-gap: 10px !important;
        align-items: center !important;
        padding: 12px 15px !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        margin-bottom: 15px !important;
        font-weight: bold !important;
        text-align: left !important;
    }
}