/* =============================================
   CY GADGET WORLD — MOBILE CSS v3
   Beautiful, clean mobile experience
   ============================================= */

/* Desktop: hide mobile-only elements */
.mobile-search-bar { display: none; }
nav.mobile-bottom-nav { display: none; }

@media (max-width: 768px) {

  .topbar { display: none !important; }

  /* HEADER */
  .header { position: sticky !important; top: 0 !important; z-index: 900 !important; box-shadow: 0 2px 8px rgba(0,0,0,.08) !important; }
  .header-inner { display: flex !important; align-items: center !important; gap: 10px !important; padding: 10px 14px !important; min-height: 56px !important; }
  .header-inner .search-bar { display: none !important; }
  .logo { flex-shrink: 0 !important; }
  .logo > div[style*="width:42px"] { width: 34px !important; height: 34px !important; min-width: 34px !important; border-radius: 8px !important; }
  .logo-text .t1 { font-size: 14px !important; font-weight: 800 !important; }
  .logo-text .t2 { display: none !important; }
  .header-actions { margin-left: auto !important; display: flex !important; align-items: center !important; gap: 2px !important; }
  .hbtn { width: 38px !important; height: 38px !important; padding: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; border-radius: 10px !important; min-width: unset !important; }
  .hbtn .lbl { display: none !important; }
  .hbtn .hbtn-icon { font-size: 20px !important; }
  .cart-btn { width: 38px !important; height: 38px !important; padding: 0 !important; border-radius: 10px !important; background: var(--primary) !important; display: flex !important; align-items: center !important; justify-content: center !important; min-width: unset !important; }
  .cart-desktop-info { display: none !important; }
  .cart-btn > div { display: none !important; }
  .cart-btn-total { display: none !important; }

  /* NAV */
  .nav { background: #1a1a2e !important; }
  .nav-inner { display: flex !important; align-items: center !important; padding: 0 10px !important; height: 44px !important; }
  .nav-links { display: none !important; }
  .nav-mega-wrap { display: none !important; }
  .cat-btn { display: flex !important; flex: 1 !important; justify-content: center !important; align-items: center !important; height: 100% !important; min-width: unset !important; font-size: 13px !important; font-weight: 600 !important; padding: 0 12px !important; border-radius: 0 !important; }
  .mobile-menu-btn { display: flex !important; align-items: center !important; justify-content: center !important; width: 40px !important; height: 44px !important; flex-shrink: 0 !important; font-size: 20px !important; border-left: 1px solid rgba(255,255,255,.1) !important; }

  /* MOBILE SEARCH BAR */
  .mobile-search-bar { display: block !important; background: #f5f5f5 !important; padding: 10px 12px !important; border-bottom: 1px solid #e8e8e8 !important; }
  .mobile-search-bar > div { background: white !important; border: 1.5px solid #e0e0e0 !important; border-radius: 50px !important; overflow: hidden !important; display: flex !important; align-items: center !important; }
  #mobile-search-q { color: #333 !important; font-size: 14px !important; padding: 10px 16px !important; }
  #mobile-search-q::placeholder { color: #aaa !important; }
  .mobile-search-bar button { border-radius: 50px !important; margin: 4px !important; padding: 0 14px !important; height: 34px !important; }

  /* BODY */
  body { padding-bottom: 60px !important; }
  .section { padding: 18px 0 !important; }
  .container { padding-left: 12px !important; padding-right: 12px !important; }
  .sec-title { font-size: 16px !important; }

  /* HERO */
  .hero-grid, .hero-inner { grid-template-columns: 1fr !important; padding: 0 10px !important; gap: 8px !important; min-height: unset !important; }
  .hero-sidebar { display: none !important; }
  #hero-slider { min-height: 210px !important; border-radius: 14px !important; }
  #hero-slider .slide { min-height: 210px !important; padding: 22px 18px !important; }
  #hero-slider .slide h2 { font-size: 17px !important; line-height: 1.3 !important; }
  #hero-slider .slide p { font-size: 11.5px !important; }
  .slide-prev, .slide-next { display: none !important; }
  .hero-side, .side-banners-wrap { flex-direction: row !important; gap: 8px !important; }
  .side-banner, .side-banners-wrap > a { flex: 1 !important; min-height: 100px !important; border-radius: 12px !important; }

  /* INLINE GRID HERO */
  div[style*="grid-template-columns:1fr 280px"] { grid-template-columns: 1fr !important; padding: 0 10px !important; min-height: unset !important; }

  /* CATEGORY GRID */
  .cat-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 8px !important; }
  .cat-card { padding: 12px 8px !important; border-radius: 12px !important; }
  .cat-card-icon { width: 42px !important; height: 42px !important; font-size: 20px !important; margin-bottom: 8px !important; }
  .cat-card-name { font-size: 11px !important; line-height: 1.3 !important; }
  .cat-card-count { display: none !important; }

  /* PRODUCT GRID */
  .product-grid, .product-grid-4, .product-grid-3 { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

  /* PRODUCT CARD */
  .product-card { border-radius: 12px !important; box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; }
  .product-card:hover { transform: none !important; box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; }
  .card-img { height: 150px !important; padding: 12px !important; }
  .card-img img { max-height: 120px !important; transform: none !important; }

  /* SHOW ADD TO CART ALWAYS ON MOBILE */
  .quick-add-wrap { display: flex !important; max-height: 44px !important; border-top: 1px solid #f0f0f0 !important; overflow: hidden !important; }
  .quick-add-wrap > div { flex: 1 !important; padding: 9px 4px !important; font-size: 11px !important; font-weight: 700 !important; text-align: center !important; cursor: pointer !important; }

  /* CARD INFO */
  .card-info { padding: 8px 10px 0 !important; }
  .p-brand { font-size: 9.5px !important; margin-bottom: 3px !important; }
  .p-name { font-size: 12px !important; line-height: 1.35 !important; margin-bottom: 4px !important; }
  .stars { font-size: 10px !important; }
  .r-count { font-size: 9.5px !important; }
  .price-now { font-size: 14px !important; font-weight: 800 !important; }
  .price-old { font-size: 11px !important; }
  .discount-badge, .new-badge, .hot-badge { font-size: 9.5px !important; padding: 2px 6px !important; }
  .wish-btn { opacity: 1 !important; width: 28px !important; height: 28px !important; font-size: 12px !important; }

  /* INLINE GRIDS */
  div[style*="grid-template-columns:repeat(5,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  div[style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  div[style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns:1.4fr"] { grid-template-columns: 1fr 1fr !important; }

  /* PROMO STRIP */
  .promo-strip-inner { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .promo-item { padding: 10px 10px !important; gap: 8px !important; border-radius: 10px !important; }
  .promo-icon { width: 34px !important; height: 34px !important; font-size: 16px !important; }
  .promo-text .t2 { display: none !important; }

  /* FLASH SALE */
  .flash-header { flex-wrap: wrap !important; gap: 8px !important; padding: 14px 12px 10px !important; }
  .flash-title { font-size: 16px !important; }

  /* BANNERS / BRANDS */
  .banner-strip { grid-template-columns: 1fr !important; gap: 8px !important; }
  .banner-card { min-height: 120px !important; padding: 18px !important; }
  .brand-logos { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }

  /* MISC */
  .review-grid, .blog-grid { grid-template-columns: 1fr !important; }
  .app-inner { grid-template-columns: 1fr !important; text-align: center !important; }
  .app-visual { display: none !important; }
  .app-btns { justify-content: center !important; }
  .nl-form { flex-direction: column !important; }
  .nl-btn { width: 100% !important; }
  .footer-inner { grid-template-columns: 1fr 1fr !important; gap: 18px !important; }
  .footer-bottom { flex-direction: column !important; text-align: center !important; }
  .footer-legal { justify-content: center !important; }
  .cart-sidebar { width: 100% !important; right: -100% !important; }
  .cart-sidebar.open { right: 0 !important; }
  .store-grid { grid-template-columns: 1fr !important; }
  .product-detail-grid { grid-template-columns: 1fr !important; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr !important; }
  .auth-box { padding: 20px 16px !important; }

  /* FLOATING */
  .chat-fab { bottom: 68px !important; right: 12px !important; width: 44px !important; height: 44px !important; font-size: 18px !important; }
  .scroll-top { display: none !important; }

  /* ANIMATIONS: disable on mobile */
  .anim-up, .anim-down, .anim-left, .anim-right, .anim-zoom { opacity: 1 !important; transform: none !important; animation: none !important; }

  /* BOTTOM NAV */
  nav.mobile-bottom-nav { display: flex !important; align-items: stretch !important; position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; height: 58px !important; background: #ffffff !important; border-top: 1px solid #ebebeb !important; z-index: 9990 !important; box-shadow: 0 -2px 16px rgba(0,0,0,.07) !important; }
  nav.mobile-bottom-nav > div { display: grid !important; grid-template-columns: repeat(5, 1fr) !important; width: 100% !important; align-items: stretch !important; }
  nav.mobile-bottom-nav a { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 3px !important; text-decoration: none !important; font-size: 9.5px !important; font-weight: 600 !important; padding: 6px 0 !important; position: relative !important; }
  nav.mobile-bottom-nav a > span:first-of-type { font-size: 21px !important; line-height: 1 !important; }
}

@media (max-width: 480px) {
  .header-inner { padding: 8px 12px !important; }
  .cat-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }
  .cat-card { padding: 10px 6px !important; }
  .cat-card-icon { width: 38px !important; height: 38px !important; font-size: 18px !important; }
  .cat-card-name { font-size: 10px !important; }
  #hero-slider { min-height: 185px !important; }
  #hero-slider .slide { min-height: 185px !important; padding: 16px 14px !important; }
  #hero-slider .slide h2 { font-size: 15px !important; }
  .card-img { height: 130px !important; }
  .brand-logos { grid-template-columns: repeat(3, 1fr) !important; }
  .footer-inner { grid-template-columns: 1fr !important; }
}

@media (max-width: 360px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .product-grid { gap: 6px !important; }
  .card-img { height: 115px !important; }
  .p-name { font-size: 11px !important; }
  .price-now { font-size: 13px !important; }
  .brand-logos { grid-template-columns: repeat(2, 1fr) !important; }
  .promo-strip-inner { grid-template-columns: 1fr !important; }
}
