/**
 * Global Responsive Rules
 * Section-specific responsive rules live in hero.css / header.css / footer.css.
 * This file holds cross-cutting breakpoint tweaks.
 */

/* ---------- 1200px ---------- */
@media (max-width: 1200px) {
    :root { --xtech-container-width: 1120px; }

    .xtech-section { padding: 4.5rem 0; }
}

/* ---------- 1024px (Tablets landscape) ---------- */
@media (max-width: 1024px) {
    .xtech-section { padding: 4rem 0; }
    .xtech-section-heading { margin-bottom: 2.5rem; }

    .xtech-categories-premium__grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }
}

/* ---------- 768px (Tablets portrait / large phones) ---------- */
@media (max-width: 768px) {
    .xtech-main { padding-top: 4rem; }
    .xtech-section { padding: 3rem 0; }
    .xtech-section-heading { margin-bottom: 2rem; }

    .xtech-section-heading__title { font-size: clamp(1.5rem, 6vw, 2rem); }

    .xtech-categories__grid,
    .xtech-products__grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }

    .xtech-categories-premium__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .xtech-catcard { padding: 0.9rem; }
    .xtech-catcard__icon { width: 46px; height: 46px; margin-right: 0.9rem; }
    .xtech-catcard__icon svg { width: 22px; height: 22px; }
    .xtech-catcard__text h3 { font-size: 1rem; }
    .xtech-catcard__text p { font-size: 0.78rem; }

    /* Single product mobile rules now live in single-product.css */
    .wc-tabs { flex-wrap: wrap; }
    .wc-tabs li { margin-right: 1rem; margin-bottom: 0.5rem; }

    .xtech-shop-header__title { font-size: 2rem; }

    .xtech-shop-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ---------- 480px (small phones) ---------- */
@media (max-width: 480px) {
    .xtech-section { padding: 2.5rem 0; }

    .xtech-btn { width: 100%; }

    .xtech-categories__grid,
    .xtech-products__grid {
        grid-template-columns: 1fr;
    }

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

    .xtech-search-overlay__input { font-size: 1.35rem; }
    .xtech-search-overlay__form { padding: 0 1rem; }

    .xtech-cart-count { top: -5px; right: -5px; }

    /* ── Product card: permanent orange border on touch/mobile ── */
    .xtech-product-card {
        border-color: rgba(255, 140, 0, 0.35) !important;
        box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.18), 0 8px 20px -6px rgba(0,0,0,0.6);
    }
    /* Keep image background pure black, no rounding on mobile */
    .xtech-product-card__image {
        border-radius: var(--xtech-radius-sm);
    }
}

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