/* ═══════════════════════════════════════════════════════════
   NuNuz — Mobile Responsive Fixes
   Upload to: public/css/mobile.css
   ═══════════════════════════════════════════════════════════ */

/* ── Mobile bottom ribbon ─────────────────────────────────── */
.mobile-ribbon {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid rgba(61,58,80,.1);
  z-index: 500;
  padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(61,58,80,.08);
}
.mobile-ribbon__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}
.ribbon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .3rem .5rem;
  border-radius: 1rem;
  text-decoration: none;
  color: #9B97B2;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .02em;
  position: relative;
  min-width: 48px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color .15s;
}
.ribbon-btn:hover, .ribbon-btn.active { color: #4FA8DE; }
.ribbon-btn__icon { font-size: 1.3rem; line-height: 1; }
.ribbon-badge {
  position: absolute;
  top: .05rem; right: .2rem;
  background: #F094B8;
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .2rem;
}

/* ── Wishlist heart on product tiles ─────────────────────── */
.wishlist-btn {
  position: absolute;
  top: .6rem; right: .6rem;
  background: rgba(255,255,255,.92);
  border: none;
  border-radius: 999px;
  width: 2rem; height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(61,58,80,.12);
  transition: transform .2s;
  z-index: 5;
}
.wishlist-btn:hover { transform: scale(1.2); }
.wishlist-btn.wishlisted { background: #FDE4EE; }

/* ════════════════════════════════════
   MOBILE — max-width: 768px
   ════════════════════════════════════ */
@media (max-width: 768px) {

  /* Show mobile ribbon + push content up */
  .mobile-ribbon { display: block; }
  body { padding-bottom: 68px; }

  /* ── Navbar ── */
  .navbar-inner {
    padding: 0 .875rem;
    height: 56px;
  }
  .logo {
    font-size: 1.25rem !important;
  }
  /* Hide social icons in header on mobile */
  .social-icon-btn { display: none !important; }
  /* Compact cart/login buttons */
  .cart-btn {
    padding: .45rem .55rem !important;
    font-size: 1rem !important;
  }
  .cart-badge {
    font-size: .6rem !important;
    min-width: 1rem !important;
    height: 1rem !important;
  }
  .navbar-actions { gap: .35rem !important; }

  /* ── Announcement bar ── */
  .announcement-bar {
    font-size: .78rem;
    padding: .45rem .875rem;
    gap: .5rem;
  }

  /* ── Section spacing ── */
  .section { padding: 2rem 0; }
  .container { padding: 0 .875rem; }

  /* ── Category section — horizontal scroll ── */
  [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns: repeat(5, 1fr)"] {
    display: flex !important;
    overflow-x: auto !important;
    gap: .75rem !important;
    padding-bottom: .75rem !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  [style*="grid-template-columns:repeat(5,1fr)"]::-webkit-scrollbar,
  [style*="grid-template-columns: repeat(5, 1fr)"]::-webkit-scrollbar {
    display: none;
  }
  [style*="grid-template-columns:repeat(5,1fr)"] > *,
  [style*="grid-template-columns: repeat(5, 1fr)"] > * {
    min-width: 130px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start;
  }

  /* ── Product grids ── */
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: .75rem !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; gap: .75rem !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-6 { grid-template-columns: repeat(3, 1fr) !important; gap: .5rem !important; }

  /* ── Product detail page ── */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  /* Product image smaller on mobile */
  .product-tile__img { font-size: 3.5rem; }

  /* ── Cart layout ── */
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns: 1fr 380px"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Checkout ── */
  [style*="position:sticky"][style*="top:80px"] {
    position: relative !important;
    top: auto !important;
  }

  /* ── Footer ── */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.25rem !important;
  }
  .footer-brand {
    grid-column: 1 / -1 !important;
  }
  .footer-wave svg { height: 36px; }

  /* ── Instagram grid ── */
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: .35rem !important;
  }

  /* ── Account page ── */
  .account-grid { grid-template-columns: 1fr !important; }
  .account-nav { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .5rem; }
  .account-nav a { white-space: nowrap; flex-shrink: 0; }

  /* ── Admin ── */
  .admin-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; padding: 1rem !important; }
  .sidebar-toggle { display: block !important; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .admin-grid-2 { grid-template-columns: 1fr !important; }
  .admin-grid-3 { grid-template-columns: 1fr !important; }

  /* ── Auth pages ── */
  .auth-page,
  [style*="min-height:80vh"][style*="display:flex"][style*="align-items:center"] {
    padding: 1.5rem .875rem !important;
    align-items: flex-start !important;
    padding-top: 2rem !important;
  }
  [style*="max-width:420px"],
  [style*="max-width:480px"] {
    max-width: 100% !important;
    border-radius: 1.5rem !important;
    padding: 1.75rem 1.25rem !important;
  }

  /* ── FAQ ── */
  .faq-question { font-size: .9rem; padding: 1rem 1.25rem; }

  /* ── WhatsApp FAB — move above ribbon ── */
  .whatsapp-fab {
    bottom: 5rem !important;
    right: 1rem !important;
    padding: .625rem 1rem !important;
    font-size: .8rem !important;
  }
  .whatsapp-fab span { display: none; }

  /* ── Section headers ── */
  .section-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .75rem !important;
  }

  /* ── Form grid ── */
  .form-grid { grid-template-columns: 1fr !important; }

  /* ── Table ── */
  .table-wrap { border-radius: 1rem; }
  table { font-size: .8rem; }
  th, td { padding: .5rem .75rem; }

  /* ── Hero ── */
  .hero-slider { min-height: 420px !important; }

  /* ── Buttons ── */
  .btn { padding: .75rem 1.25rem; font-size: .875rem; }
  .btn-sm { padding: .45rem .875rem; font-size: .78rem; }
}

/* ════════════════════════════════════
   SMALL PHONES — max-width: 480px
   ════════════════════════════════════ */
@media (max-width: 480px) {

  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.2rem !important; }

  /* 2-col product grid */
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: .6rem !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; gap: .6rem !important; }
  .grid-6 { grid-template-columns: repeat(3, 1fr) !important; gap: .4rem !important; }

  /* Smaller product tiles */
  .product-tile__body { padding: .625rem; }
  .product-tile__name { font-size: .8rem; }
  .price__current { font-size: .9rem !important; }
  .price__mrp { font-size: .75rem; }
  .badge-off, .badge-new, .badge-best { font-size: .65rem; }

  /* Footer 1 column */
  .footer-grid { grid-template-columns: 1fr !important; }

  /* Category cards */
  .age-card { padding: 1rem .5rem; }
  .age-card__emoji { font-size: 2rem; }
  .age-card__label { font-size: .75rem; }

  /* Section header */
  .eyebrow { font-size: .7rem; }

  /* Navbar even more compact */
  .navbar-inner { padding: 0 .75rem; height: 52px; }
  .logo { font-size: 1.1rem !important; }
  .cart-btn { padding: .4rem .5rem !important; }

  /* Product detail */
  [style*="font-size:9rem"] { font-size: 6rem !important; }
  [style*="font-size:2rem"][style*="margin:.5rem 0"] { font-size: 1.4rem !important; }

  /* Hero */
  .hero-slider { min-height: 360px !important; }
  [style*="padding:5rem 0 4rem"] { padding: 2.5rem 0 2rem !important; }
}
