/* ==========================================================================
   GUJMART - Complete Responsive Layout & Media Queries
   ========================================================================== */

/* Global Overflow Protection */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Hide Mobile Menu Actions on Desktop (> 992px) */
@media (min-width: 993px) {
  .mobile-menu-actions {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   1. Large Laptops & Desktops (1200px and below)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .usp-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-title {
    font-size: 3rem;
  }
}

/* --------------------------------------------------------------------------
   2. Tablets & Small Laptops (992px and below)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Header & Navigation */
  .header-actions #btnLogin,
  .header-actions #btnGetStarted {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-slate);
    color: var(--text-main);
    font-size: 1.25rem;
    border: 1px solid var(--border-light);
    cursor: pointer;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    background: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 40px 24px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 1.05rem;
  }

  .mobile-menu-actions {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
  }

  /* Hero Section */
  .hero-section {
    padding-top: 160px !important;
    padding-bottom: 60px;
  }

  .hero-badge {
    margin-top: 15px;
    margin-bottom: 20px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .floating-card-1,
  .floating-card-2 {
    display: none !important;
  }

  /* Custom Domain Mapping Feature Section */
  .domain-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .domain-banner-card {
    padding: 36px 20px;
  }

  .domain-url-text.custom-url {
    font-size: 0.95rem;
  }

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

  .stat-card {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat-card:nth-child(3),
  .stat-card:nth-child(4) {
    border-bottom: none;
  }

  /* Categories & Themes Grids */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Admin Panel */
  .admin-showcase {
    padding: 24px 18px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
    gap: 24px;
  }

  .pricing-card.popular {
    transform: none;
  }

  /* USPs & Footer */
  .usp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* --------------------------------------------------------------------------
   3. Mobile Devices (768px and below)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  /* Hero Section */
  .hero-title {
    font-size: 2.4rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Horizontal Filter Pills for Themes */
  .theme-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 8px 18px;
  }

  /* Timeline Steps Mobile Positioning Fix */
  .timeline-container {
    padding-left: 10px;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-item, 
  .timeline-item:nth-child(even) {
    width: 100%;
    padding-left: 55px !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    justify-content: flex-start;
    position: relative;
    margin-bottom: 30px;
  }

  .timeline-node, 
  .timeline-item:nth-child(even) .timeline-node {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 14px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 0.9rem !important;
    z-index: 5;
  }

  .timeline-card {
    padding: 20px 18px !important;
    width: 100%;
  }

  .step-num {
    font-size: 0.78rem !important;
    margin-bottom: 6px;
  }

  .step-title {
    font-size: 1.1rem !important;
    margin-bottom: 8px;
    line-height: 1.3;
  }

  /* Admin Panel Mobile Overflow Fix */
  .admin-showcase {
    padding: 20px 14px !important;
  }

  .admin-preview-window {
    padding: 16px 12px !important;
    min-height: auto !important;
  }

  .admin-preview-window div[style*="display: flex; gap: 12px;"] {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Device Switcher Frame */
  .device-switcher {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .device-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .viewport-frame.desktop,
  .viewport-frame.tablet,
  .viewport-frame.mobile {
    max-width: 100%;
    padding: 10px;
  }

  /* Live Theme Demo Modal */
  .modal-container {
    width: 96%;
    height: 94vh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 12px 16px;
  }

  #modalThemeTitle {
    font-size: 0.95rem;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #modalDomainBadge {
    display: none;
  }

  .modal-header-cta {
    display: none !important;
  }

  .modal-footer-cta {
    display: block !important;
  }
}

/* --------------------------------------------------------------------------
   4. Small SmartPhones (576px and below)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .container {
    padding: 0 16px;
  }

  .hero-section {
    padding-top: 155px !important;
  }

  .hero-badge {
    margin-top: 12px;
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
  }

  .stat-card:last-child {
    border-bottom: none;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .categories-grid, 
  .themes-grid, 
  .usp-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .category-card {
    padding: 24px 18px;
  }

  .admin-nav {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 40px 18px;
  }

  .cta-box h2 {
    font-size: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
