/* Mobile-only layout refinements — spacing, sizing, alignment */

@media (max-width: 768px) {
    /* Homepage mobile header — hamburger | logo | cart */
    nav.nav-main {
        display: grid;
        grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr);
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
        min-height: 60px;
    }

    nav.nav-main .mobile-menu-btn {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin: 0;
        flex-shrink: 0;
    }

    nav.nav-main .logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        align-self: center;
    }

    nav.nav-main .nav-right {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0;
        min-width: 44px;
        min-height: 44px;
    }

    nav.nav-main .cart-icon {
        margin-top: 0;
        flex-shrink: 0;
    }

    /* Logo — natural proportions, no vertical stretch */
    .logo img {
        height: auto;
        max-height: 34px;
        width: auto;
        max-width: 112px;
        object-fit: contain;
        object-position: left center;
    }

    nav.nav-main .logo img {
        object-position: center center;
    }

    /* Standardized section headings */
    .section-header {
        text-align: center;
        margin-bottom: 1.75rem;
        padding-top: 0;
    }

    .section-header h2 {
        font-size: 1.7rem;
        letter-spacing: 2.5px;
        margin-bottom: 0.45rem;
        text-align: center;
        line-height: 1.25;
    }

    .section-header p {
        font-size: 0.88rem;
        letter-spacing: 0.5px;
        text-align: center;
        line-height: 1.45;
    }

    /* Consistent section rhythm */
    #about,
    .categories-section,
    #contact {
        padding: 2.25rem 1.5rem;
    }

    /* About — tighter, less vertical spread */
    #about .section-header {
        margin-bottom: 1.25rem;
    }

    .about-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }

    .about-content p:last-child {
        margin-bottom: 0;
    }

    /* Categories */
    .categories-section .section-header {
        margin-bottom: 1.5rem;
    }

    /* Contact — compact header, title on one line */
    #contact .section-header {
        margin-bottom: 1rem;
    }

    #contact .section-header h2 {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        letter-spacing: clamp(0.5px, 0.35vw, 1.5px);
        white-space: nowrap;
        margin-bottom: 0.35rem;
    }

    #contact .section-header p {
        font-size: 0.82rem;
        margin-top: 0;
    }

    .contact-logo-img {
        width: auto;
        max-width: 120px;
        height: auto;
        max-height: 52px;
        object-fit: contain;
        margin-bottom: 0.85rem;
    }

    .contact-text {
        font-size: 0.98rem;
        line-height: 1.55;
        margin-bottom: 1.35rem;
    }

    /* Product page headers — match homepage rhythm */
    .page-header {
        margin-top: 80px;
        padding: 1.75rem 1.5rem 1.5rem;
        text-align: center;
    }

    .page-header h1 {
        font-size: 1.7rem;
        letter-spacing: 2.5px;
        margin-bottom: 0.45rem;
        text-align: center;
        line-height: 1.25;
    }

    .page-header p {
        font-size: 0.88rem;
        letter-spacing: 0.5px;
        text-align: center;
        line-height: 1.45;
    }

    .products-section {
        padding: 2.25rem 1.5rem;
    }

    footer {
        padding: 1.5rem 1.5rem;
    }

    .footer-tagline {
        margin-top: 1.25rem;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-height: 30px;
        max-width: 98px;
    }

    .section-header h2 {
        font-size: 1.55rem;
        letter-spacing: 2px;
    }

    #contact .section-header h2 {
        font-size: clamp(1.1rem, 4.2vw, 1.35rem);
        letter-spacing: 0.5px;
    }

    .page-header h1 {
        font-size: 1.55rem;
        letter-spacing: 2px;
    }

    #about,
    .categories-section,
    #contact {
        padding: 2rem 1.25rem;
    }
}
