/* ===================================
   QR Menu – Responsive
   Refined Warmth Theme
   =================================== */

/* Small phones */
@media screen and (max-width: 374px) {
    :root {
        --font-size-base: 13.5px;
        --font-size-sm: 12px;
        --spacing-md: 14px;
    }

    .product-card {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-sm);
    }
    .product-card__image {
        width: 68px;
        height: 68px;
    }
    .product-card__name {
        font-size: 16px;
    }
    .category-list-item__image {
        width: 56px;
        height: 56px;
    }
    .hero-slider__title {
        font-size: var(--font-size-3xl);
    }
}

/* Larger phones (414px+) */
@media screen and (min-width: 414px) {
    .product-card {
        gap: var(--spacing-lg);
    }
}

/* Tablets and small desktops */
@media screen and (min-width: 768px) {
    .app-container {
        box-shadow: var(--shadow-xl);
        border-radius: var(--radius-xl);
        margin: var(--spacing-lg) auto;
        max-height: calc(100vh - var(--spacing-2xl));
    }

    .main-content--full {
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
        overflow: hidden;
    }

    .product-card__image {
        width: 96px;
        height: 96px;
    }

    .modal {
        max-height: 85vh;
        border-radius: var(--radius-xl);
        bottom: auto;
        top: 50%;
        transform: translateX(-50%) translateY(-50%) scale(0.96);
        opacity: 0;
    }
    .modal-overlay.active .modal {
        transform: translateX(-50%) translateY(-50%) scale(1);
        opacity: 1;
    }
    .modal__handle {
        display: none;
    }
    .modal__content {
        max-height: 85vh;
    }

    .bottom-nav {
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    }
}

/* Landscape phones */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 48px;
    }
    .modal {
        max-height: 95vh;
    }
    .modal__content {
        max-height: calc(95vh - 32px);
    }
}

/* Safe area adjustments */
@supports (padding: max(0px)) {
    .header {
        padding-top: var(--safe-area-top);
    }
    .bottom-nav {
        padding-bottom: max(var(--spacing-sm), var(--safe-area-bottom));
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .header,
    .bottom-nav,
    .modal-overlay {
        display: none !important;
    }
    .main-content {
        padding-bottom: 0;
    }
    .product-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: none;
        --shadow-md: none;
        --shadow-lg: none;
    }
    .product-card,
    .info-card,
    .wifi-card,
    .category-list-item,
    .products-list {
        border: 2px solid var(--color-primary);
    }
}

/* ── Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-list-item {
    animation: fadeInUp 0.35s ease-out both;
}
.category-list-item:nth-child(1) { animation-delay: 0ms; }
.category-list-item:nth-child(2) { animation-delay: 40ms; }
.category-list-item:nth-child(3) { animation-delay: 80ms; }
.category-list-item:nth-child(4) { animation-delay: 120ms; }
.category-list-item:nth-child(5) { animation-delay: 160ms; }
.category-list-item:nth-child(6) { animation-delay: 200ms; }
