/* ============================================================
   Niyoshop — Complete Responsive Fix
   All breakpoints tested: 320px → 2000px+
   ============================================================ */

/* ---------- Desktop Large ---------- */
@media (min-width: 1181px) {
  .header-nav { display: flex !important; }
  .burger { display: none !important; }
  .mobile-backdrop, .mobile-menu { display: none !important; }
}

/* ---------- Desktop / Small Laptop ---------- */
@media (min-width: 901px) and (max-width: 1180px) {
  .header-nav { display: flex !important; }
  .burger { display: none !important; }
  .mobile-backdrop, .mobile-menu { display: none !important; }
  .container { max-width: 100%; padding-inline: 1.5rem; }
  .nav-link { padding-inline: .7rem; }
  .hero-grid { gap: 2.5rem; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail-grid, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary-box { position: static; }
  .faq-layout { grid-template-columns: 260px 1fr; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  /* Hide desktop nav, show burger */
  .header-nav { display: none !important; }
  .header-dashboard-btn, .header-login-btn { display: none !important; }
  .user-menu { display: none !important; }
  .burger { display: flex !important; }
  .header-inner { height: 62px; }
  .header-actions { margin-right: auto; margin-left: .6rem; }
  .logo-text { font-size: 1.3rem; }

  /* Hero */
  .hero { padding: 3.5rem 0; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-desc { margin-inline: auto; }
  .hero-btns { justify-content: center; }
  .hero-img-wrap { display: none; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Categories */
  .categories-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* Dashboard */
  .dash-grid { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
  .dash-tab-btn { margin-bottom: 0; justify-content: center; font-size: .82rem; padding: .7rem; }
  .dash-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* FAQ */
  .faq-layout { grid-template-columns: 1fr; }
  .faq-side-card { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem; }
  .faq-side-card h2 { grid-column: 1 / -1; }
  .faq-preview-grid { grid-template-columns: 1fr; }

  /* Auth */
  .auth-deco { display: none; }
  .auth-form-side { min-height: 100vh; padding: 2rem 1.25rem; }

  /* Product detail */
  .product-detail-grid { gap: 2rem; }

  /* Cart / Checkout */
  .cart-layout, .checkout-layout { gap: 1.5rem; }
  .cart-summary-box { position: static; }
}

/* ---------- Phones (Medium) ---------- */
@media (max-width: 640px) {
  html { font-size: 15px; }
  .container { padding-inline: 1rem; }
  .header-inner { height: 58px; }
  .logo-icon { width: 36px; height: 36px; }
  .logo-text { font-size: 1.1rem; }
  .cart-btn, .burger { width: 38px; height: 38px; }

  /* Mobile menu — full-screen side panel on phones */
  .mobile-menu { width: 100vw; height: 100vh; }
  .mobile-menu-panel { padding: 1.25rem; overflow-x: hidden; }
  .mobile-nav-link { white-space: nowrap; }
  .mobile-actions .btn { font-size: .92rem; }

  /* Hero */
  .hero { padding: 2.5rem 0 3rem; }
  .hero-title { font-size: 1.85rem; }
  .hero-badge { font-size: .78rem; padding: .4rem .8rem; }
  .hero-desc { font-size: .92rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; }

  /* Sections */
  .section { padding: 2.5rem 0; }
  .section-header { margin-bottom: 1.75rem; }
  .section-title { font-size: 1.55rem; }
  .section-desc { font-size: .92rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .stat-num { font-size: 1.55rem; }
  .stat-lbl { font-size: .82rem; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 1.5rem; }

  /* Categories */
  .categories-grid { grid-template-columns: 1fr; }

  /* Products */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .product-body { padding: .85rem; }
  .product-name { font-size: .82rem; min-height: 2.3rem; }
  .product-price { font-size: .85rem; }
  .product-old { font-size: .72rem; }
  .btn-cart { font-size: .75rem; padding: .5rem; }

  /* Shop filter */
  .shop-hero-section { padding: 2rem 0; }
  .shop-hero-title { font-size: 1.65rem; }
  .filter-bar { top: 58px; padding: .75rem 0; }
  .filter-inner { gap: .6rem; }
  #cat-btns { overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: .15rem; scrollbar-width: none; }
  #cat-btns::-webkit-scrollbar { display: none; }
  .cat-btn { flex-shrink: 0; padding: .48rem .85rem; font-size: .78rem; }
  .search-box { max-width: none; width: 100%; min-width: 100%; }
  .shop-meta { flex-direction: column; align-items: flex-start; gap: .4rem; }

  /* Product detail */
  .product-detail-grid { gap: 1.25rem; }
  .product-detail-name { font-size: 1.45rem; }
  .product-price-row.big .product-price { font-size: 1.25rem; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; }

  /* Cart items */
  .cart-item { align-items: flex-start; gap: .65rem; flex-wrap: wrap; padding: .85rem; }
  .cart-item-img { width: 65px; height: 80px; }
  .cart-item-info { min-width: calc(100% - 80px); }
  .cart-item-qty { margin-right: 0; }
  .cart-item-total { margin-right: 0; font-size: .9rem; min-width: auto; }
  .cart-item-del { margin-right: 0; }

  /* Checkout */
  .checkout-card { padding: 1.15rem; }
  .form-grid { grid-template-columns: 1fr; }

  /* Dashboard */
  .dash-banner { padding: 1.25rem; }
  .dash-sidebar { grid-template-columns: 1fr; }
  .dash-content { padding: 1rem; }
  .stats-row { grid-template-columns: 1fr; gap: .75rem; }
  .info-grid { grid-template-columns: 1fr; }

  /* CTA */
  .cta-box { padding: 2rem 1rem; border-radius: 22px; }
  .cta-title { font-size: 1.55rem; }
  .cta-btns { flex-direction: column; }
  .cta-btns .btn { width: 100%; }

  /* FAQ */
  .faq-hero { padding: 2.5rem 0; }
  .faq-page-title { font-size: 1.7rem; }
  .faq-side-card { grid-template-columns: 1fr; }
  .faq-item summary { padding: .9rem; font-size: .88rem; }
  .faq-answer { padding: 0 .9rem .9rem; font-size: .85rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer { padding: 2.5rem 0; }
}

/* ---------- Small Phones (320px-420px) ---------- */
@media (max-width: 420px) {
  .container { padding-inline: .75rem; }
  .logo-icon { width: 34px; height: 34px; }
  .logo-text { font-size: 1rem; }
  .header-actions { gap: .35rem; margin-left: .35rem; }
  .cart-btn, .burger { width: 36px; height: 36px; }
  .burger { width: 36px; height: 36px; padding: 0; }
  .burger span { width: 17px; }
  .burger.active span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .burger.active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  /* Mobile menu — very small phones: full-screen panel */
  .mobile-menu { width: 100vw; height: 100vh; }
  .mobile-menu-panel { padding: .9rem; overflow-x: hidden; }
  .mobile-menu-head { padding-bottom: .75rem; }
  .mobile-close { width: 36px; height: 36px; }
  .mobile-user-card { padding: .8rem; }
  .mobile-user-avatar { width: 38px; height: 38px; }
  .mobile-nav-link { min-height: 44px; padding: .65rem .75rem; font-size: .9rem; white-space: nowrap; }

  /* Hero */
  .hero { padding: 2rem 0 2.5rem; }
  .hero-title { font-size: 1.55rem; }
  .hero-desc { font-size: .85rem; }

  /* Sections */
  .section { padding: 2rem 0; }
  .section-title { font-size: 1.35rem; }
  .section-desc { font-size: .85rem; }

  /* Stats */
  .stats-grid { gap: .7rem; }
  .stat-num { font-size: 1.35rem; }
  .stat-lbl { font-size: .75rem; }

  /* Products */
  .products-grid { grid-template-columns: 1fr; }
  .product-card { border-radius: 16px; }
  .product-img-wrap { aspect-ratio: 5/6; }
  .product-body { padding: .8rem; }

  /* Auth */
  .auth-form-side { padding: 1.25rem .75rem; }
  .auth-form-box { max-width: 100%; }
  .auth-title { font-size: 1.45rem; }
  .auth-sub { font-size: .85rem; }
  .otp-code { font-size: 1.4rem; letter-spacing: .2rem; }
  .otp-code-box { padding-inline: .8rem; }
  .form-input { padding: .75rem .9rem; font-size: .92rem; }

  /* Dashboard */
  .dash-banner { padding: 1rem; }
  .dash-avatar { width: 48px; height: 48px; font-size: 1.25rem; }
  .dash-banner h1 { font-size: 1.35rem; }
  .page-title { font-size: 1.45rem; }

  /* CTA */
  .cta-title { font-size: 1.35rem; }

  /* FAQ */
  .faq-page-title { font-size: 1.45rem; }
  .faq-page-desc { font-size: .85rem; }
  .faq-kicker { font-size: .72rem; }

  /* Footer */
  .footer-bottom { font-size: .8rem; }
}
