/* ═══════════════════════════════════════════════════════════════
   Path: /public/assets/css/mobile.css
   NawetPrint — App-style mobile overrides
   Load LAST in base.html.twig (after index.css / page css)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── BODY ────────────────────────────────────────────────────── */
  body {
    background: #f2f4f7 !important;
    padding-bottom: 70px !important;
    overflow-x: hidden;
  }

  /* ── HIDE DESKTOP-ONLY ELEMENTS ─────────────────────────────── */
  .topbar,
  footer,
  .copyright,
  .hamburger,
  .mobile-nav,
  .deco,
  .hero-arrow,
  .nav-links,
  #paginationTop {
    display: none !important;
  }

  /* ── FIXED APP HEADER ───────────────────────────────────────── */
  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 200 !important;
    height: 60px !important;
    padding: 0 16px !important;
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.09) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    backdrop-filter: none !important;
    border-bottom: none !important;
  }

  .navbar::after { display: none !important; }

  /* Compact logo */
  .logo {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
  }
  .logo-image {
    width: 34px !important;
    height: 34px !important;
    transform: none !important;
    border-radius: 8px !important;
    object-fit: contain !important;
  }
  .logo-text {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--blue) !important;
    letter-spacing: -.4px !important;
    line-height: 1.1 !important;
  }
  .logo-text span {
    font-size: 10px !important;
    color: var(--muted) !important;
    letter-spacing: .2px !important;
    margin-top: 1px !important;
    left: 0 !important;
    display: block !important;
  }

  /* Mobile cart icon in header */
  .navbar-mobile-cart {
    width: 42px !important;
    height: 42px !important;
    background: rgba(35,165,222,.09) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 19px !important;
    color: var(--cyan) !important;
    position: relative !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
  }
  .navbar-mobile-cart .cart-badge {
    top: 4px !important;
    right: 4px !important;
    transform: none !important;
    font-size: 8px !important;
    min-width: 16px !important;
    height: 16px !important;
  }

  /* ── PUSH CONTENT BELOW FIXED HEADER ───────────────────────── */
  main {
    margin-top: 60px !important;
  }

  /* ── HERO SLIDER ────────────────────────────────────────────── */
  .hero {
    width: 100% !important;
    margin: 0 !important;
    height: 185px !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .hero-dots { bottom: 10px !important; gap: 6px !important; }
  .hero-dot  { width: 6px !important; height: 6px !important; }

  /* ── MAIN LAYOUT ────────────────────────────────────────────── */
  .main {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* ── SIDEBAR → HORIZONTAL CHIP ROW ─────────────────────────── */
  .sidebar {
    width: 100% !important;
    flex-shrink: unset !important;
    background: #fff !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 10px 0 0 !important;
    order: -1 !important;
  }

  .sidebar-title {
    display: none !important;
  }

  .sidebar ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding: 0 14px 11px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    list-style: none !important;
  }
  .sidebar ul::-webkit-scrollbar { display: none !important; }

  .sidebar ul li { flex-shrink: 0 !important; }

  .sidebar ul li a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 7px 16px !important;
    border-radius: 20px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    background: #f0f2f5 !important;
    border: 1.5px solid transparent !important;
    white-space: nowrap !important;
    margin: 0 !important;
    text-decoration: none !important;
    transition: background .2s, color .2s, border-color .2s !important;
  }
  .sidebar ul li a::before { display: none !important; }
  .sidebar ul li a:hover,
  .sidebar ul li a.active {
    background: rgba(35,165,222,.1) !important;
    color: var(--cyan) !important;
    border-color: var(--cyan) !important;
    padding-left: 16px !important;
  }

  /* ── CONTENT AREA ───────────────────────────────────────────── */
  .content {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 14px 12px 0 !important;
    background: transparent !important;
  }

  /* ── SEARCH ROW ─────────────────────────────────────────────── */
  .search-row {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .search-box {
    flex: 1 !important;
    min-width: 0 !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: #f7f8fa !important;
    box-shadow: none !important;
  }
  .search-box input {
    height: 42px !important;
    font-size: 13px !important;
    padding: 0 12px !important;
    background: transparent !important;
  }
  .search-box button {
    width: 46px !important;
    height: 42px !important;
    font-size: 14px !important;
    border-radius: 0 12px 12px 0 !important;
  }

  .sort-btn {
    flex-shrink: 0 !important;
    height: 42px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    gap: 5px !important;
    white-space: nowrap !important;
  }

  /* ── MOBILE SECTION LABEL ───────────────────────────────────── */
  .mobile-section-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .mobile-section-label::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: var(--border) !important;
  }

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

  .card { border-radius: 12px !important; }
  .card-img { height: 145px !important; }
  .card-body { padding: 10px 10px 13px !important; }
  .card-title { font-size: 12px !important; margin-bottom: 5px !important; }
  .card-price { font-size: 15px !important; }

  /* ── BOTTOM PAGINATION ──────────────────────────────────────── */
  #paginationBottom {
    margin-top: 18px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    padding-bottom: 10px !important;
  }
  .pagination button {
    min-width: 36px !important;
    height: 36px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  /* ── BOTTOM TAB BAR ─────────────────────────────────────────── */
  .app-tab-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 62px !important;
    background: #fff !important;
    border-top: 1px solid var(--border) !important;
    display: flex !important;
    align-items: stretch !important;
    z-index: 200 !important;
    box-shadow: 0 -3px 16px rgba(0,0,0,.07) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  .tab-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    text-decoration: none !important;
    color: var(--muted) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    position: relative !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: color .2s !important;
    border: none !important;
    background: none !important;
    font-family: 'Poppins', sans-serif !important;
  }
  .tab-item i {
    font-size: 21px !important;
    line-height: 1 !important;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1) !important;
  }
  .tab-item:active i { transform: scale(.88) !important; }

  .tab-item.active { color: var(--cyan) !important; }
  .tab-item.active i { transform: scale(1.12) !important; }
  .tab-item.active::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 18% !important;
    right: 18% !important;
    height: 3px !important;
    background: var(--cyan) !important;
    border-radius: 0 0 3px 3px !important;
  }

  .tab-cart-badge {
    position: absolute !important;
    top: 8px !important;
    left: calc(50% + 5px) !important;
    background: var(--pink) !important;
    color: #fff !important;
    font-size: 8px !important;
    min-width: 15px !important;
    height: 15px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    padding: 0 3px !important;
    pointer-events: none !important;
  }

} /* end @media (max-width: 768px) */

/* ── DESKTOP: hide mobile-only elements ────────────────────────── */
@media (min-width: 769px) {
  .app-tab-bar        { display: none !important; }
  .mobile-section-label { display: none !important; }
  .navbar-mobile-cart { display: none !important; }
}