/* Phone and tablet adjustments, shared by every page. Loaded last so it wins. */

/* iPhones don't support a "fixed" page background, so draw the spray-paint wall
   on a fixed layer behind everything instead (looks the same, no stretching). */
@media (max-width: 768px), (hover: none) {
    body {
        background-image: none !important;
    }
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgb(142, 192, 237) url("spray-wall.svg") center / cover no-repeat;
    }
}

@media (max-width: 600px) {
    /* Room at the bottom so the floating Cart button never covers anything */
    body {
        padding-bottom: 72px;
    }

    .warning {
        font-size: 13px;
        padding: 10px 12px;
    }

    .back-button {
        padding: 8px 16px;
    }

    .site-nav {
        margin-bottom: 10px;
    }

    .nav-menu {
        min-width: 210px;
    }

    /* Product pages */
    h1 {
        font-size: 1.6em;
    }

    .product-image {
        width: 100%;
        margin-top: 24px;
    }

    .description {
        font-size: 1.05em;
        padding: 14px 16px;
    }

    .order-form {
        padding: 16px;
    }

    /* Bigger + / − buttons that are easy to tap */
    .order-form .qty-controls button {
        min-width: 40px;
        min-height: 40px;
    }

    /* Category pages: two cards per row */
    .category-title {
        margin-top: 16px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        padding: 8px;
    }

    .product-name {
        font-size: 0.95em;
    }

    /* Home page */
    .featured-track .product-card {
        flex-basis: 150px;
        width: 150px;
    }

    .holiday-banner {
        font-size: 1em;
        padding: 12px 14px;
    }

    .deals-box {
        padding: 14px;
    }

    .deals-box li {
        padding: 5px 10px;
        font-size: 0.95em;
    }

    .cart-badge {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}
