/* ==========================================================================
   GARG PHARMACEUTICALS - DEDICATED PRODUCTS CATALOG STYLING
   ========================================================================== */

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

:root {
  --prod-primary: #0284c7;
  --prod-primary-dark: #0369a1;
  --prod-primary-light: #e0f2fe;
  --prod-salt: #16a34a;
  --prod-salt-light: #f0fdf4;
  --prod-cat: #7c3aed;
  --prod-cat-light: #faf5ff;
}

.products-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0369a1 100%);
  color: #ffffff;
  padding: 50px 0 45px;
  position: relative;
  overflow: hidden;
}

.products-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
}

.products-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.prod-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.products-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 12px;
}

.products-hero-title span {
  color: #38bdf8;
  background: linear-gradient(135deg, #38bdf8, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.products-hero-sub {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 28px;
}

/* Hero Search Box */
.catalog-search-bar {
  background: #ffffff;
  border-radius: 18px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35);
  max-width: 760px;
  margin: 0 auto 20px;
}

.catalog-search-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  flex-shrink: 0;
  font-size: 1.3rem;
}

.catalog-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.02rem;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
  padding: 10px 4px;
  font-family: inherit;
}

.catalog-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.btn-catalog-search {
  padding: 12px 26px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-catalog-search:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  transform: translateY(-1px);
}

.catalog-stats-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #94a3b8;
}

.catalog-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-stat-item strong {
  color: #ffffff;
}

/* ==========================================================================
   VIEW SWITCHER & FILTER CONTROLS
   ========================================================================== */
.catalog-controls-section {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.catalog-controls-section .container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.view-tabs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
}

.view-tabs-bar::-webkit-scrollbar {
  display: none;
}

.view-tab {
  padding: 9px 18px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.view-tab:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.view-tab.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.view-tab-count {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
}

.view-tab:not(.active) .view-tab-count {
  background: #e2e8f0;
  color: #475569;
}

/* Filter Chips Bar */
.filter-chips-container {
  padding: 12px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
}

.filter-chips-container::-webkit-scrollbar {
  display: none;
}

.chip-filter-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.chip-filter-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
}

.chip-filter-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   PRODUCTS CATALOG GRID
   ========================================================================== */
.catalog-content-section {
  padding: 36px 0 70px;
  background: #f8fafc;
  min-height: 600px;
}

.catalog-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.catalog-results-count {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.catalog-active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0284c7;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.products-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

/* Product Card */
.prod-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid #e2e8f0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.prod-card:hover {
  transform: translateY(-6px);
  border-color: #0284c7;
  box-shadow: 0 18px 36px -10px rgba(2, 132, 199, 0.16);
}

.prod-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.prod-company-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.prod-stock-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.prod-stock-pill.in-stock {
  background: #dcfce7;
  color: #15803d;
}

.prod-stock-pill.on-order {
  background: #f1f5f9;
  color: #64748b;
}

.prod-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.prod-salt-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.prod-salt-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #15803d;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}

.prod-salt-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #166534;
  line-height: 1.35;
}

.prod-details-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
}

.prod-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prod-category-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #f3e8ff;
}

.prod-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.prod-rate-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.prod-rate-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #15803d;
}

.prod-mrp-val {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 6px;
}

.prod-title-link {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.prod-title-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Actions in Card */
.prod-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prod-open-tab-btn {
  grid-column: 1 / -1;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.prod-open-tab-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-card-wa {
  padding: 10px;
  border-radius: 10px;
  background: #25d366;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-card-wa:hover {
  background: #1eb956;
  color: #ffffff;
}

.btn-card-order {
  padding: 10px;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-card-order:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Empty State */
.catalog-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 20px;
  border: 1.5px dashed #cbd5e1;
}

.catalog-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .main-header {
    height: 64px !important;
  }
  .header-inner {
    height: 64px !important;
  }
  .brand-icon {
    width: 38px !important;
    height: 38px !important;
  }
  .brand-icon svg {
    width: 22px !important;
    height: 22px !important;
  }
  .brand-text h1 {
    font-size: 1.15rem !important;
  }
  .brand-tagline {
    display: none !important;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions .btn-chemist-login {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
  }
  .btn-mobile-toggle {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    padding: 0;
  }
  .products-hero {
    padding: 28px 0 24px;
  }
  .products-hero-title {
    font-size: 1.55rem;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .products-hero-sub {
    font-size: 0.88rem;
    margin-bottom: 16px;
    padding: 0 4px;
  }
  .catalog-search-bar {
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    border-radius: 14px;
    margin-bottom: 14px;
    max-width: 100%;
  }
  .catalog-search-icon {
    display: none;
  }
  .catalog-search-input {
    width: 100%;
    min-width: 0;
    font-size: 0.92rem;
    padding: 8px 10px;
    text-align: left;
  }
  .btn-catalog-search {
    width: 100%;
    padding: 10px;
    font-size: 0.88rem;
    border-radius: 10px;
  }
  .catalog-stats-row {
    gap: 8px 12px;
    font-size: 0.76rem;
  }
  .catalog-controls-section {
    top: 64px;
  }
  .view-tabs-bar {
    padding: 10px 0;
    gap: 6px;
  }
  .view-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 9px;
  }
  .filter-chips-container {
    padding: 8px 0 12px;
    gap: 6px;
  }
  .chip-filter-btn {
    padding: 5px 11px;
    font-size: 0.78rem;
  }
  .catalog-content-section {
    padding: 20px 0 50px;
  }
  .catalog-results-count {
    font-size: 1rem;
  }
  .products-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .prod-card {
    padding: 16px;
    border-radius: 14px;
  }
  .prod-title {
    font-size: 1.05rem;
  }
  .prod-salt-box {
    padding: 6px 10px;
    margin-bottom: 10px;
  }
  .prod-salt-text {
    font-size: 0.82rem;
  }
  .prod-rate-val {
    font-size: 1.25rem;
  }
  .prod-actions-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .btn-card-wa, .btn-card-order {
    padding: 9px 8px;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px !important;
  }
  .products-hero-title {
    font-size: 1.35rem;
  }
  .prod-card-top {
    flex-wrap: wrap;
    gap: 6px;
  }
  .prod-company-pill {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .prod-stock-pill {
    font-size: 0.68rem;
  }
  .footer-top-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

/* Modal Styling for Products Page */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(11, 21, 40, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header-custom {
  background: #0f172a;
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header-custom h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin: 0;
}
.btn-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.btn-modal-close:hover {
  color: #ffffff;
}
.modal-body-custom {
  padding: 24px;
}
.form-group-custom {
  margin-bottom: 16px;
}
.form-label-custom {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.form-control-custom {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}
.form-control-custom:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.modal-footer-custom {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
}
