/* ============================================================
   JANOSCI MODERN UI v2 — Clean, Professional, Attractive
   ============================================================ */

/* ── Color System ── */
:root {
  --m-primary: #2563EB;
  --m-primary-light: #3B82F6;
  --m-primary-dark: #1D4ED8;
  --m-accent: #F59E0B;
  --m-accent-light: #FBBF24;
  --m-success: #10B981;
  --m-bg: #F8FAFC;
  --m-card: #FFFFFF;
  --m-text: #0F172A;
  --m-muted: #64748B;
  --m-border: #E2E8F0;
  --m-navy: #0F172A;
  --m-navy-light: #1E293B;
  --gold: #F59E0B;
}

/* ── Typography ── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--m-bg);
  color: var(--m-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em;
}

/* ── HEADER & NAVIGATION ── */
.ann-bar {
  background: #0F172A;
  color: rgba(255,255,255,0.8);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ann-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ann-item i { margin-right: 6px; color: var(--m-accent); }
.ann-sep { margin: 0 12px; opacity: 0.2; }
.ann-link { color: inherit; text-decoration: none; transition: color 0.2s; }
.ann-link:hover { color: #fff; }

.header-nav .container { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.site-header {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 0 !important;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1.5rem;
}
.header-logo img { height: 32px; width: auto; }

.header-search { flex: 1; max-width: 550px; }
.search-box {
  position: relative;
  display: flex;
  background: #F1F5F9;
  border-radius: 50px;
  padding: 3px;
  transition: all 0.3s;
  border: 1px solid #E2E8F0;
}
.search-box:focus-within {
  background: #fff;
  border-color: var(--m-primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}
.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  outline: none;
}
.search-box button {
  background: var(--m-primary);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.search-box button:hover { background: var(--m-primary-dark); transform: scale(1.05); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.action-item { position: relative; }
.action-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1.15rem;
  border-radius: 10px;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  background: transparent;
}
.action-btn:hover { background: #F1F5F9; color: var(--m-primary); }

.cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  color: #0F172A;
  border-radius: 10px;
  font-size: 1.15rem;
  transition: all 0.2s;
  text-decoration: none;
}
.cart-btn:hover { background: #E2E8F0; transform: translateY(-2px); }
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--m-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 4px 12px 4px 4px;
  background: #F1F5F9;
  border: none;
  border-radius: 30px;
  transition: all 0.2s;
}
.user-btn:hover { background: #E2E8F0; }
.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--m-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.user-info { text-align: left; line-height: 1.1; }
.user-greet { display: block; font-size: 0.65rem; color: #64748B; font-weight: 600; text-transform: uppercase; }
.user-name { display: block; font-size: 0.82rem; font-weight: 700; color: #0F172A; }

.user-menu { position: relative; }
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid #F1F5F9;
  padding: 0.75rem;
  display: none;
  z-index: 1100;
  margin-top: 10px;
}
.user-menu:hover .user-dropdown { display: block; animation: fadeIn 0.2s ease; }
.dropdown-header { font-size: 0.65rem; font-weight: 800; color: #94A3B8; text-transform: uppercase; padding: 0.5rem 0.75rem; border-bottom: 1px solid #F1F5F9; margin-bottom: 0.5rem; }
.user-dropdown a { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; color: #475569; font-size: 0.85rem; text-decoration: none; border-radius: 8px; transition: all 0.2s; }
.user-dropdown a:hover { background: #F1F5F9; color: var(--m-primary); }
.user-dropdown a i { width: 16px; text-align: center; font-size: 0.9rem; }
.dropdown-divider { height: 1px; background: #F1F5F9; margin: 0.5rem 0; }
.admin-link { color: var(--m-primary) !important; font-weight: 700 !important; }
.logout-link { color: #EF4444 !important; }

.header-nav { border-top: 1px solid #F1F5F9; background: #fff; margin-bottom: 0 !important; }
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}
.nav-links > li > a {
  display: block;
  padding: 0.65rem 0;
  color: #475569;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
}
.nav-links > li > a:hover, .nav-links > li > a.active {
  color: var(--m-primary);
}
.nav-links > li > a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--m-primary);
  border-radius: 2px;
}

/* Mega Menu */
.has-dropdown { position: static; }
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  padding: 2.5rem 0;
  display: none;
  border-top: 1px solid #F1F5F9;
  z-index: 100;
}
.has-dropdown:hover .mega-menu { display: block; animation: fadeIn 0.2s ease; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.mega-col h5 { font-size: 0.9rem; font-weight: 800; color: #0F172A; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.mega-col a { display: block; padding: 0.4rem 0; color: #64748B; font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.mega-col a:hover { color: var(--m-primary); padding-left: 4px; }

/* ── FOOTER ── */
.site-footer {
  background: #0F172A;
  color: rgba(255,255,255,0.7);
  padding: 5rem 0 2rem;
  margin-top: 4rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: 4rem;
  margin-bottom: 4rem;
}
.footer-logo img { height: 45px; margin-bottom: 1.5rem; filter: brightness(0) invert(1); }
.footer-about { line-height: 1.7; font-size: 0.9rem; margin-bottom: 2rem; }
.footer-social { display: flex; gap: 0.75rem; }
.social-btn {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s;
}
.social-btn:hover { transform: translateY(-4px); }
.social-btn.facebook:hover { background: #1877F2; }
.social-btn.instagram:hover { background: #E4405F; }
.social-btn.whatsapp:hover { background: #25D366; }
.social-btn.email:hover { background: var(--m-primary); }

.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col h6 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a { color: inherit; text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }

.contact-info li { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem !important; }
.contact-info i { color: var(--m-accent); margin-top: 4px; font-size: 1.1rem; }
.contact-info div span { display: block; font-size: 0.75rem; color: #94A3B8; text-transform: uppercase; font-weight: 600; margin-bottom: 2px; }
.contact-info div strong { display: block; font-size: 0.9rem; color: #fff; font-weight: 600; }

.footer-middle {
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.newsletter-box { max-width: 500px; }
.newsletter-box h5 { color: #fff; margin-bottom: 0.5rem; }
.newsletter-box p { font-size: 0.85rem; margin-bottom: 1.5rem; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.88rem;
}
.newsletter-form button {
  background: var(--m-primary);
  color: #fff;
  border: none;
  padding: 0 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
}

.payment-methods { text-align: right; }
.payment-label { display: block; font-size: 0.75rem; color: #94A3B8; text-transform: uppercase; font-weight: 700; margin-bottom: 1rem; }
.payment-icons { display: flex; gap: 1.25rem; font-size: 1.75rem; color: rgba(255,255,255,0.4); align-items: center; }
.payment-icons i:hover { color: #fff; }
.upi-badge {
  font-size: 0.7rem;
  font-weight: 900;
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }
.copyright strong { color: #fff; }
.footer-badges { display: flex; gap: 1.5rem; }
.badge-item { display: flex; align-items: center; gap: 0.5rem; }
.badge-item i { color: var(--m-success); }

/* ── MOBILE APP BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.06);
  z-index: 1500;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 700;
  gap: 5px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.bottom-nav-item i {
  font-size: 1.35rem;
  transition: all 0.3s;
}

.bottom-nav-item.active {
  color: var(--m-primary);
}

.bottom-nav-item.active i {
  transform: translateY(-4px);
  filter: drop-shadow(0 4px 8px rgba(37,99,235,0.2));
}

.bottom-nav-item .badge-dot {
  position: absolute;
  top: 6px;
  right: 22%;
  background: #EF4444;
  color: #fff;
  font-size: 0.65rem;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #fff;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

/* Ensure content doesn't hide behind bottom nav */
body {
  padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (min-width: 992px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0 !important; }
}

/* ── HEADER MODS ── */
@media (max-width: 991px) {
  .site-header { padding: 0.5rem 0; border-bottom: 1px solid #F1F5F9; }
  .header-main { padding: 0.25rem 0; }
  .header-search { display: none !important; }
  .header-nav { display: none !important; }
  .user-info { display: none !important; }
  .header-logo img { height: 26px; }
  .action-btn { width: 36px; height: 36px; font-size: 1rem; }
  .user-btn { padding: 3px; background: transparent; }
  .user-avatar { width: 32px; height: 32px; border-radius: 10px; }
}

/* ── MODALS ── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.open { display: flex; animation: fadeIn 0.3s ease; }
.modal-card {
  background: #fff;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 { font-size: 1.1rem; margin: 0; }
.modal-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
}
.modal-body { padding: 1.5rem; }
.modal-foot {
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Layout Spacing ── */
.section { padding: 5rem 0; }
.hero-slider-section { display: block; padding: 0; margin: 0 !important; }
.page-wrapper { min-height: calc(100vh - 400px); padding-top: 0.75rem !important; }

/* ── HEADER & NAVIGATION ── */
.text-danger { color: #EF4444 !important; }
.small { font-size: 0.8rem; }
.badge-dot { background: var(--m-primary); color: #fff; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }


/* ══════════════════════════════════════════════
   ENHANCED CATEGORY TILES (Beautiful)
   ══════════════════════════════════════════════ */
.category-tiles {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 1rem !important;
}
.cat-tile {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  transition: all 0.25s ease !important;
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
}
.cat-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #2563EB, #3B82F6);
  transform: scaleY(0);
  transition: transform 0.25s ease;
  transform-origin: top;
}
.cat-tile:hover {
  border-color: #2563EB !important;
  box-shadow: 0 8px 24px rgba(37,99,235,0.12) !important;
  background: #fff !important;
}
.cat-tile:hover::before {
  transform: scaleY(1);
}
.cat-tile-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(59,130,246,0.04)) !important;
  color: #2563EB !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.4rem !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(37,99,235,0.1) !important;
  overflow: hidden;
  padding: 0;
}
.cat-tile-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 12px;
}
.cat-tile:hover .cat-tile-icon {
  background: linear-gradient(135deg, #2563EB, #3B82F6) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: scale(1.05);
}
.cat-tile-info {
  flex: 1;
  min-width: 0;
}
.cat-tile-info h3 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  margin: 0 0 0.2rem !important;
  letter-spacing: -0.01em !important;
}
.cat-tile-info p {
  font-size: 0.75rem !important;
  color: #64748B !important;
  margin: 0 !important;
  font-weight: 500;
}
.cat-tile:hover .cat-tile-info p {
  color: #2563EB !important;
}
.cat-tile-arrow {
  color: #cbd5e1 !important;
  font-size: 0.8rem !important;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.cat-tile:hover .cat-tile-arrow {
  color: #2563EB !important;
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .category-tiles {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
  .cat-tile {
    padding: 0.75rem !important;
    gap: 0.5rem !important;
    flex-direction: column !important;
    text-align: center !important;
  }
  .cat-tile-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1rem !important;
    margin: 0 auto !important;
  }
  .cat-tile-info h3 { font-size: 0.78rem !important; }
  .cat-tile-info p { display: none; }
  .cat-tile-arrow { display: none !important; }
  .cat-tile::before { display: none; }
}


/* ══════════════════════════════════════════════
   COMPREHENSIVE MOBILE FRIENDLY (≤768px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hero slider mobile */
  .hero-swiper { height: 380px !important; }
  .slide-title { font-size: 1.75rem !important; line-height: 1.1 !important; margin-bottom: 0.75rem !important; }
  .slide-subtitle { font-size: 0.85rem !important; margin-bottom: 1rem !important; max-width: 100% !important; }
  .slide-tag { font-size: 0.62rem !important; padding: 4px 10px !important; margin-bottom: 0.75rem !important; }
  .slide-content { padding: 1rem 0 !important; max-width: 100% !important; }
  .slide-actions { gap: 0.5rem !important; flex-direction: row !important; }
  .slide-actions .btn { padding: 0.55rem 1rem !important; font-size: 0.78rem !important; }
  .slide-overlay { background: linear-gradient(180deg, rgba(15,23,42,0.5) 0%, rgba(15,23,42,0.85) 100%) !important; }
  
  /* Section padding */
  .section, .section-sm { padding: 1.75rem 0 !important; }
  .section-header { margin-bottom: 1.25rem !important; }
  .section-header h2 { font-size: 1.2rem !important; }
  .section-header p { font-size: 0.78rem !important; padding: 0 1rem; }
  .section-tag { font-size: 0.6rem !important; padding: 0.2rem 0.55rem !important; }
  
  /* Container */
  .container { padding-left: 12px !important; padding-right: 12px !important; }
  
  /* Headings */
  h1 { font-size: 1.4rem !important; }
  h2 { font-size: 1.2rem !important; }
  h3 { font-size: 1rem !important; }
  
  /* Cards spacing */
  .card-body { padding: 1rem !important; }
  
  /* Forms */
  input, select, textarea { font-size: 16px !important; } /* Prevents iOS zoom */
  .form-control { padding: 0.65rem 0.85rem !important; font-size: 0.88rem !important; border-radius: 8px !important; }
  
  /* Buttons */
  .btn { padding: 0.55rem 1rem !important; font-size: 0.85rem !important; border-radius: 8px !important; min-height: 40px; }
  .btn-lg { padding: 0.65rem 1.2rem !important; font-size: 0.9rem !important; }
  .btn-sm { padding: 0.4rem 0.7rem !important; font-size: 0.75rem !important; min-height: 32px; }
  
  /* Tables - horizontal scroll */
  .table-wrap, .tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 500px; }
  .tbl thead th { font-size: 0.65rem !important; padding: 0.55rem 0.7rem !important; }
  .tbl tbody td { font-size: 0.78rem !important; padding: 0.6rem 0.7rem !important; }
  
  /* Modals */
  .modal { padding: 0.5rem !important; align-items: flex-end !important; }
  .modal-card { max-height: 92vh !important; border-radius: 14px 14px 0 0 !important; }
  .modal-head { padding: 0.85rem 1rem !important; }
  .modal-head h3 { font-size: 0.95rem !important; }
  .modal-body { padding: 1rem !important; }
  .modal-foot { padding: 0.85rem 1rem !important; flex-direction: column-reverse !important; }
  .modal-foot .btn { width: 100% !important; }
  
  /* Field grids */
  .field-grid-2, .field-grid-3 { grid-template-columns: 1fr !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  
  /* Stat cards */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
  .stat { padding: 0.85rem !important; gap: 0.6rem !important; }
  .stat-icon { width: 38px !important; height: 38px !important; font-size: 0.9rem !important; }
  .stat-info .stat-num { font-size: 1.1rem !important; }
  .stat-info .stat-label { font-size: 0.6rem !important; }
  
  /* Charts */
  .charts-grid { grid-template-columns: 1fr !important; }
  .chart-wrap { height: 200px !important; }
  
  /* Section actions stack on mobile */
  .section-head { flex-direction: column !important; align-items: flex-start !important; }
  .section-actions { width: 100% !important; flex-wrap: wrap !important; }
  .section-actions .btn { flex: 1 !important; }
  
  /* Sidebar */
  .topbar h2 { font-size: 1rem !important; }
  .topbar { padding: 0 1rem !important; height: 56px !important; }
  .topbar-user span { display: none !important; }
  .content { padding: 1rem !important; }
  
  /* Cart page */
  .cart-summary { position: static !important; margin-top: 1rem !important; }
  
  /* Product detail */
  .pdp-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
  
  /* Variant buttons */
  .variant-btn { font-size: 0.72rem !important; padding: 0.4rem 0.6rem !important; }
  
  /* Image gallery thumbs */
  [data-thumbs-container] > div { width: 50px !important; height: 50px !important; }
  
  /* Slider preview cards in admin */
  .slider-preview { height: 130px !important; padding: 1rem !important; }
  .slider-preview .title { font-size: 1.1rem !important; }
  .slider-preview .subtitle { font-size: 0.7rem !important; max-width: 100% !important; }
  .slider-preview .badge-text { font-size: 0.55rem !important; padding: 3px 8px !important; }
  .slider-info { flex-direction: column !important; align-items: flex-start !important; padding: 0.75rem 1rem !important; }
  
  /* Image grid in admin */
  .image-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; }
  
  /* Pagination */
  .pagination { gap: 0.25rem !important; flex-wrap: wrap; }
  .page-btn { width: 32px !important; height: 32px !important; font-size: 0.78rem !important; }
}

@media (max-width: 480px) {
  /* Tighter mobile */
  .container { padding-left: 10px !important; padding-right: 10px !important; }
  .hero-swiper { height: 340px !important; }
  .slide-title { font-size: 1.4rem !important; }
  .slide-subtitle { font-size: 0.78rem !important; }
  .section-header h2 { font-size: 1.05rem !important; }
}

/* ── Mobile-friendly tables in admin ── */
@media (max-width: 600px) {
  .tbl { font-size: 0.75rem; }
  .tbl thead { display: none; }
  .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: #fff; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.6rem; padding: 0.75rem; }
  .tbl tbody td { padding: 0.35rem 0 !important; border: none !important; }
  .tbl tbody td.text-right { text-align: left !important; padding-top: 0.6rem !important; border-top: 1px solid #f1f5f9 !important; margin-top: 0.5rem; }
  .tbl tbody td .flex { justify-content: flex-start !important; }
}


/* ══════════════════════════════════════════════
   BOTTOM NAV — Clean rounded pill design (mobile only)
   ══════════════════════════════════════════════ */
.bottom-nav {
  display: none !important;
}

@media (max-width: 991px) {
  /* Prevent any horizontal overflow on the entire page */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(15,23,42,0.12), 0 2px 6px rgba(15,23,42,0.06) !important;
    padding: 8px 4px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1000 !important;
    height: auto !important;
    min-height: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-sizing: border-box !important;
    transform: none !important;
    transition: none !important;
    overflow: hidden !important;
    align-items: stretch !important;
    justify-content: space-around !important;
    margin: 0 !important;
  }

  .bottom-nav-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 20% !important;
    max-width: 20% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 4px 2px !important;
    color: #94a3b8 !important;
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    border-radius: 8px !important;
    transition: color 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    position: relative !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .bottom-nav-item::before,
  .bottom-nav-item::after {
    display: none !important;
    content: none !important;
  }

  .bottom-nav-item i {
    font-size: 1.05rem !important;
    color: inherit !important;
    transform: none !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    flex-shrink: 0 !important;
  }

  .bottom-nav-item span {
    font-size: 0.62rem !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
    color: inherit !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
  }

  .bottom-nav-item.active {
    color: #2563EB !important;
  }
  .bottom-nav-item.active i {
    color: #2563EB !important;
  }
  .bottom-nav-item.active span {
    color: #2563EB !important;
    font-weight: 700 !important;
  }

  .bottom-nav-item .badge-dot {
    position: absolute !important;
    top: 2px !important;
    right: 8px !important;
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 0.5rem !important;
    font-weight: 800 !important;
    min-width: 13px !important;
    height: 13px !important;
    border-radius: 9999px !important;
    padding: 0 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1.5px solid #fff !important;
    line-height: 1 !important;
  }

  /* Add bottom padding to body so content isn't hidden behind nav */
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* Prevent any element from causing horizontal scroll */
  .container, .container-fluid {
    max-width: 100% !important;
    overflow-x: hidden;
  }
  img, video, iframe { max-width: 100% !important; height: auto; }
  
  /* Tables - allow scrolling within wrapper only */
  .table-wrap, .table-responsive {
    overflow-x: auto !important;
    max-width: 100%;
  }
  
  /* Fix any sliders that might overflow */
  .swiper, .hero-swiper { max-width: 100vw !important; overflow: hidden !important; }
  
  /* Prevent any direct child of body from being wider than viewport */
  body > * { max-width: 100vw !important; }
}

/* Very small screens — keep labels readable */
@media (max-width: 360px) {
  .bottom-nav {
    left: 6px !important;
    right: 6px !important;
    bottom: 6px !important;
    padding: 6px 2px !important;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 14px !important;
  }
  .bottom-nav-item span { font-size: 0.55rem !important; }
  .bottom-nav-item i { font-size: 0.95rem !important; }
}

/* Hide on desktop */
@media (min-width: 992px) {
  .bottom-nav { display: none !important; }
  body { padding-bottom: 0 !important; }
}
