/* ============================================================
   SHIV SHAKTI ENTERPRISES — RESPONSIVE STYLESHEET
   Mobile-First approach: sm(576) → md(768) → lg(992) → xl(1200)
   ============================================================ */

/* ── EXTRA LARGE (≥1400px) ─────────────────────────────────── */
@media (min-width: 1400px) {
  .container-xxl { max-width: 1360px; }
}

/* ── LARGE (992px – 1199px) ────────────────────────────────── */
@media (max-width: 1199px) {
  :root { --header-h: 68px; }

  .nav-link { padding: 13px 13px; font-size: 0.84rem; }

  .mega-dropdown {
    min-width: 560px;
    grid-template-columns: repeat(2, 1fr);
  }

  .features-bar-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-item:nth-child(2) { border-right: none; }
  .feature-item:nth-child(3) { border-top: 1px solid var(--border); }
  .feature-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }

  .slide-title { font-size: 2.6rem; }
}

/* ── MEDIUM (768px – 991px) ─────────────────────────────────── */
@media (max-width: 991px) {
  :root { --header-h: 64px; --topbar-h: 36px; }

  /* Header */
  .header-search { max-width: 280px; }
  .btn-login span { display: none; }

  /* Nav — collapse to drawer */
  .main-nav .nav-list,
  .main-nav .container > .nav-list { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero-slide-inner { min-height: 380px; padding: 40px 0; }
  .slide-title { font-size: 2rem; }
  .slide-desc { font-size: 0.9rem; }

  /* Features bar */
  .features-bar-inner { grid-template-columns: repeat(2, 1fr); }

  /* Products */
  .subcategory-layout {
    grid-template-columns: 1fr !important;
  }

  .sidebar-filter {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9998;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s ease;
  }

  .sidebar-filter.filter-open {
    transform: translateX(0);
  }

  .filter-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .filter-mobile-header h5 { margin: 0; color: #fff; font-family: var(--font-display); }
  .filter-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
  }

  .filter-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9997;
    display: none;
  }
  .filter-mobile-overlay.open { display: block; }

  .filter-mobile-trigger {
    display: flex !important;
  }

  /* Dashboard */
  .dashboard-sidebar {
    position: static;
  }

  /* Footer */
  .footer-brand { margin-bottom: 32px; }
}

/* ── SMALL (576px – 767px) ──────────────────────────────────── */
@media (max-width: 767px) {
  :root { --header-h: 60px; }

  /* Topbar */
  .topbar-links { display: none; }

  /* Header */
  .header-search { display: none; }
  .header-search.mobile-search-open {
    display: block;
    position: fixed;
    top: calc(var(--topbar-h) + var(--header-h));
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    max-width: 100%;
  }

  /* Hero */
  .hero-slide-inner { min-height: 300px; padding: 32px 0; }
  .slide-title { font-size: 1.6rem; }
  .slide-desc { display: none; }
  .slider-arrow { display: none; }

  /* Features */
  .features-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .feature-item { padding: 14px 16px; gap: 10px; }
  .feature-icon { width: 36px; height: 36px; font-size: 1rem; }
  .feature-text strong { font-size: 0.8rem; }
  .feature-text span { display: none; }

  /* Product grid — 2 per row MANDATORY */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .product-card-body { padding: 10px; }
  .product-name { font-size: 0.84rem; }
  .product-brand { display: none; }
  .product-stars { display: none; }
  .product-card-footer { padding: 8px 10px; }
  .btn-enquire-sm { font-size: 0.74rem; padding: 6px 8px; }
  .product-actions { display: none; }

  /* Category grid */
  .category-grid-section {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Product list view → force grid on mobile */
  .product-list-card {
    flex-direction: column;
  }
  .product-list-card .list-img { width: 100%; }
  .product-list-card .list-actions {
    flex-direction: row;
    min-width: auto;
  }

  /* Section padding */
  .section-pad { padding: 44px 0; }
  .section-pad-sm { padding: 28px 0; }
  .section-heading { font-size: 1.6rem; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; border-radius: var(--radius-sm); }
  .newsletter-form input { border-radius: var(--radius-sm); }
  .newsletter-form button { border-radius: var(--radius-sm); }

  /* Modal */
  .modal-box { border-radius: var(--radius-md); }
  .modal-body { padding: 20px; }

  /* Scroll top */
  .scroll-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }

  /* Dashboard */
  .dash-stat-card { padding: 14px; }
  .dash-stat-num { font-size: 1.3rem; }

  /* Order card */
  .order-header { flex-direction: column; align-items: flex-start; }

  /* Gallery thumbs */
  .gallery-thumb { width: 60px; height: 60px; }

  /* Page banner */
  .page-banner { padding: 32px 0; }

  /* Breadcrumb */
  .breadcrumb-item { font-size: 0.76rem; }
}

/* ── EXTRA SMALL (< 576px) ──────────────────────────────────── */
@media (max-width: 575px) {
  :root { --header-h: 56px; }

  .logo-text .brand-tag { display: none; }

  /* Hero */
  .hero-slide-inner { min-height: 260px; padding: 24px 0; }
  .slide-title { font-size: 1.35rem; }
  .slide-tag { font-size: 0.65rem; }

  /* Category grid → 2 per row on very small */
  .category-grid-section {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* 2 products per row always */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* Dashboard sidebar → hidden by default, toggle */
  .dash-sidebar-wrap {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.5);
  }
  .dash-sidebar-wrap.open { display: block; }
  .dashboard-sidebar { position: absolute; left: 0; top: 0; height: 100%; width: 280px; border-radius: 0; overflow-y: auto; }

  /* Product detail */
  .gallery-thumbs { gap: 7px; }
  .gallery-thumb { width: 52px; height: 52px; }
  .product-title-lg { font-size: 1.3rem; }

  /* Specs table */
  .specs-table td { padding: 8px 10px; font-size: 0.82rem; }
  .specs-table td:first-child { width: 40%; }

  /* otp inputs */
  .otp-inputs { gap: 7px; }
  .otp-input { width: 44px; height: 50px; font-size: 1.2rem; }

  /* Testimonial */
  .testimonial-card { padding: 20px 16px; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
  .footer-social { justify-content: center; }
}

/* ── PRINT ────────────────────────────────────────────────── */
@media print {
  .site-header, .main-nav, .topbar,
  .site-footer, .scroll-top,
  .modal-overlay, .mobile-nav-drawer { display: none !important; }

  body { background: #fff; }
  .product-card { break-inside: avoid; }
}

/* ── FILTER MOBILE TRIGGER ──────────────────────────────────── */
.filter-mobile-trigger { display: none; }
.filter-mobile-header  { display: none; }

/* ── PRODUCT GRID LAYOUT ────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1199px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 767px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ── SUBCATEGORY LAYOUT ─────────────────────────────────────── */
.subcategory-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 991px) {
  .subcategory-layout { grid-template-columns: 1fr; }
}

/* ── FOOTER GRID ────────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

@media (max-width: 991px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 575px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ── HERO FLEX ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .hero-slide .row { flex-direction: column; }
  .hero-img-col { display: none; }
}

/* ── GALLERY RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 767px) {
  .product-detail-layout {
    display: block !important;
  }
  .product-detail-layout > * + * { margin-top: 24px; }
}

/* ── NAV VISIBILITY ─────────────────────────────────────────── */
@media (min-width: 992px) {
  .nav-hamburger  { display: none !important; }
  .main-nav .nav-list { display: flex !important; }
}
