/* ==========================================================================
   MOBILE-FIRST OPTIMIZATIONS & TOUCH ENHANCEMENTS
   Borécha & Bun-Taa! Responsive Engine
   ========================================================================== */

/* 1. Base Mobile Polish & Safe Areas */
:root {
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-top: env(safe-area-inset-top, 0px);
}

@media (max-width: 768px) {
  /* Prevent horizontal bouncing & enable smooth mobile scroll */
  html, body {
    overflow-x: hidden;
    touch-action: pan-y;
  }

  /* Compact section spacing for faster mobile scanning */
  .collection-shelf-section,
  .story-brewery-section,
  .fab-proof-section,
  .instagram-social-section,
  .reviews-section {
    padding: 48px 0 !important;
  }

  .container {
    padding: 0 16px !important;
  }

  /* 2. Mobile Sticky Header & Announcements */
  .site-header {
    height: 60px !important;
    padding-top: var(--safe-area-top);
  }

  .header-container {
    padding: 0 14px !important;
    height: 60px !important;
  }

  .logo-text {
    font-size: 1.45rem !important;
  }

  .logo-tagline {
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
  }

  .announcement-bar {
    font-size: 0.72rem !important;
    height: 32px !important;
    line-height: 32px !important;
  }

  /* 3. Mobile Hero Section Perfection (V2 Beverage D2C) */
  .hero-section {
    padding: 36px 0 48px !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .hero-left-content {
    align-items: center !important;
    text-align: center !important;
  }

  .hero-main-title {
    font-size: clamp(2.3rem, 8.5vw, 3.2rem) !important;
    line-height: 1.05 !important;
  }

  .hero-description {
    font-size: 0.98rem !important;
    margin-bottom: 20px !important;
  }

  .hero-usp-row {
    justify-content: center !important;
    gap: 8px !important;
  }

  .hero-usp-item {
    font-size: 0.76rem !important;
    padding: 5px 12px !important;
  }

  .hero-action-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .hero-action-group .btn-primary,
  .hero-action-group .btn-secondary {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 0.98rem !important;
    justify-content: center !important;
  }

  .hero-social-proof-bar {
    justify-content: center !important;
    font-size: 0.8rem !important;
  }

  .hero-beverage-showcase-card {
    max-width: 100% !important;
    padding: 24px 18px 18px !important;
  }

  .showcase-can-stage {
    height: 260px !important;
  }

  .stage-can-img {
    max-height: 230px !important;
  }

  .stage-floating-pill {
    font-size: 0.65rem !important;
    padding: 4px 10px !important;
  }

  /* 4. Horizontal Touch Swiping on Mobile Product Shelf */
  .collection-tabs-nav {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;
    padding-bottom: 10px !important;
    scrollbar-width: none;
  }

  .collection-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    padding: 8px 16px !important;
    font-size: 0.78rem !important;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .products-scroll-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 16px !important;
    padding: 4px 16px 20px !important;
    margin: 0 -16px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .products-scroll-grid::-webkit-scrollbar {
    display: none;
  }

  .product-card {
    flex: 0 0 280px !important;
    scroll-snap-align: center;
    border-radius: 12px !important;
  }

  .product-card-top {
    height: 210px !important;
    padding: 14px !important;
  }

  .product-card-img {
    max-height: 175px !important;
  }

  /* Pack Selector Pills Touch Optimization */
  .pack-selector-pills {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin: 12px 0 !important;
  }

  .pack-pill {
    padding: 6px 4px !important;
    min-height: 44px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }

  .pack-pill:active {
    transform: scale(0.95);
  }

  .pack-pill-qty {
    font-size: 0.72rem !important;
  }

  .pack-pill-price {
    font-size: 0.78rem !important;
  }

  .card-add-cart-btn {
    min-height: 46px !important;
    font-size: 0.88rem !important;
  }

  .card-add-cart-btn:active {
    transform: scale(0.97);
  }

  /* 5. Mobile Custom Tasting Crate (Bundle Builder) */
  .bundle-wrapper {
    padding: 20px 14px !important;
    border-radius: 14px !important;
  }

  .bundle-header h2 {
    font-size: 1.65rem !important;
  }

  .bundle-header p {
    font-size: 0.88rem !important;
  }

  .bundle-slots-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .bundle-slot {
    min-height: 86px !important;
    padding: 6px !important;
    border-radius: 8px !important;
  }

  .bundle-slot-img {
    max-height: 48px !important;
  }

  .bundle-slot-label {
    font-size: 0.62rem !important;
    margin-top: 2px !important;
  }

  .bundle-flavor-picker-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .bundle-flavor-card {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }

  .bundle-flavor-card:active {
    transform: scale(0.97);
  }

  .bundle-flavor-thumb {
    width: 38px !important;
    height: 48px !important;
  }

  .bundle-flavor-info h4 {
    font-size: 0.85rem !important;
  }

  .bundle-action-bar {
    padding: 16px 14px !important;
    border-radius: 12px !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .bundle-submit-btn {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 0.92rem !important;
  }

  /* 6. Mobile Cart Drawer Full-Screen & Bottom-Sheet Styling */
  .cart-drawer,
  .cart-drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    border-left: none !important;
    height: 100% !important;
  }

  .cart-header {
    padding: 16px !important;
    padding-top: max(16px, var(--safe-area-top)) !important;
  }

  .cart-title {
    font-size: 1.15rem !important;
  }

  .cart-items-body {
    padding: 14px 16px !important;
    -webkit-overflow-scrolling: touch;
  }

  .cart-footer {
    padding: 16px !important;
    padding-bottom: max(20px, var(--safe-area-bottom)) !important;
  }

  .checkout-btn {
    min-height: 50px !important;
    font-size: 0.98rem !important;
  }

  .checkout-btn:active {
    transform: scale(0.97);
  }

  /* 7. Mobile Navigation Drawer */
  .mobile-nav-drawer {
    width: 85vw !important;
    max-width: 340px !important;
    padding-bottom: max(24px, var(--safe-area-bottom)) !important;
    padding-top: max(20px, var(--safe-area-top)) !important;
  }

  .mobile-nav-link {
    font-size: 1.05rem !important;
    padding: 14px 18px !important;
  }

  /* 8. Story, F.A.B. Formula & Metric Ribbon on Mobile */
  .metrics-ribbon-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .metric-ribbon-item {
    padding: 12px 10px !important;
    text-align: center !important;
  }

  .metric-ribbon-val {
    font-size: 1.1rem !important;
  }

  .metric-ribbon-desc {
    font-size: 0.72rem !important;
  }

  .fab-split-wrap {
    flex-direction: column !important;
  }

  .fab-left-info,
  .fab-right-photo {
    width: 100% !important;
  }

  .subscription-card-inner {
    padding: 24px 16px !important;
    text-align: center !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .sub-left-content h2 {
    font-size: 1.85rem !important;
  }

  .sub-left-content p {
    font-size: 0.92rem !important;
  }
}
