/* =========================================================
   JAGAN STUDIO - MASTER MOBILE & RESPONSIVE STYLESHEET
   Supports all mobile viewports (320px to 1200px+)
   ========================================================= */

/* Base fluid fixes */
html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Tablets & Small Desktops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }

  .hero-grid {
    gap: 32px;
  }

  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .about-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  /* Header & Mobile Nav */
  .header {
    height: 64px;
    z-index: 10000;
  }

  .header-container {
    padding: 0 16px;
  }

  .logo-wrap img {
    height: 38px;
    max-width: 160px;
  }

  .mobile-toggle {
    display: flex;
    margin-left: 8px;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: -100%;
    width: min(300px, 82vw);
    height: calc(100vh - 64px);
    background-color: #0e0e13;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 18px;
    gap: 8px;
    border-right: 1px solid rgba(212, 167, 44, 0.25);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.95);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10005;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.open {
    left: 0;
  }

  .nav-link {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: #ffffff !important;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }

  .nav-link:hover, .nav-link.active {
    background: rgba(212, 167, 44, 0.15);
    color: var(--gold) !important;
    border-color: rgba(212, 167, 44, 0.3);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
  }

  .nav-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .phone-badge span {
    display: none;
  }

  .header-actions .phone-badge {
    padding: 8px;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions .phone-badge svg {
    margin-right: 0;
    width: 18px;
    height: 18px;
  }

  .whatsapp-btn {
    width: 38px;
    height: 38px;
    padding: 8px;
  }

  .whatsapp-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Home Hero */
  .home-hero {
    padding: 32px 0 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero-title {
    font-size: clamp(32px, 8vw, 42px);
    line-height: 1.15;
  }

  .hero-desc {
    font-size: 14px;
    margin: 0 auto 20px;
    max-width: 480px;
  }

  .hero-buttons {
    justify-content: center;
    gap: 12px;
  }

  .hero-image-wrap img {
    max-width: 320px;
    margin: 0 auto;
  }

  /* Feature Grid Row */
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .feature-item:last-child {
    grid-column: span 3;
  }

  .feature-icon-wrap {
    width: 48px;
    height: 48px;
  }

  .feature-title {
    font-size: 12px;
  }

  /* Page Hero Banners */
  .page-hero {
    height: 180px;
  }

  .page-hero-title {
    font-size: 28px;
  }

  .page-hero-breadcrumbs {
    font-size: 12px;
  }

  /* Horizontal Filter Bar */
  .filter-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 4px 16px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 24px;
  }

  .filter-container::-webkit-scrollbar {
    display: none;
  }

  .filter-btn, .product-filter-btn, .gallery-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Grids */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .product-card {
    padding: 14px;
  }

  .product-card-img {
    height: 160px;
    margin-bottom: 10px;
  }

  .product-card-title {
    font-size: 14px;
  }

  .product-card-price {
    font-size: 14px;
  }

  .product-card-desc {
    font-size: 11.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btn-order-now {
    padding: 8px 14px;
    font-size: 12px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery-item {
    height: 170px;
  }

  .gallery-overlay-text {
    font-size: 12px;
  }

  /* Services Section & Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 16px;
  }

  /* Story & About */
  .story-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .story-emblem-card {
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-info-wrap {
    padding-right: 0;
  }

  /* Modals */
  .modal-dialog {
    width: min(440px, 92vw);
    margin: 16px auto;
    padding: 20px;
    border-radius: 12px;
  }

  .lightbox-dialog {
    width: min(600px, 94vw);
    padding: 12px;
  }

  .lightbox-img {
    max-height: 65vh;
  }

  /* Footer */
  .footer {
    padding: 40px 0 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* Small Phones (<= 480px) */
@media (max-width: 480px) {
  .logo-wrap img {
    height: 34px;
    max-width: 140px;
  }

  .home-hero {
    padding: 24px 0 40px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 13.5px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .feature-item:last-child {
    grid-column: span 2;
  }

  .feature-item {
    padding: 12px 8px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card-img {
    height: 200px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    height: 220px;
  }

  .cards-grid-4 {
    grid-template-columns: 1fr;
  }

  .about-features-grid {
    grid-template-columns: 1fr;
  }

  .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-title {
    font-size: 23px;
  }

  .form-control, input, select, textarea {
    font-size: 16px !important;
  }

  .btn-form-submit {
    padding: 13px;
    font-size: 14px;
  }
}