/* JOJI KIDS ZONE - Mobile Responsiveness & Touch Optimization Stylesheet */

/* Viewport & base touch enhancements */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Safe area padding for notched mobile displays (iPhone / Modern Android) */
:root {
  --mobile-nav-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 8px);
  }

  /* Compact Announcement Bar on Mobile */
  .bg-gradient-to-r.from-amber-500.via-rose-500 {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
  .bg-gradient-to-r.from-amber-500.via-rose-500 > div {
    justify-content: center !important;
    gap: 6px !important;
  }
  #top-bar-youtube-link,
  #top-bar-whatsapp-link {
    font-size: 10.5px !important;
    padding: 2px 8px !important;
  }

  /* Mobile Header Simplification: Avoid squishing 10 buttons together */
  #header-youtube-link,
  #header-instagram-link {
    display: none !important;
  }

  /* Keep Logo and Brand Title clean and non-shrinking */
  header .shrink-0 {
    flex-shrink: 0 !important;
  }

  /* Catalog Search Container on Mobile */
  #catalog-search-container {
    padding: 10px 12px !important;
    border-radius: 16px !important;
  }
  #catalog-search-input {
    font-size: 14px !important; /* Prevents auto-zoom on iOS Safari */
    padding-top: 9px !important;
    padding-bottom: 9px !important;
  }

  /* Category chips & suggestions smooth touch scroll */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .overflow-x-auto::-webkit-scrollbar {
    display: none !important;
  }

  /* Product Grid adjustments for Mobile */
  .grid.grid-cols-2 {
    gap: 10px !important;
  }

  /* Product Card touch optimizations */
  .group.relative.bg-white,
  .group.relative.dark\:bg-slate-900 {
    border-radius: 18px !important;
  }

  /* Product Card buttons in 2-column mobile layout */
  .group.relative .p-4.sm\:p-5 {
    padding: 10px 10px 12px 10px !important;
  }

  /* Quick View button in mobile card */
  .group.relative button[title*="Quick view"] {
    padding: 6px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  /* Add to Bag button in mobile card */
  .group.relative button:has(svg) {
    min-height: 36px;
    font-size: 11px !important;
  }

  /* Modals Mobile Fit */
  .fixed.inset-0.z-50 > div {
    max-height: calc(100vh - 24px) !important;
    max-width: calc(100vw - 20px) !important;
    margin: auto !important;
    border-radius: 20px !important;
  }

  /* Size selectors on mobile */
  .flex.flex-wrap.gap-1\.5 button {
    min-width: 32px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Mobile Bottom Navigation Bar Styles */
#joji-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding: 6px 8px calc(6px + var(--safe-bottom)) 8px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  user-select: none;
  transition: transform 0.25s ease;
}

.dark #joji-mobile-nav {
  background: rgba(15, 23, 42, 0.94);
  border-top-color: rgba(51, 65, 85, 0.7);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

@media (min-width: 769px) {
  #joji-mobile-nav {
    display: none !important;
  }
}

.joji-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: #64748b;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  min-width: 54px;
}

.dark .joji-nav-item {
  color: #94a3b8;
}

.joji-nav-item:active {
  transform: scale(0.92);
}

.joji-nav-item.active,
.joji-nav-item:hover {
  color: #f59e0b;
}

.dark .joji-nav-item.active,
.dark .joji-nav-item:hover {
  color: #fbbf24;
}

.joji-nav-icon-wrapper {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.joji-nav-icon-wrapper svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.joji-nav-item:active .joji-nav-icon-wrapper svg {
  transform: scale(1.15);
}

/* Badge for Cart, Wishlist, Orders */
.joji-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #f43f5e;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(244, 63, 94, 0.4);
  border: 1.5px solid #ffffff;
}

.dark .joji-nav-badge {
  border-color: #0f172a;
}
