/* ===================================================================
   SWEETBREW CAFE — RESPONSIVE & PRINT STYLES
   Breakpoints: Desktop (>1024px), Tablet (768px-1024px), Mobile (<768px)
   =================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .section-title {
    font-size: 2.1rem;
  }
  
  .dashboard-container {
    grid-template-columns: 240px 1fr;
  }
  
  .pos-container {
    grid-template-columns: 1fr 340px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
  }
  
  .kitchen-board {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Mobile & Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .section-padding {
    padding: 50px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .navbar-inner {
    height: 70px;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  /* Mobile Navigation Drawer */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 30px;
    gap: 20px;
    box-shadow: -5px 0 25px rgba(68, 42, 53, 0.15);
    transition: right var(--transition-normal);
    z-index: 1000;
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(68, 42, 53, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
  }
  
  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Mobile Product Grid (2 columns) */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  
  .product-content {
    padding: 12px;
  }
  
  .product-title {
    font-size: 0.95rem;
  }
  
  .product-desc {
    display: none; /* Hide long desc on compact mobile grid */
  }
  
  .product-price {
    font-size: 1rem;
  }
  
  .product-footer .btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  
  /* Dashboard layout for mobile */
  .dashboard-container {
    display: flex;
    flex-direction: column;
  }
  
  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 270px;
    height: 100vh;
    z-index: 1500;
    transition: left var(--transition-normal);
  }
  
  .dashboard-sidebar.open {
    left: 0;
  }
  
  /* POS layout for mobile */
  .pos-container {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  
  .pos-cart-panel {
    border-left: none;
    border-top: 2px solid var(--border-pink);
    position: relative;
    height: auto;
    max-height: 550px;
  }
  
  /* Kitchen Display System for mobile */
  .kitchen-board {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  /* Footer */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  /* Cart / Checkout */
  .cart-layout, .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* Extra Small (max-width: 480px) */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .brand-title {
    font-size: 1.25rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}

/* ===================================================================
   PRINT STYLES FOR POS THERMAL RECEIPT
   =================================================================== */
@media print {
  /* Hide all website elements except the print receipt container */
  body * {
    visibility: hidden;
  }
  
  #receipt-printable-area, #receipt-printable-area * {
    visibility: visible;
  }
  
  #receipt-printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm; /* Standard thermal paper width */
    margin: 0;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    color: #000;
    background: #fff;
    font-size: 12px;
    line-height: 1.4;
  }
  
  .receipt-center {
    text-align: center;
  }
  
  .receipt-divider {
    border-top: 1px dashed #000;
    margin: 8px 0;
  }
  
  .receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
  }
  
  .receipt-total {
    font-weight: bold;
    font-size: 14px;
  }
  
  @page {
    margin: 0;
    size: 80mm auto;
  }
}
