/* Product Display Enhancements - Blison Energy Style */

.product-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.product-card-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

.product-card-link:hover .product-image {
    transform: scale(1.05);
}

.product-card-link:hover .product-overlay {
    opacity: 1 !important;
}

/* Ensure action buttons have higher z-index */
.product-actions {
    position: relative;
    z-index: 10;
}

.product-actions button,
.product-actions a {
    position: relative;
    z-index: 11;
}

.product-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.add-to-cart-form {
    z-index: 15;
    position: relative;
}

.product-overlay {
    z-index: 2;
    pointer-events: none;
}

.product-overlay .overlay-content {
    pointer-events: auto;
}

.product-overlay .overlay-content button,
.product-overlay .overlay-content a {
    pointer-events: auto;
}

/* Ensure product image area is clickable */
.product-image-container {
    cursor: pointer;
}

.product-image-container:hover .product-overlay {
    opacity: 1;
}

/* Make sure badges don't interfere with clicks */
.product-badges {
    pointer-events: none;
}

.product-badges .badge {
    pointer-events: none;
}

/* Quantity Controls for Product Detail Page */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #28a745;
    background: white;
    color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 80px;
    text-align: center;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 8px;
    font-weight: bold;
    font-size: 16px;
}

.quantity-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Enhanced product cards */
.product-card-enhanced {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.product-image {
    transition: transform 0.3s ease;
}

.product-badges {
    z-index: 5;
}

/* Better hover effects */
.shadow-hover:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

/* Mobile responsiveness for quantity controls */
@media (max-width: 768px) {
    .quantity-selector {
        justify-content: center;
        gap: 10px;
    }
    
    .quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .quantity-input {
        width: 70px;
        padding: 10px 6px;
        font-size: 14px;
    }
}

/* Professional notification styles */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Loading animation for AJAX operations */
.loading-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: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}