/* ============================================
   MOBILE-FIRST RESPONSIVE OVERRIDES
   ============================================ */

/* --- Tablet (max 900px) --- */
@media (max-width: 900px) {

    /* Header: stack logo + actions, search full-width below */
    .main-header .container {
        flex-wrap: wrap;
        gap: 10px;
    }
    .main-header #logo img {
        height: 36px;
    }
    .search-bar {
        order: 3;
        min-width: 100%;
        max-width: 100%;
    }
    .search-bar select {
        min-width: 90px;
        font-size: 0.78rem;
        padding: 10px 12px;
    }
    .search-bar input {
        font-size: 0.82rem;
        padding: 10px 14px;
    }
    .search-bar button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Header actions: compact */
    .header-actions {
        gap: 6px;
    }
    .header-btn {
        padding: 4px 8px;
    }
    .header-btn .btn-value {
        font-size: 0.75rem;
    }

    /* Nav: horizontal scroll */
    .header-nav .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .header-nav .container::-webkit-scrollbar { display: none; }
    .header-nav a {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 0.78rem;
    }

    /* Mega menu: full width, no grid on tablet */
    .mega-panel {
        min-width: 300px;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    /* Shop layout: stack sidebar above grid */
    .shop-layout {
        flex-direction: column;
        gap: 20px;
    }
    .filter-sidebar {
        width: 100%;
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
        padding-bottom: 16px;
        border-bottom: 1px solid #1a1a1a;
        margin-bottom: 0;
    }
    .filter-group {
        flex: 1;
        min-width: 130px;
    }

    /* Product grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    /* Hero */
    .hero {
        min-height: 50vh;
        padding: 40px 20px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 0.95rem;
    }

    /* Stats strip */
    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 30px 0;
    }
    .stat-item .stat-number {
        font-size: 2rem;
    }

    /* Testimonials */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    /* Benefits */
    .benefits-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Featured strip */
    .featured-strip {
        flex-direction: column;
        text-align: center;
        padding: 20px 24px;
        gap: 16px;
    }

    /* Sections */
    section {
        padding: 40px 0;
    }

    /* Footer */
    footer {
        padding: 20px 0;
    }
}

/* --- Phone (max 600px) --- */
@media (max-width: 600px) {

    /* Typography */
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.35rem !important; }
    h3 { font-size: 1.1rem !important; }
    body { font-size: 0.9rem; }

    /* Top bar: center links */
    .top-bar .container {
        justify-content: center;
        gap: 12px;
    }
    .top-bar a {
        font-size: 0.72rem;
    }

    /* Header: compact */
    .main-header {
        padding: 8px 0;
    }
    .main-header .container {
        gap: 8px;
    }
    .main-header #logo img {
        height: 30px;
    }

    /* Header actions: hide labels, show only icons */
    .header-btn {
        padding: 4px 8px;
    }
    .header-btn .btn-label {
        display: none;
    }
    .header-btn .btn-value {
        font-size: 0.72rem;
    }
    .cart-icon-wrap {
        font-size: 1.1rem;
    }

    /* Search: compact */
    .search-bar select {
        min-width: 70px;
        font-size: 0.7rem;
        padding: 8px 10px;
    }
    .search-bar input {
        font-size: 0.78rem;
        padding: 8px 12px;
    }
    .search-bar input::placeholder {
        font-size: 0.72rem;
    }
    .search-bar button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Nav: hidden by default, toggle with ☰ */
    .header-nav {
        display: none;
    }
    .header-nav.open {
        display: block;
    }
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        padding: 6px 10px;
    }

    /* Mega menu: accordion style on mobile */
    .nav-item-drop .mega-panel {
        position: static;
        min-width: 100%;
        box-shadow: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid #1a1a1a;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 12px 16px;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .nav-item-drop.open .mega-panel {
        display: grid;
    }
    .header-nav a {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    .nav-item-drop > a::after {
        content: "▾";
        margin-left: auto;
    }

    /* Hero: smaller */
    .hero {
        min-height: 40vh;
        padding: 30px 16px;
    }
    .hero h1 {
        font-size: 1.5rem !important;
    }
    .hero p {
        font-size: 0.85rem;
        max-width: 100%;
    }
    .hero .button {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    .hero .button .btn {
        width: 100%;
        text-align: center;
    }

    /* Buttons: full-width on mobile */
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 0.9rem;
    }

    /* Stats: 2x2 grid */
    .stats-strip {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 24px 0;
    }
    .stat-item .stat-number {
        font-size: 1.6rem;
    }
    .stat-item .stat-label {
        font-size: 0.7rem;
    }

    /* Product cards: single column */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .product-card img {
        height: 180px;
    }
    .product-card .product-body {
        padding: 16px;
    }
    .product-card h3 {
        font-size: 1rem;
    }
    .product-card .product-desc {
        font-size: 0.8rem;
    }
    .product-footer {
        flex-direction: row;
        align-items: center;
    }
    .product-price {
        font-size: 1.1rem;
    }
    .btn-enroll {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    /* Filter sidebar: compact row */
    .filter-sidebar {
        gap: 10px;
    }
    .filter-group {
        min-width: 100px;
    }
    .filter-group h4 {
        font-size: 0.68rem;
    }
    .filter-group label {
        font-size: 0.75rem;
    }

    /* Results bar */
    .results-bar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .results-bar span {
        font-size: 0.78rem;
    }
    .results-bar select {
        width: 100%;
    }

    /* Benefits: single column */
    .benefits-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .benefit-item {
        padding: 16px 12px;
    }
    .benefit-item .benefit-icon {
        font-size: 1.6rem;
    }

    /* Testimonials: single column */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    .testimonial-card {
        padding: 20px;
    }
    .testimonial-card .quote {
        font-size: 0.85rem;
    }

    /* Mentorship */
    .mentorship-highlight {
        padding: 20px 16px;
        border-left-width: 2px;
    }
    .mentorship-highlight h3 {
        font-size: 1rem;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .gallery-item img {
        height: 200px;
    }

    /* Forms */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Drawers: full screen */
    .account-drawer,
    .enroll-drawer {
        width: 100vw;
        right: -100vw;
        padding: 24px 20px;
    }
    .account-drawer h2,
    .enroll-drawer h2 {
        font-size: 1.1rem;
    }

    /* Enroll item in cart */
    .enroll-item img {
        width: 48px;
        height: 48px;
    }
    .enroll-item-info h4 {
        font-size: 0.82rem;
    }

    /* Section spacing */
    section {
        padding: 30px 0;
    }

    /* Closing CTA */
    .container[style*="text-align:center"] .btn {
        width: 100%;
        margin: 6px 0 !important;
    }

    /* Container padding */
    .container {
        padding: 0 16px;
    }
}

/* --- Small phone (max 380px) --- */
@media (max-width: 380px) {
    .main-header #logo img {
        height: 26px;
    }
    .header-btn .btn-value {
        font-size: 0.65rem;
    }
    .search-bar select {
        min-width: 60px;
        font-size: 0.65rem;
        padding: 8px 6px;
    }
    .search-bar input {
        font-size: 0.72rem;
        padding: 8px 8px;
    }
    .search-bar button {
        padding: 8px 10px;
    }
    .stats-strip {
        gap: 10px;
    }
    .stat-item .stat-number {
        font-size: 1.3rem;
    }
    .stat-item .stat-label {
        font-size: 0.62rem;
    }
    .product-card img {
        height: 150px;
    }
}
