@media(max-width:1050px) {
    .main-nav {
        gap: 12px
    }

    .main-nav a {
        font-size: .78rem
    }

    .header-order-button {
        display: none
    }

    .hero-grid {
        gap: 45px
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media(max-width:780px) {
    .header-inner {
        min-height: 70px
    }

    .menu-toggle {
        display: block;
        order: 2
    }

    .main-nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 4%;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        margin: 0
    }

    .main-nav.active {
        display: flex
    }

    .main-nav a {
        padding: 14px 4px;
        border-bottom: 1px solid var(--border);
        font-size: .9rem
    }

    .header-tools {
        margin-left: auto;
        order: 3
    }

    .brand {
        order: 1
    }

    .hero {
        min-height: auto
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 58px 0 70px
    }

    .hero-content h1 {
        font-size: clamp(2.7rem, 12vw, 4.2rem)
    }

    .hero-visual {
        width: 88%;
        margin: auto
    }

    .hero-floating-card {
        left: 0
    }

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

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

    .section-heading-row {
        align-items: start;
        flex-direction: column
    }

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

    .home-cta-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 28px
    }
}

@media(max-width:480px) {
    .section {
        padding: 20px 0
    }

    .brand-tagline {
        display: none
    }

    .header-tools {
        gap: 8px
    }

    .account-link {
        font-size: .78rem
    }

    .cart-link span:first-child {
        display: none
    }

    .account-link {
        font-size: .75rem
    }

    .search-trigger {
        font-size: 1rem
    }

    .hero-actions {
        flex-direction: column
    }

    .hero-actions a {
        width: 100%
    }

    .hero-visual {
        width: 94%
    }

    .hero-floating-card {
        bottom: 15px;
        padding: 11px 14px
    }

    .category-grid,
    .product-grid,
    .promise-grid {
        grid-template-columns: 1fr
    }

    .category-card img {
        aspect-ratio: 1.15
    }

    .home-cta-card .primary-button {
        width: 100%
    }
}


/* Sweet Crumbs Store - Responsive WhatsApp button */
@media screen and (min-width: 601px) and (max-width: 1366px) {
    body #whatsappChat {
        position: fixed !important;

        /* Keep the button at the bottom-right on different iPads */
       
top: auto !important;
left: auto !important;
right: 20px !important;
bottom: max(150px, 12vh) !important;


        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 9px !important;

        width: max-content !important;
        height: auto !important;
        max-width: calc(100vw - 40px) !important;
        box-sizing: border-box !important;

        padding: 13px 18px !important;
        border: none !important;
        border-radius: 999px !important;

        background: #25D366 !important;
        color: #ffffff !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        pointer-events: auto !important;

        z-index: 2147483647 !important;
    }

    body #whatsappChat span {
        display: inline-flex !important;
        color: #ffffff !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body #whatsappChat span:last-child {
        white-space: nowrap !important;
    }
}


/* Wide tablets: iPad Pro 13 and Surface Pro 10 */
@media screen and (min-width: 900px) and (max-width: 1100px) {
    body #whatsappChat {
        position: fixed !important;
        top: 800px !important;
        left: auto !important;
        right: 20px !important;
        bottom: auto !important;

        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        z-index: 2147483647 !important;

        background: #25D366 !important;
        color: #fff !important;
        padding: 13px 18px !important;
        border: none !important;
        border-radius: 999px !important;
    }
}


/* Mobile header layout — keep Login, Search and Cart visible */
@media screen and (max-width: 600px) {
    .header-inner {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    .brand {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .brand-name {
    font-size: clamp(12px, 3.5vw, 17px) !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

    .menu-toggle {
        flex: 0 0 auto !important;
        padding: 0 2px !important;
        font-size: 1.25rem !important;
    }

    .header-tools {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        margin-left: 0 !important;
    }

    .search-trigger {
        flex: 0 0 auto !important;
        padding: 0 2px !important;
    }

    .cart-link {
        flex: 0 0 auto !important;
        gap: 3px !important;
    }

    .account-link {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        white-space: nowrap !important;
        font-size: 0.72rem !important;
    }
}
