/* ============================================================
   products.css  –  Products page for NutriconBio Life
   ============================================================ */

/* ── PAGE HERO ──────────────────────────────────────────── */
.products-hero {
  background: linear-gradient(135deg, #0D2B55 0%, #1a3f75 55%, #1E7A5A 100%);
  padding: 80px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.products-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.products-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.products-hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.products-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #a8d8c8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 50px;
  margin-bottom: 22px;
}
.products-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.products-hero h1 span { color: #4ecda4; }
.products-hero p { font-size: 16px; color: #b8d8f0; line-height: 1.7; }

/* Breadcrumb */
.breadcrumb {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 24px; font-size: 13px; color: #5a7a9a;
  display: flex; align-items: center; gap: 8px;
}
.breadcrumb a { color: #2E5FA3; font-weight: 500; transition: color .2s; }
.breadcrumb a:hover { color: #1E7A5A; }
.breadcrumb .sep { color: #9ca3af; }

/* ── MAIN WRAP ───────────────────────────────────────────── */
.products-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* ── CATEGORY FILTER BAR ────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  padding: 24px 28px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(14,43,85,0.08);
  border: 1px solid #e0eaf5;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 50px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: #2E5FA3;
  color: #2E5FA3;
  background: #eef3fb;
  transform: translateY(-2px);
}
.filter-btn.active {
  background: linear-gradient(135deg, #2E5FA3, #1E7A5A);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(46,95,163,0.3);
}
.filter-btn .count-badge {
  background: rgba(255,255,255,0.25);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.filter-btn:not(.active) .count-badge {
  background: #e5e7eb;
  color: #6b7280;
}

/* Results info */
.results-info {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 28px;
}
.results-info strong { color: #0D2B55; }

/* ── PRODUCT GRID ───────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Product card */
.product-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 3px 16px rgba(14,43,85,0.07);
  transition: border-color 0.28s, transform 0.28s, box-shadow 0.28s, opacity 0.35s;
  display: flex;
  flex-direction: column;
  cursor: default;
}
.product-card:hover {
  border-color: #2E5FA3;
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(46,95,163,0.15);
}
.product-card.hidden {
  display: none;
}
.product-card.fade-in {
  animation: cardFadeIn 0.4s ease forwards;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card image */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 250px;
  background: linear-gradient(135deg, #e8f0fc, #d4ede6);
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  display: block;
}
.product-card:hover .card-img-wrap img {
  transform: scale(1.07);
}
.card-category-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(13,43,85,0.82);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Card body */
.card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-name {
  font-size: 16px;
  font-weight: 800;
  color: #0D2B55;
  margin-bottom: 10px;
  line-height: 1.3;
}
.card-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f0f4f8;
}
.card-cat-label {
  font-size: 11px;
  font-weight: 600;
  color: #1E7A5A;
  letter-spacing: 0.5px;
}
.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #2E5FA3, #1E7A5A);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(46,95,163,0.28);
  font-family: 'Inter', sans-serif;
}
.btn-read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(46,95,163,0.38);
}

/* No results */
.no-results {
  display: none;
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.no-results .no-icon { font-size: 52px; margin-bottom: 14px; }
.no-results h3 { font-size: 18px; font-weight: 700; color: #0D2B55; margin-bottom: 8px; }
.no-results p  { font-size: 14px; color: #6b7280; }

/* ── MODAL OVERLAY ──────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,43,85,0.65);
  backdrop-filter: blur(6px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.25s ease;
}
.modal-overlay.open { display: flex; }
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(13,43,85,0.3);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Modal header */
.modal-header {
  background: linear-gradient(135deg, #0D2B55, #1a3f75);
  padding: 28px 36px;
  position: relative;
  flex-shrink: 0;
}
.modal-header-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #a8d8c8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  padding-right: 40px;
}
.modal-close {
  position: absolute;
  top: 22px; right: 24px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  line-height: 1;
}
.modal-close:hover { background: rgba(255,255,255,0.28); transform: rotate(90deg); }

/* Modal image strip */
.modal-img-strip {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* Modal body */
.modal-body {
  padding: 28px 36px 36px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  color: #374151;
  line-height: 1.8;
}
.modal-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0D2B55;
  margin: 20px 0 8px;
  padding-left: 12px;
  border-left: 3px solid #2E5FA3;
}
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 10px; }
.modal-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-body ul li {
  padding-left: 20px;
  position: relative;
  color: #4b5563;
}
.modal-body ul li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #1E7A5A;
  font-size: 12px;
  top: 2px;
}
.modal-body strong { color: #0D2B55; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  {
  .products-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 16px; gap: 8px; }
  .filter-btn { font-size: 12px; padding: 8px 14px; }
  .modal-header { padding: 22px 22px 22px 22px; }
  .modal-body { padding: 20px 22px 28px; }
}
