/* =========================================================
   GREP-T — Comprehensive Responsive & Mobile Design System
   Loaded after style.css to ensure responsive perfection across
   all screen sizes (Desktop, Laptop, Tablet, Mobile).
   ========================================================= */

/* ---------- 1400px and below: Ultra Wide & Large Monitors ---------- */
@media (max-width: 1400px) {
  .container {
    max-width: 1180px;
  }

  .products-grid {
    gap: 22px;
  }

  .ingredients-grid {
    gap: 22px;
  }
}

/* ---------- 1200px and below: Desktop & Laptops ---------- */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
    padding: 0 20px;
  }

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

  .gallery-grid {
    columns: 3 240px;
    column-gap: 20px;
  }

  .ingredients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

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

  .value-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .creative-stats,
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .split,
  .experience,
  .alt-row {
    gap: 40px;
  }

  .pj-modal {
    max-width: 680px;
    padding: 34px;
    gap: 24px;
  }
}

/* ---------- 992px: Tablets Landscape & Small Laptops ---------- */
@media (max-width: 992px) {
  .container {
    max-width: 720px;
    padding: 0 20px;
  }

  /* Header & Navigation */
  .site-header {
    top: 4px;
    padding: 0 14px;
  }

  .nav-shell {
    padding: 8px 14px 8px 18px;
  }

  .nav-links {
    display: none !important;
  }

  .nav-toggle {
    display: flex !important;
  }

  .nav-cta .btn-outline {
    display: none !important;
  }

  .brand-logo {
    height: 44px;
  }

  .page-hero {
    padding: 110px 0 40px;
  }

  .page-hero h1 {
    font-size: clamp(28px, 4vw, 40px);
  }

  /* Two-column to Single-column splits */
  .split,
  .experience,
  .alt-row,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .split-media,
  .alt-row .alt-media {
    order: -1;
  }

  .alt-row.reverse .alt-text,
  .alt-row.reverse .alt-media {
    order: unset;
  }

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

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

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

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

  .creative-stats,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .gallery-grid {
    columns: 2 220px;
    column-gap: 18px;
  }

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

  /* Section Padding */
  .section-pad {
    padding: 72px 0;
  }

  /* Modals */
  .pj-modal {
    grid-template-columns: 1fr;
    max-width: 540px;
    padding: 30px 24px;
    gap: 20px;
    text-align: center;
  }

  .pj-modal-bottle {
    margin-bottom: 10px;
  }

  .pj-modal-bottle svg,
  .pj-modal-bottle img {
    height: 180px;
    width: auto;
  }

  .pj-modal-info .price {
    font-size: 20px;
  }

  /* Contact & Form */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form-wrap {
    padding: 30px 24px;
  }

  .map-frame {
    height: 380px;
    margin-top: 40px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
}

/* ---------- 768px: Tablets Portrait & Large Foldables ---------- */
@media (max-width: 768px) {
  .container {
    max-width: 540px;
    padding: 0 18px;
  }

  /* Typography scale */
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  .hero-stage {
    gap: 8px;
    margin-top: 32px;
  }

  .bottle-wrap svg {
    height: 140px;
  }

  .bottle-wrap.center svg {
    height: 175px;
  }

  /* Sections */
  .section-pad {
    padding: 56px 0;
  }

  .cta-band {
    padding: 44px 22px;
    border-radius: var(--radius-md);
  }

  .cta-band h2 {
    font-size: 24px;
  }

  /* Table styling: Convert table to card format for seamless vertical reading on mobile */
  .ing-table-wrapper {
    padding: 24px 16px;
    margin-top: 32px;
    border-radius: var(--radius-md);
  }

  .ing-table-title {
    font-size: 18px;
    margin-bottom: 18px;
  }

  .ing-table-scroll {
    overflow-x: visible;
  }

  .ing-table,
  .ing-table tbody,
  .ing-table tr,
  .ing-table td {
    display: block;
    width: 100%;
  }

  .ing-table thead {
    display: none;
  }

  .ing-table tbody tr {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(23, 131, 60, 0.05);
  }

  .ing-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .ing-table td {
    padding: 3px 0;
    border-bottom: none;
  }

  .ing-table td:nth-child(1) {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
  }

  .ing-table td:nth-child(2) {
    margin-bottom: 10px;
  }

  .ing-table td:nth-child(3) {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px dashed var(--border);
  }

  .badge-ayurveda {
    font-size: 12px;
    padding: 4px 10px;
  }

  /* Filter Bars */
  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 9px 18px;
    font-size: 13.5px;
  }

  .gallery-filters {
    width: 100%;
    max-width: 100%;
    border-radius: 30px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 6px 10px;
  }

  .gallery-filters .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Footer */
  .site-footer {
    padding: 56px 0 20px;
  }

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

  /* Lightbox */
  .lightbox-overlay {
    padding: 16px;
  }

  .lightbox-content {
    max-width: 100%;
  }

  .lightbox-overlay .g-media img {
    margin-top: 0 !important;
    max-height: 70vh;
  }

  .lb-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.6);
  }

  .lb-prev {
    left: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
  }

  .lb-next {
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
  }
}

/* ---------- 576px: Large Mobile Phones ---------- */
@media (max-width: 576px) {
  .container {
    padding: 0 16px;
  }

  /* Header & Navigation Panel */
  .site-header {
    top: 4px;
    padding: 0 10px;
  }

  .nav-shell {
    padding: 6px 10px 6px 14px;
    border-radius: var(--radius-pill);
  }

  .brand-logo {
    height: 38px;
  }

  .mobile-panel-inner {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .mobile-panel-head .brand-logo {
    height: 38px;
  }

  .mobile-links a {
    font-size: 16px;
    padding: 12px 6px;
  }

  /* Page Hero */
  .page-hero {
    padding: 92px 0 28px;
  }

  .page-hero h1 {
    font-size: 26px;
    margin-bottom: 8px;
  }

  .page-hero p {
    font-size: 14.5px;
  }

  .eyebrow {
    font-size: 11.5px;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
  }

  /* Products Grid */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    padding: 16px 10px 14px;
  }

  .product-card .price-badge {
    top: 10px;
    right: 10px;
    padding: 4px 10px;
  }

  .product-card .price-badge span {
    font-size: 10px;
  }

  .product-card .bottle-stage {
    height: 135px;
    margin-bottom: 8px;
  }

  .product-card .bottle-stage svg,
  .product-card .bottle-stage img {
    height: 120px;
  }

  .product-card h3 {
    font-size: 14.5px;
    margin-bottom: 2px;
  }

  .product-card .tag {
    font-size: 11.5px;
    margin-bottom: 10px;
  }

  .product-card .btn {
    opacity: 1;
    transform: none;
    font-size: 12.5px;
    padding: 8px 12px;
  }

  /* Ingredients & Values */
  .ingredients-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ing-card {
    padding: 20px 16px;
  }

  .ing-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }

  .ing-card h4 {
    font-size: 16px;
  }

  .ing-strip {
    margin-top: 28px;
    padding-top: 18px;
    gap: 6px 14px;
  }

  .ing-strip span {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .value-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .value-card {
    padding: 22px 18px;
  }

  .value-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
  }

  .icon-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .icon-card {
    padding: 22px 18px;
  }

  /* Creative Stats */
  .creative-stats,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .stat-card {
    padding: 28px 18px;
  }

  .stat-card .stat-content .num {
    font-size: 38px;
  }

  .stat-card .stat-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }

  .stat-card .stat-icon svg {
    width: 26px;
    height: 26px;
  }

  /* Video Grid */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .video-card-body {
    padding: 18px 16px;
  }

  .video-card-body h4 {
    font-size: 16px;
  }

  /* Gallery Grid */
  .gallery-grid {
    columns: 2 130px;
    column-gap: 10px;
  }

  .gallery-item {
    margin-bottom: 10px;
    border-radius: 12px;
  }

  .gallery-item .g-overlay {
    padding: 12px;
  }

  .g-overlay .g-cat {
    font-size: 9.5px;
    padding: 3px 8px;
  }

  .g-overlay .g-caption {
    font-size: 0.85rem;
  }

  .g-overlay .g-zoom {
    width: 34px;
    height: 34px;
  }

  .g-overlay .g-zoom svg {
    width: 16px;
    height: 16px;
  }

  /* Contact Page */
  .contact-card {
    padding: 16px;
    gap: 12px;
  }

  .contact-card .c-icon {
    width: 40px;
    height: 40px;
  }

  .contact-card .c-icon svg {
    width: 18px;
    height: 18px;
  }

  .contact-card h4 {
    font-size: 14.5px;
  }

  .contact-card p {
    font-size: 13.5px;
  }

  .contact-form-wrap {
    padding: 20px 16px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group textarea {
    padding: 12px 14px;
    font-size: 14px;
  }

  .map-frame {
    height: 320px;
    margin-top: 30px;
    border-radius: var(--radius-md);
  }

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

  .site-footer .brand-logo {
    height: 60px;
  }

  .site-footer {
    padding: 44px 0 20px;
  }

  /* Floating Action Buttons */
  .floating-btns {
    right: 14px;
    bottom: 14px;
    gap: 10px;
  }

  .fab {
    width: 46px;
    height: 46px;
  }

  .fab svg {
    width: 20px;
    height: 20px;
  }
}

/* ---------- 480px and below: Mobile Phones ---------- */
@media (max-width: 480px) {

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

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

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

  /* Products Grid Switch to Single Column on smaller phones */
  @media (max-width: 420px) {
    .products-grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }

    .product-card {
      padding: 22px 16px 18px;
    }

    .product-card .bottle-stage {
      height: 160px;
    }

    .product-card .bottle-stage svg,
    .product-card .bottle-stage img {
      height: 145px;
    }

    .product-card h3 {
      font-size: 17px;
    }

    .product-card .tag {
      font-size: 13px;
    }

    .product-card .btn {
      font-size: 14px;
      padding: 11px 20px;
    }

    .gallery-grid {
      columns: 1;
    }
  }

  /* Modals on Small Mobile */
  .pj-modal-overlay {
    padding: 12px;
  }

  .pj-modal {
    padding: 22px 14px;
    border-radius: var(--radius-md);
    max-height: 92vh;
  }

  .pj-modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
  }

  .pj-modal-info h3 {
    font-size: 20px;
  }

  .pj-modal-info .price {
    font-size: 18px;
  }
}

/* ---------- 360px and below: Extra Small Mobile ---------- */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }

  .brand-logo {
    height: 34px;
  }

  .site-header {
    padding: 0 6px;
  }

  .nav-shell {
    padding: 5px 8px 5px 12px;
  }

  .stat-card .stat-content .num {
    font-size: 32px;
  }

  .cta-band h2 {
    font-size: 20px;
  }

  .cta-band {
    padding: 32px 14px;
  }

}

/* Responsive adjustments for Impressive Malayalam Section */
@media (max-width: 992px) {
  .ml-flow-cards {
    gap: 14px;
  }

  .ml-flow-card {
    padding: 16px 18px;
  }

  .ml-card-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .ml-philosophy-section {
    padding: 28px 0;
  }

  .ml-flow-cards {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .ml-flow-card {
    max-width: 100%;
  }

  .ml-flow-connector {
    align-self: center;
    transform: rotate(90deg);
  }

  .ml-flow-cards:hover .ml-flow-connector {
    transform: rotate(90deg) scale(1.1);
  }
}

@media (max-width: 480px) {
  .ml-card-title {
    font-size: 1.05rem;
  }

  .ml-flow-card {
    padding: 14px 16px;
  }
}