/* Mobile-First Responsive Design */
/* Breakpoints: Mobile (320px+), Tablet (768px+), Desktop (1024px+) */

/* Ensure light backgrounds on mobile */
body {
    background-color: #ffffff !important;
}

main {
    background-color: #ffffff !important;
}

.section {
    background-color: #ffffff !important;
}

/* Mobile Styles (320px - 767px) */
@media screen and (max-width: 767px) {
    /* Container adjustments */
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }

    /* Ensure all sections have light backgrounds */
    .section {
        background-color: #ffffff !important;
        padding: 2rem 0;
    }

    /* Features section specific background */
    .section:not(.gallery-section):not(.about-section):not(.team-enhanced):not(.contact-enhanced) {
        background-color: #fafafa !important;
    }

    /* Product showcase section */
    #product-showcase {
        background-color: #f8f9fa !important;
    }

    /* Hero Section */
    .hero {
        min-height: 60vh;
        padding: 2rem 0;
    }

    .hero-content {
        text-align: center;
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .hero-buttons .cta-button,
    .hero-buttons .cta-button-secondary {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stat-item {
        text-align: center;
        padding: 1.5rem;
        background-color: #ffffff !important;
    }

    .stat-icon {
        width: 4rem;
        height: 4rem;
        margin: 0 auto 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--gray-100);
    }

    .stat-icon .icon {
        font-size: 2rem;
    }

    .stat-item h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .stat-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Product Showcase */
    .product-showcase-grid {
        gap: 1rem;
        padding: 0 0.5rem;
        /* Ensure proper scrolling on mobile */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .product-showcase-grid .product-card {
        scroll-snap-align: start;
    }

    /* Hide scroll buttons on mobile */
    .scroll-btn {
        display: none !important;
    }

    .product-showcase-grid .product-card {
        flex: 0 0 280px;
        min-height: 350px;
        border-radius: 0.75rem;
    }

    .product-showcase-grid .product-image {
        height: 160px;
    }

    .product-showcase-grid .product-content {
        padding: 1rem;
    }

    .product-showcase-grid .product-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        min-height: 2.4em;
    }

    .product-showcase-grid .product-category {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .product-showcase-grid .product-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 2;
    }

    .product-showcase-grid .product-features {
        margin-bottom: 0.75rem;
    }

    .product-showcase-grid .feature-item {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
        gap: 0.375rem;
    }

    .product-showcase-grid .feature-icon {
        width: 14px;
        height: 14px;
    }

    .product-showcase-grid .product-price {
        margin-bottom: 0.75rem;
    }

    .product-showcase-grid .current-price {
        font-size: 1.25rem;
    }

    .product-showcase-grid .original-price {
        font-size: 0.875rem;
    }

    .product-showcase-grid .discount-percentage {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .product-showcase-grid .product-actions {
        opacity: 1;
        transform: translateY(0);
        gap: 0.5rem;
    }

    .product-showcase-grid .btn-primary,
    .product-showcase-grid .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }

    .product-showcase-grid .product-badges {
        top: 0.5rem;
        left: 0.5rem;
        gap: 0.375rem;
    }

    .product-showcase-grid .product-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 0.5rem;
    }

    .product-showcase-grid .stock-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 0.5rem;
    }

    .product-showcase-grid .product-actions-overlay {
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.375rem;
    }

    .product-showcase-grid .action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }

    .loading-container {
        text-align: center;
        padding: 2rem;
    }

    .loading-spinner {
        width: 3rem;
        height: 3rem;
        margin: 0 auto 1rem;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .gallery-item {
        height: 280px;
        border-radius: 0.75rem;
        min-height: 250px;
        position: relative;
        overflow: hidden;
    }

    .gallery-item img {
        object-fit: cover;
        object-position: center;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }

    .gallery-overlay {
        padding: 1.5rem 1rem 1rem;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
        z-index: 2;
    }

    .gallery-overlay h4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .gallery-overlay p {
        font-size: 0.95rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .service-list {
        font-size: 0.9rem;
    }

    .service-list li {
        margin-bottom: 0.5rem;
        padding-left: 1rem;
    }

    /* About Section */
    .about-content {
        gap: 2rem;
    }

    .about-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-text h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .about-text .lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    .about-image img {
        width: 100%;
        height: auto;
        border-radius: 0.75rem;
    }

    .about-highlights {
        gap: 1.5rem;
    }

    .highlight-item h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .highlight-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .team-card {
        padding: 1.5rem;
        text-align: center;
    }

    .team-card h4 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .team-card h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: var(--gray-600);
    }

    .team-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-card {
        padding: 1.5rem;
        text-align: center;
    }

    .contact-card h4 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .contact-card p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .social-links {
        justify-content: center;
        gap: 1rem;
    }

    .social-links a {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }

    /* Floating Elements */
    .floating-cart-button {
        bottom: 1rem;
        right: 1rem;
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }

    .whatsapp-float {
        bottom: 5rem;
        right: 1rem;
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.5rem;
    }

    /* Cart Sidebar */
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }

    .cart-sidebar.active {
        right: 0;
    }

    .cart-sidebar-header {
        padding: 1rem;
    }

    .cart-sidebar-header h3 {
        font-size: 1.25rem;
    }

    .cart-sidebar-content {
        padding: 1rem;
    }

    .cart-sidebar-footer {
        padding: 1rem;
    }

    .cart-sidebar-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-clear-cart,
    .btn-checkout {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Tablet Styles (768px - 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 2rem;
    }

    /* Hero Section */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }

    /* Grid Layouts */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .product-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* About Section */
    .about-row {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }

    .about-row:nth-child(even) {
        flex-direction: row-reverse;
    }
}

/* Desktop Styles (1024px+) */
@media screen and (min-width: 1024px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    /* Hero Section */
    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 2rem;
    }

    /* Grid Layouts */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop Styles (1440px+) */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 50vh;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .section {
        padding: 2rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gallery-item img,
    .about-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
/* Dark mode disabled - keeping white background */

/* Print Styles */
@media print {
    .floating-cart-button,
    .whatsapp-float,
    .cart-sidebar,
    .cart-sidebar-overlay {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 1rem 0;
    }

    .section {
        page-break-inside: avoid;
    }
}
