/* ==========================================================================
   Autopzy - Responsive Styles
   Breakpoints: 1024px (tablet), 767px (mobile)
   ========================================================================== */

/* ---------- Tablet (max-width: 1024px) ---------- */
@media all and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    /* Header */
    .autopzy-header__inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    .autopzy-header__search {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .autopzy-header__contact {
        display: none;
    }
    .autopzy-header__nav-inner {
        flex-wrap: wrap;
    }
    .autopzy-vertical-nav {
        width: 100%;
        margin-bottom: 10px;
    }
    .autopzy-vertical-nav__dropdown {
        position: static;
        max-height: 300px;
        overflow-y: auto;
        box-shadow: none;
        border: 1px solid #e5e5e5;
    }

    /* Hero */
    .autopzy-hero__track { height: 400px; }
    .autopzy-hero__title { font-size: 2rem; }
    .autopzy-hero__subtitle { font-size: 0.9rem; }

    /* Sub-banners */
    .autopzy-sub-banners { flex-direction: column; }
    .autopzy-sub-banner { width: 100%; }

    /* Products grids */
    .autopzy-products-grid--4col {
        grid-template-columns: repeat(3, 1fr);
    }

    /* CMS Banners */
    .autopzy-cms-banners__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Categories */
    .autopzy-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .autopzy-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .autopzy-footer__newsletter-form {
        flex-direction: column;
    }

    /* Deals */
    .autopzy-deal__products {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Featured products + banner */
    .autopzy-latest-products {
        flex-direction: column;
    }
    .autopzy-latest-products__banner {
        width: 100%;
        margin-bottom: 20px;
    }
    .autopzy-latest-products__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Mobile (max-width: 767px) ---------- */
@media all and (max-width: 767px) {
    .container {
        padding: 0 12px;
    }

    /* Header */
    .autopzy-promo-bar { font-size: 12px; }
    .autopzy-promo-bar__inner {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    .autopzy-topbar {
        display: none;
    }
    .autopzy-header__inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }
    .autopzy-header__brand {
        flex: 1 1 auto;
        order: 1;
    }
    .autopzy-header__menu-toggle {
        display: flex;
        order: 0;
    }
    .autopzy-header__actions {
        order: 2;
        gap: 10px;
    }
    .autopzy-header__search {
        order: 3;
        flex: 1 1 100%;
    }
    .autopzy-header__search-cat {
        display: none;
    }
    .autopzy-header__contact {
        display: none;
    }
    .autopzy-header__cart-text,
    .autopzy-header__wishlist-text {
        display: none;
    }
    .autopzy-header__nav {
        display: none;
    }
    .autopzy-header__nav.is-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    /* Hero */
    .autopzy-hero__track { height: 300px; }
    .autopzy-hero__inner { padding: 30px 20px; }
    .autopzy-hero__title { font-size: 1.5rem; }
    .autopzy-hero__subtitle { display: none; }
    .autopzy-hero__eyebrow { font-size: 0.8rem; }
    .autopzy-hero__arrow { display: none; }

    /* Sections */
    .autopzy-section { padding: 30px 0; }
    .autopzy-section__title { font-size: 1.3rem; }
    .autopzy-section__subhead { font-size: 0.85rem; }

    /* Product grids */
    .autopzy-products-grid--4col,
    .autopzy-products-grid--5col {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* CMS Banners */
    .autopzy-cms-banners__grid {
        grid-template-columns: 1fr;
    }

    /* Categories */
    .autopzy-categories__grid {
        grid-template-columns: 1fr;
    }

    /* Services */
    .autopzy-services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Footer */
    .autopzy-footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .autopzy-footer__top .container { padding: 0 15px; }
    .autopzy-footer__newsletter h2 { font-size: 1.2rem; }
    .autopzy-footer__newsletter-form input[type="email"] {
        width: 100%;
        max-width: 100%;
    }
    .autopzy-footer__bottom .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Deals */
    .autopzy-deal__products {
        grid-template-columns: 1fr;
    }

    /* Trending tabs */
    .autopzy-trending__tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Testimonials */
    .autopzy-testimonials__track {
        height: auto;
    }

    /* Blog */
    .autopzy-blog__grid {
        grid-template-columns: 1fr;
    }

    /* Offer banner */
    .autopzy-offer-banner__content {
        padding: 30px 20px;
    }
    .autopzy-offer-banner__title { font-size: 1.5rem; }

    /* Latest products */
    .autopzy-latest-products__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Vertical nav */
    .autopzy-vertical-nav {
        width: 100%;
    }
    .autopzy-vertical-nav__dropdown {
        position: static;
        width: 100%;
    }
}