/* Mobile-only overrides (max-width: 768px)
   This file isolates mobile layout changes so editing it won't affect desktop.
*/

@media (max-width: 768px) {
  /* Mobile header: compact single-row layout like the reference
     Logo on the left; cart, profile, hamburger on the right. Hide
     the search on small screens (accessible inside the menu). */
  .site-header{height:72px;min-height:72px;padding:8px 0;background:linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4));backdrop-filter: blur(6px);border-bottom:1px solid rgba(0,255,106,0.06)}

  .header-inner{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 14px}

  /* Header main: holds logo and (hidden) nav */
  .header-main{display:flex;align-items:center;gap:12px}
  .header-main .logo.logo-left{display:flex;align-items:center;justify-content:flex-start}
  .header-main .logo.logo-left img{width:72px;height:72px}

  /* Hide the full nav on mobile (use hamburger) */
  .nav-center{display:none}

  /* Right-side compact actions: cart, profile, hamburger */
  .header-right{display:flex;align-items:center;gap:10px}
  .cart-summary{order:1;display:flex;align-items:center;gap:8px}

  /* Compact profile icon styling (uses existing .user-actions) */
  .user-actions{order:2;display:flex;align-items:center;gap:8px}
  .user-actions .user-link{display:none}
  .user-actions::before{content:'👤';display:inline-block;font-size:18px;padding:8px;background:rgba(255,255,255,0.03);border-radius:50%}

/* Mobile-only overrides (max-width: 768px)
    This file isolates mobile layout changes so editing it won't affect desktop.
*/

@media (max-width: 768px) {
   /* Header / nav */
   .site-header{height:auto;min-height:80px;padding:10px 0}
   .header-inner{padding:10px 16px}

   .header-main{
      flex-wrap:wrap;
      gap:12px;
      justify-content:space-between;
   }

   .header-main .logo.logo-left {
      order: 1;
      flex-shrink: 0;
      position: relative !important;
      left: 0 !important;
      top: 0 !important;
      transform: none !important;
   }

   .header-main .logo.logo-left img{
      width:50px;height:50px;
   }

   .cart-summary { order: 2; flex-shrink: 0; }

   .header-right {
      order: 3;
      width: 100%;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 12px;
   }

   .user-actions { display:none }
   .nav-toggle { grid-column:1; justify-self:start }
   .search-container {
      grid-column:2;
      display:flex;
      width:100%;
   }
   .search-input{
      width:100%;
      height:40px;
      border-radius:24px;
      padding:0 18px;
   }
   .cart-summary { grid-column:3; justify-self:end }

   /* Mobile nav panel - hidden until .open is added */
   .nav-center{
      order:4;
      width:100%;
      margin-top:8px;
      gap:8px;
      padding:0;
      display:none;
      flex-direction:column;
      background:rgba(0,0,0,0.9);
      border:1px solid rgba(0,255,106,0.08);
      border-radius:12px;
      padding:10px;
   }

   .nav-center.open{ display:flex }
   .nav-center a{ padding:10px; white-space:nowrap }

   .nav-toggle{ display:inline-flex; order:0; margin-left:0 }

         /* Make hero start directly under the mobile header */
         main{margin-top:0!important;padding-top:158px}
         body.home main{padding-top:0!important}
         .shop-hero{margin-top:0!important;padding-top:calc(var(--header-height) + 20px)!important}
         main > section:first-of-type{margin-top:0!important;padding-top:0!important}
         #hero.hero{margin-top:0!important}
         .hero-content{padding-top:0}

         /* Hero: switch to flex column so we can reorder elements visually on mobile
            Desired order: title -> image carousel -> description + button */
         .hero-layout { display:flex; flex-direction:column; align-items:center; gap: 24px; text-align: center; width:100%; padding:0 20px; box-sizing:border-box }
         .hero-title-block { order: 1; width:100%; padding:0 8px }
         .hero-image-section { order: 2; width:100%; display:flex; justify-content:center }
         .hero-body-block { order: 3; width:100% }
         .hero-body-block .hero-actions { justify-content:center }
      .hero-image-wrapper{ width:100%; padding:6px 12px 20px; position:relative; box-sizing:border-box }
      .hero-image-grid{
         display:flex;
         gap:12px;
         overflow-x:auto;
         scroll-snap-type:x mandatory;
         -webkit-overflow-scrolling:touch;
         padding:6px 4px 20px;
         max-width:100%;
         width:100%;
      }
      .hero-image-grid::-webkit-scrollbar{ height:4px }
      .hero-image-grid::-webkit-scrollbar-thumb{ background:rgba(0,255,106,0.4); border-radius:999px }
      .hero-grid-item{
         border-radius:14px;
         flex:0 0 150px;
         scroll-snap-align:center;
      }
      .hero-grid-item img{ height:180px; object-fit:cover }
   .mushroom-name{ font-size:11px }

   /* Make tagline a bit larger on phones */
   .tagline{
      font-size:32px;
      line-height:1.15;
      font-weight:700;
      letter-spacing:0.4px;
      margin-bottom:10px;
   }

   /* Give hero title breathing room under the fixed header */
   .hero-text-section{ margin-top:16px }

   /* Show mobile-specific hero body copy after grid */
   .hero-body-block.hero-desktop-only{ display:none }
   .hero-body-block.hero-mobile-only{
      display:block;
      width:100%;
      text-align:center;
      padding:0 4px;
   }
   .hero-mobile-card{
      background:rgba(0,255,106,0.08);
      border:1px solid rgba(0,255,106,0.2);
      padding:20px;
      box-shadow:0 25px 40px rgba(0,0,0,0.45);
      margin:0 16px;
   }
   .hero-body-block.hero-mobile-only .hero-description{ text-align:center; margin-bottom:16px }
   .hero-body-block.hero-mobile-only .hero-actions{ justify-content:center }
   .hero-mobile-card .hero-actions .btn{ width:100%; justify-content:center }

   .hero-mobile-cta{
      display:inline-flex;
      font-size:14px;
      padding:12px 20px;
      animation:heroCtaPop 0.9s ease 0.2s both;
   }
   .hero-mobile-cta::after{
      content:"→";
      font-size:16px;
   }

   @keyframes heroCtaPop{
      0%{opacity:0;transform:translateY(16px) scale(0.95)}
      60%{opacity:1;transform:translateY(-4px) scale(1.03)}
      100%{opacity:1;transform:translateY(0) scale(1)}
   }

   /* Supplement text under grid */
   .hero-supplement-text{ display:block; text-align:center; color:var(--muted); margin:12px auto 0; max-width:360px; font-size:15px }
}
