/* Additional Product Modal Styles */

/* Ensure proper z-index layering */
.product-modal {
    z-index: 99999;
}

/* Smooth transitions for modal */
.product-modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Enhanced mobile responsiveness */
@media (max-width: 576px) {
    .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 20px 15px 15px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .close-modal {
        right: 10px;
        top: 10px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

/* Loading states for buttons */
.action-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.action-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced focus states for accessibility */
.action-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.close-modal:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Improved touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .action-btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .close-modal {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Enhanced animation for modal appearance */
.modal-content {
    transform-origin: center center;
}

.product-modal.show .modal-content {
    animation: modalZoomIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Backdrop blur effect */
.product-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Enhanced button hover states */
.quick-contact-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.action-btn:active {
    transform: translateY(1px);
}

/* Improved modal scrolling on mobile */
@media (max-width: 768px) {
    .product-modal {
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        margin-top: 0;
        margin-bottom: 20px;
    }
}

/* Enhanced product overlay animation */
.product-overlay {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.clickable-product:hover .product-overlay {
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Improved feature tags styling */
.feature-item {
    transition: all 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

/* Enhanced price display */
.product-price {
    position: relative;
    overflow: hidden;
}

.product-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.1), transparent);
    animation: priceShimmer 2s infinite;
}

@keyframes priceShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Improved modal header gradient */
.modal-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 50%, var(--orange) 100%);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}