/* ==========================================================================
   ORCHEM PHARMA - RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 992px) {
  .ticker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .about-overview-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nav-menu, .nav-actions .btn-primary {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .why-us-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quality-grid {
    grid-template-columns: 1fr;
  }
  
  .product-detail-layout {
    grid-template-columns: 1fr;
  }
  
  .product-detail-visual {
    position: static;
  }
  
  .contact-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .products-showcase-grid {
    grid-template-columns: 1fr;
  }

  .why-us-grid {
    grid-template-columns: 1fr;
  }

  .industries-grid {
    grid-template-columns: 1fr;
  }

  .about-feature-boxes {
    grid-template-columns: 1fr;
  }

  .application-cards-grid {
    grid-template-columns: 1fr;
  }

  .quality-pillars {
    grid-template-columns: 1fr;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

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

  .specs-table-wrapper {
    overflow-x: auto;
  }

  .specs-table {
    min-width: 540px;
  }

  .hero-meta-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .floating-actions-dock {
    bottom: 16px;
    right: 16px;
  }
  
  .floating-wa-btn span {
    display: none;
  }
  
  .floating-wa-btn {
    padding: 12px;
    border-radius: 50%;
  }
}

@media (max-width: 480px) {
  .hero-products-duo {
    grid-template-columns: 1fr;
  }
  
  .ticker-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-header, .modal-body {
    padding: 20px;
  }
  
  .btn-lg {
    width: 100%;
  }
  
  .hero-ctas .btn {
    width: 100%;
  }
}

/* Tablet widths have room for two columns; reserve single-column layouts for phones. */
@media (min-width: 521px) and (max-width: 768px) {
  .products-showcase-grid,
  .why-us-grid,
  .industries-grid,
  .about-feature-boxes,
  .application-cards-grid,
  .quality-pillars,
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* Mobile spec cards must override the legacy 540px table width above. */
@media (max-width: 640px) {
  .specs-table-wrapper {
    width: 100%;
    overflow: hidden;
    background: #E9EEFC;
  }

  .specs-table-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    width: 100%;
    min-width: 0;
    background: #E9EEFC;
  }

  .specs-table-header h4,
  .specs-table-header .preview-tag {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .specs-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .specs-table thead { display: none; }
  .specs-table tbody { display: grid; width: 100%; min-width: 0; gap: 12px; padding: 12px; }
  .specs-table tr {
    display: grid;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }
  .specs-table td {
    display: grid;
    grid-template-columns: minmax(6.5rem, .42fr) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 12px;
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--slate-100);
  }
  .specs-table td::before {
    color: var(--brand-primary);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.5;
  }
  .specs-table td:nth-child(1)::before { content: "Parameter"; }
  .specs-table td:nth-child(2)::before { content: "Details"; }
  .specs-table td:nth-child(3)::before { content: "Standard"; }
  .specs-table tr:last-child td:last-child { border-bottom: 0; }
}
/* Give product specifications and floating contact action room on phones. */
@media (max-width: 640px) {
  .product-spec-highlights { padding: 14px 16px; }
  .product-spec-highlights .spec-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: start;
    align-items: start;
    gap: 3px;
    padding: 10px 0;
    line-height: 1.45;
  }
  .product-spec-highlights .spec-label,
  .product-spec-highlights .spec-value {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
  }
  .product-spec-highlights .spec-label { font-size: .75rem; }
  .product-spec-highlights .spec-value {
    font-family: var(--font-body);
    font-size: .875rem;
  }
  .floating-wa-btn svg { width: 32px; height: 32px; }
}

@media (max-width: 480px) {
  .product-card-body { padding: 24px 18px !important; }
}
@media (max-width: 480px) {
  .b2b-enquiry-form .btn-wa-lead-trigger {
    flex: 1 1 100%;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    font-size: 1rem;
    justify-content: center;
  }
}
@media (max-width: 640px) {
  .floating-wa-btn svg { transform: scale(1.35); }
}