/* ========================================
   COMPLETE RESPONSIVE CSS - ALL DEVICES
   Breakpoints:
   - Mobile Small: 320px - 480px
   - Mobile Large: 481px - 768px
   - Tablet: 769px - 1024px
   - Laptop: 1025px - 1440px
   - Desktop: 1441px+
======================================== */

/* ========================================
   MOBILE SMALL (320px - 480px)
   Devices: iPhone SE, Galaxy S5, etc.
======================================== */
@media (max-width: 480px) {
    /* Global */
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    /* Hero Section */
    .hero {
        flex-direction: column;
        padding: 80px 5% 30px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .panda-mascot {
        width: 250px;
        height: 280px;
    }
    
    /* Menu Section */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-card {
        height: auto;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* Chatbot */
    .chatbot-container {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .chatbot-messages {
        min-height: 300px;
    }
    
    .chatbot-input-container {
        padding: 0.75rem;
    }
    
    .order-menu-btn,
    .chatbot-send {
        width: 40px;
        height: 40px;
    }
    
    /* Payment Modal */
    .payment-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 95vh !important;
    }
    
    .payment-modal-header h3 {
        font-size: 1rem;
    }
    
    .payment-cards-container {
        grid-template-columns: 1fr;
    }
    
    .payment-card-content {
        flex-direction: row;
        padding: 0.75rem;
    }
    
    .payment-card-icon {
        width: 35px;
        height: 35px;
        margin-right: 0.75rem;
        margin-bottom: 0;
    }
    
    /* Order Panel */
    .order-panel {
        width: 100% !important;
    }

    .order-panel-payment-cards {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   MOBILE LARGE (481px - 768px)
   Devices: iPhone 12/13/14, Galaxy S21, etc.
======================================== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero */
    .hero {
        padding: 100px 5% 50px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .panda-mascot {
        width: 300px;
        height: 350px;
    }
    
    /* Menu */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-categories {
        flex-wrap: wrap;
    }
    
    .menu-category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Chatbot Mobile */
    .chatbot-toggle {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-container {
        width: 100% !important;
        height: calc(100% - 100px) !important;
        bottom: 80px;
    }
}

/* ========================================
   TABLET (769px - 1024px)
   Devices: iPad, Galaxy Tab, etc.
======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Hero */
    .hero-title {
        font-size: 3rem;
    }
    
    .panda-mascot {
        width: 350px;
        height: 400px;
    }
    
    /* Menu */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Chatbot Tablet */
    .chatbot-container {
        width: 400px !important;
        height: 600px !important;
    }
}

/* ========================================
   LAPTOP (1025px - 1440px)
   Devices: MacBook, Laptop 13-15 inch
======================================== */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   DESKTOP (1441px+)
   Devices: Desktop, Large Monitor
======================================== */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   POS RESPONSIVE CSS
======================================== */

/* Mobile POS */
@media (max-width: 768px) {
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .products-section {
        overflow: visible;
    }
    
    .cart-section {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        transition: 0.3s ease;
        z-index: 9999;
    }
    
    .cart-section.active {
        right: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pos-logo h1 {
        font-size: 1.25rem;
    }
    
    .pos-actions {
        gap: 0.5rem;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .mobile-cart-toggle {
        display: flex !important;
    }
}

/* Tablet POS */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cart-section {
        width: 350px;
    }
}

/* ========================================
   ADMIN PANEL RESPONSIVE CSS
======================================== */

/* Mobile Admin */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 9999;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .chart-body {
        height: 250px;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .user-info {
        display: none;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
    }
}

/* Tablet Admin */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

/* ========================================
   LANDSCAPE MODE OPTIMIZATION
======================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 5% 30px;
    }
    
    .chatbot-container {
        height: calc(100vh - 100px) !important;
    }
    
    .payment-modal-content {
        max-height: 90vh !important;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch */
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .menu-card:hover,
    .btn:hover,
    .payment-card:hover {
        transform: none;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .navbar,
    .chatbot-container,
    .chatbot-toggle,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero {
        min-height: auto;
        padding: 20px 0;
    }
}
