/* ============================================
   FoodBreak - Responsive Styles
   ============================================ */

/* Extra Large Devices (1200px and up) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .special-deal {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .special-deal-items {
        display: inline-block;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
}

/* Large Devices (992px and up) */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .navbar-nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .navbar-nav.mobile {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-container .step-card:nth-child(3),
    .steps-container .step-card:nth-child(4) {
        margin-top: 2rem;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        position: fixed;
        left: -250px;
        transition: var(--transition);
        z-index: 1001;
    }
    
    .admin-sidebar.open {
        left: 0;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (768px and up) */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .special-deal {
        padding: 2rem;
    }
    
    .special-deal-price {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .product-card {
        border-radius: var(--radius-md);
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
    
    .quick-view-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-view-image {
        margin-bottom: 1rem;
    }
    
    .menu-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box,
    .filter-select,
    .sort-select {
        width: 100%;
        min-width: auto;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-topbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
    
    .toast-container {
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

/* Small Devices (576px and up) */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.125rem; }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .special-deal {
        padding: 1.5rem;
    }
    
    .special-deal-price {
        font-size: 1.75rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 180px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .steps-container .step-card:nth-child(2),
    .steps-container .step-card:nth-child(3),
    .steps-container .step-card:nth-child(4) {
        margin-top: 0;
    }
    
    .testimonials-grid {
        gap: 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .accordion-item {
        border-radius: var(--radius-sm);
    }
    
    .accordion-header {
        padding: 1rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-brand,
    .footer-links {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 120px;
    }
    
    .checkout-form,
    .order-summary {
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .admin-login-box {
        padding: 2rem;
    }
    
    .admin-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .table-actions {
        flex-direction: column;
    }
    
    /* Convert table to cards on mobile */
    .admin-table {
        display: block;
    }
    
    .admin-table thead {
        display: none;
    }
    
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }
    
    .admin-table tr {
        margin-bottom: 1rem;
        background: var(--bg-tertiary);
        border-radius: var(--radius-md);
        padding: 1rem;
    }
    
    .admin-table td {
        padding: 0.5rem 0;
        text-align: left;
        border: none;
    }
    
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 120px;
        color: var(--text-muted);
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .invoice {
        padding: 1rem;
    }
    
    .invoice-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .invoice-details {
        text-align: center;
    }
    
    .invoice-table {
        font-size: 0.875rem;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 0.5rem;
    }
}

/* Extra Small Devices (400px and down) */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
    
    .product-footer {
        flex-direction: column;
    }
    
    .product-footer .btn {
        width: 100%;
    }
    
    .cart-drawer-footer .btn {
        width: 100%;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar,
    .footer,
    .floating-buttons,
    .cart-drawer,
    .modal,
    .toast-container,
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
    }
    
    .invoice {
        background: white;
        color: black;
        border: none;
        box-shadow: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Adjust any high-DPI specific styles if needed */
}

/* Dark Mode Support (System Preference) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme by default */
}

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

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover,
    .category-card:hover,
    .feature-card:hover,
    .card:hover {
        transform: none;
    }
    
    .product-actions {
        opacity: 1;
    }
    
    .floating-btn:hover {
        transform: none;
    }
}
