/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .hero .container {
        gap: 40px;
    }

    .hero-image {
        height: 450px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .main-nav {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    /* Give header a background on mobile so it doesn't overlap content transparently */
    .site-header {
        background: rgba(250, 247, 242, 0.9);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 14px 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .floating-card-1 {
        left: -20px;
        top: 20px;
    }

    .floating-card-2 {
        right: -20px;
        bottom: 40px;
    }

    .products-grid,
    ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }

    .category-card-lg {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 400px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: 1fr 1fr;
    }

    .single-product div.product {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
        --gap: 16px;
    }

    /* Hide Three.js on mobile - saves resources and prevents WebGL crashes */
    #three-bg {
        display: none;
    }

    /* Reduce orb sizes to prevent overflow */
    .orb-1 {
        width: 300px;
        height: 300px;
        right: -150px;
        top: -100px;
    }

    .orb-2 {
        width: 250px;
        height: 250px;
        left: -125px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }

    .hero {
        padding-top: 120px;
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .hero-image {
        height: 350px;
    }

    .hero-floating-card {
        display: none;
    }

    .hero-visual {
        max-width: 100%;
    }

    .products-grid,
    ul.products {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card-lg {
        grid-column: span 1;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .cta-content {
        padding: 48px 24px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .shop-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cursor-follower {
        display: none;
    }

    /* Mobile menu close button bigger tap target */
    .mobile-menu-close {
        padding: 8px;
    }

    /* Cart/checkout sidebar stacks on mobile */
    .wc-block-components-sidebar-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Order summary items on mobile */
    .wc-block-components-order-summary-item {
        grid-template-columns: 50px 1fr auto;
        gap: 8px;
    }

    .wc-block-components-order-summary-item__image,
    .wc-block-components-order-summary-item__image img {
        width: 50px !important;
        height: 50px !important;
    }

    /* Notices: stack button below text on narrow screens */
    .woocommerce-message,
    .woocommerce-info {
        padding: 14px 16px;
        font-size: 0.85rem;
    }

    .woocommerce-message a,
    .woocommerce-info a {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding: 10px 16px;
    }

    /* Prevent WooCommerce tables from overflowing */
    .wc-block-cart-items,
    .woocommerce table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hero stats: tighter on mobile */
    .hero-stats {
        gap: 16px;
    }

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

    .stat-suffix {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .products-grid,
    ul.products {
        grid-template-columns: 1fr;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

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

    .orb { display: none; }
    .marquee-track { animation: none; }
    .scroll-wheel { animation: none; }
    .hero-floating-card { animation: none; }
    [data-animate] { opacity: 1; transform: none; }
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
