/* Desktop Layout Styles */
@media (min-width: 769px) {
    .products-wrapper {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 items per row */
        gap: 2rem;
        padding: 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        background: var(--card-bg);
        border-radius: 15px;
        padding: 2rem;
        transition: transform 0.3s ease;
        height: 100%;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
}

/* Tablet Layout */
@media (min-width: 481px) and (max-width: 768px) {
    .products-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 items per row */
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

/* Mobile Layout */
@media (max-width: 480px) {
    .products-wrapper {
        display: grid;
        grid-template-columns: 1fr; /* 1 item per row */
        gap: 1rem;
        padding: 1rem;
    }
}

/* Mobile Optimization Styles */
@media (max-width: 768px) {
    .products-container,
    .products-wrapper,
    .product-card {
        -webkit-overflow-scrolling: touch;
        will-change: transform;
        backface-visibility: hidden;
        transform: translateZ(0);
        contain: content;
    }

    .products-wrapper {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        content-visibility: auto;
    }

    .product-card {
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .product-description,
    .product-features {
        contain: content;
    }

    .wave-btn span,
    .animated-text,
    .wave-text span,
    .product-category,
    .scroll-reveal {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Reduce animations for better performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Hardware acceleration for smoother scrolling */
.products-container,
.products-wrapper {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000;
}

/* Container styles */
.products-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure consistent card heights */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-description {
    flex-grow: 1;
}

/* Responsive container padding */
@media (min-width: 1200px) {
    .products-container {
        padding: 0 2rem;
    }
}

/* Large desktop screens */
@media (min-width: 1400px) {
    .products-wrapper {
        grid-template-columns: repeat(5, 1fr); /* 5 items per row for very large screens */
    }
}

/* Contact Form Enhancements */
.contact {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.contact h2 {
    color: white;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 2rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.toast.error {
    background: linear-gradient(135deg, #f44336, #e53935);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .contact h2 {
        font-size: 2rem;
    }

    .contact-form,
    .contact-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .contact {
        padding: 3rem 1rem;
    }

    .contact h2 {
        font-size: 1.8rem;
    }

    .submit-btn {
        padding: 1rem;
        font-size: 1rem;
    }
} 