/* ==========================================================================
   AVIVET ANIMAL HEALTH - ADVANCED INTERACTIVE SUITE
   Advanced Features: Smart Calculator, Diagnosis Advisor, Search Drawer,
   Virtual Assistant, Light/Dark Modes & Micro-Interactions
   ========================================================================== */

/* Ambient Particle & Glow Container */
.ambient-canvas-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-drift 18s ease-in-out infinite alternate;
}

[data-theme="dark"] .ambient-orb {
  opacity: 0.25;
}

.ambient-orb-1 {
  top: 5%;
  left: 10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
}

.ambient-orb-2 {
  top: 45%;
  right: 5%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, transparent 70%);
  animation-delay: -6s;
}

.ambient-orb-3 {
  bottom: 10%;
  left: 20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  animation-delay: -12s;
}

@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* ==========================================================================
   Smart Global Search Panel & Voice Search
   ========================================================================== */
.search-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 20, 15, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-base);
}

.search-panel-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.search-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: min(500px, 100vw);
  height: 100vh;
  background: var(--bg-surface);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border-color);
}

.search-panel.active {
  right: 0;
}

.search-panel-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-panel-header h3 {
  font-size: 1.3rem;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-panel-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.search-panel-close:hover {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.search-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-input-wrapper input {
  width: 100%;
  padding: 15px 50px 15px 46px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  transition: all var(--trans-fast);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.search-icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.voice-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--emerald-soft);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.voice-search-btn:hover, .voice-search-btn.listening {
  background: var(--emerald);
  color: #ffffff;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.search-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.search-filter-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

[data-theme="dark"] .search-filter-pill.active {
  background: var(--emerald);
  color: var(--primary-dark);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.search-result-item:hover {
  border-color: var(--emerald);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.search-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.search-result-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-info strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-info span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Smart Animal Health & Feed Dosage Calculator
   ========================================================================== */
.calculator-section {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.calc-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.calc-header {
  background: var(--grad-dark);
  color: #ffffff;
  padding: 30px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.calc-header h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0;
}

.calc-species-nav {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.calc-species-btn {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calc-species-btn.active {
  background: var(--emerald);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.calc-body-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  padding: 36px;
  gap: 36px;
}

.calc-input-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  justify-content: space-between;
}

.calc-group label span.calc-label-val {
  color: var(--emerald);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}

.calc-range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-color);
  outline: none;
  accent-color: var(--emerald);
  cursor: pointer;
}

.calc-output-panel {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.calc-result-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-metric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.calc-metric-box strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

[data-theme="dark"] .calc-metric-box strong {
  color: var(--emerald-light);
}

.calc-metric-box span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-recom-card {
  background: var(--bg-card);
  border: 1.5px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.calc-recom-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.calc-recom-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.calc-recom-info strong {
  display: block;
  font-size: 1rem;
  color: var(--text-heading);
}

.calc-recom-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* ==========================================================================
   Visual Farm Symptom & Solution Finder (Diagnosis Advisor)
   ========================================================================== */
.symptom-section {
  padding: 85px 0;
  background: var(--bg-surface);
}

.symptom-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.symptom-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  transition: all var(--trans-base);
  box-shadow: var(--shadow-sm);
}

.symptom-btn:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.symptom-btn.active {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  box-shadow: 0 4px 16px var(--emerald-glow);
}

[data-theme="dark"] .symptom-btn.active {
  background: var(--bg-subtle);
}

.symptom-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.symptom-btn strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-heading);
}

.symptom-btn span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.matched-solution-card {
  background: var(--grad-dark);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: modal-fade 0.3s ease;
}

.matched-solution-image {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.matched-solution-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.matched-solution-content h3 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.matched-solution-content .match-tagline {
  color: var(--emerald-light);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.matched-solution-content p.match-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.matched-meta-strip {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.matched-meta-item strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-gold-light);
}

.matched-meta-item span {
  font-size: 0.92rem;
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   Full Product Specification Modal
   ========================================================================== */
.spec-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 20, 15, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spec-modal-overlay.active {
  display: flex;
  animation: modal-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.spec-modal {
  position: relative;
  width: min(880px, 95vw);
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.spec-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  transition: all var(--trans-fast);
}

.spec-modal-close:hover {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.spec-modal-scroll-body {
  overflow-y: auto;
  padding: 36px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
}

.spec-img-stage {
  background: var(--bg-subtle-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 360px;
}

.spec-img-stage img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.spec-content-body h2 {
  font-size: 2rem;
  margin-bottom: 6px;
  color: var(--text-heading);
}

.spec-tagline {
  color: var(--emerald);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.spec-section-block {
  margin-bottom: 20px;
}

.spec-section-block h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.spec-composition-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.spec-indications-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.spec-tag {
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

[data-theme="dark"] .spec-tag {
  background: var(--bg-subtle);
  color: var(--emerald-light);
}

/* ==========================================================================
   Virtual AI Vet Assistant & Floating WhatsApp Widget
   ========================================================================== */
.chat-widget-fab {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 1500;
  display: flex;
  align-items: center;
}

.chat-fab-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px var(--emerald-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-base);
  position: relative;
}

.chat-fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px var(--emerald-glow);
}

.chat-fab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
}

.chat-window-dialog {
  position: fixed;
  right: 24px;
  bottom: 154px;
  width: min(380px, calc(100vw - 32px));
  height: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 1501;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-window-dialog.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-dialog-header {
  background: var(--grad-dark);
  color: #ffffff;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.chat-dialog-header h4 {
  color: #ffffff;
  font-size: 1rem;
  margin: 0;
}

.chat-dialog-header span.status-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--emerald-light);
}

.status-online::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-light);
}

.chat-dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-subtle-2);
}

.chat-msg {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 84%;
}

.chat-msg.bot {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.chat-msg.user {
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.chat-quick-actions {
  padding: 10px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.chat-quick-actions::-webkit-scrollbar {
  display: none;
}

.chat-quick-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.chat-quick-pill:hover {
  background: var(--emerald-soft);
  color: var(--primary);
  border-color: var(--emerald);
}

.chat-dialog-input {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.chat-dialog-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.9rem;
}

.chat-dialog-input input:focus {
  outline: none;
  border-color: var(--emerald);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--grad-emerald);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--trans-fast);
}

.chat-send-btn:hover {
  transform: scale(1.06);
}

.chat-whatsapp-banner {
  padding: 10px 16px;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.chat-whatsapp-banner a {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   Scroll Reveal & Animation Utilities
   ========================================================================== */
.reveal-init {
  opacity: 1;
  transform: none;
}

.reveal-init.revealed {
  opacity: 1;
  transform: none;
}

/* 3D Tilt Card Class */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

/* ==========================================================================
   Responsive Rules for Advanced Interactive Suite
   ========================================================================== */
@media (max-width: 860px) {
  /* Dosage Calculator Mobile */
  .calc-container {
    margin-top: 16px;
    border-radius: var(--radius-md);
  }

  .calc-header {
    padding: 18px 20px;
  }

  .calc-header h3 {
    font-size: 1.25rem;
  }

  .calc-body-grid {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 24px;
  }

  .calc-species-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .calc-species-btn {
    padding: 10px 12px;
    font-size: 0.82rem;
    justify-content: center;
    text-align: center;
  }

  .calc-output-card {
    padding: 20px;
  }

  .calc-metrics-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .calc-metric-box {
    padding: 12px;
  }

  .calc-metric-box strong {
    font-size: 1.35rem;
  }

  /* Farm Diagnosis Advisor Mobile */
  .symptom-tag-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .symptom-btn {
    padding: 14px 12px;
  }

  .symptom-btn-title {
    font-size: 0.85rem;
  }

  .symptom-btn-desc {
    font-size: 0.72rem;
  }

  .matched-solution-card {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }

  .matched-solution-image {
    max-width: 220px;
    margin-inline: auto;
  }

  .matched-meta-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Search Drawer Mobile */
  .search-panel {
    width: 100%;
    max-width: 100vw;
  }

  .search-panel-header {
    padding: 18px 20px;
  }

  .search-panel-body {
    padding: 18px 20px;
  }

  .search-filter-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }

  .search-filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Product Spec Modal Mobile */
  .spec-modal {
    width: 95%;
    max-height: 88vh;
    border-radius: var(--radius-md);
  }

  .spec-modal-scroll-body {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    gap: 20px;
  }

  .spec-img-stage {
    max-width: 200px;
    margin-inline: auto;
  }

  /* Segment Switcher on Hero */
  .segment-tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 6px;
    margin-bottom: 20px;
  }

  .segment-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 0.82rem;
  }
}

@media (max-width: 600px) {
  .symptom-tag-grid {
    grid-template-columns: 1fr;
  }

  .calc-metrics-row {
    grid-template-columns: 1fr;
  }

  /* Virtual AI Chat Mobile Bottom Sheet */
  .chat-widget-fab {
    bottom: 16px;
    right: 16px;
  }

  .chat-fab-btn {
    width: 52px;
    height: 52px;
  }

  .chat-window-dialog {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100vw;
    height: 85vh;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  }

  .chat-quick-actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding: 10px 14px;
  }

  .chat-quick-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

