/* ==========================================================================
   Ranaux Healthcare — Page-specific styles
   ========================================================================== */

/* ---- Hero (Home) ---- */
.hero {
  padding-block: var(--space-2xl) var(--space-2xl);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, var(--color-primary-light) 0%, transparent 45%),
    var(--color-bg);
}

/* Decorative Unsplash photo (assets/images/hero-bg.jpg) as the hero backdrop:
   just the photo, blurred and partially transparent, sitting directly over
   .hero's own base background (no separate covering gradient layer). Scaled
   up so the blur radius never reveals a hard edge. */
.hero-bg-photo {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  filter: blur(60px) saturate(0.9);
  transform: scale(1.25);
  opacity: 0.6;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.hero-copy h1 {
  margin-bottom: var(--space-sm);
}

.hero-copy .lede {
  font-size: var(--fs-md);
  max-width: 540px;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero-microtrust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

.hero-microtrust li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-microtrust svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Placeholder hero visual — swap the <svg> in index.html for real facility/product
   photography once available. Kept as illustration so nothing looks like stock cliché. */
.hero-visual {
  position: relative;
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

/* ---- Why Ranaux cards ---- */
.why-grid .card {
  height: 100%;
}

/* ---- Category teaser grid ---- */
.category-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  text-align: left;
  background: var(--color-surface);
}

.category-card .card-icon {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

/* ---- Partner / certification strip ---- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 768px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

.partner-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-xl);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

@media (max-width: 900px) {
  .partner-panel {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
  }
}

/* ==========================================================================
   Products page
   ========================================================================== */

.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

.search-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  background: var(--color-surface-alt);
}

.search-field input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Below ~640px, keep the filter row compact: scroll horizontally instead of
   wrapping to several rows, which otherwise ate a large share of the mobile
   viewport since the toolbar is sticky. */
@media (max-width: 640px) {
  .products-toolbar {
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: stretch;
  }

  .search-field {
    flex: none;
    width: 100%;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
    margin: 0 calc(var(--space-md) * -1);
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .filter-chip {
    flex-shrink: 0;
  }
}

.filter-chip {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border-strong);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.filter-chip[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.products-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-card-media {
  margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-surface-alt);
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition-slow);
}

.card:hover .product-card-media img {
  transform: scale(1.04);
}

.product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xs);
}

.product-card h3 {
  font-size: var(--fs-md);
}

.product-card p {
  font-size: var(--fs-sm);
}

.product-card .product-card-composition {
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
}

.product-card p:last-of-type {
  flex-grow: 1;
}

.product-card .btn {
  align-self: flex-start;
  margin-top: var(--space-2xs);
}

.products-empty {
  display: none;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--color-text-muted);
}

.products-empty.is-visible {
  display: block;
}

.products-empty svg {
  width: 48px;
  height: 48px;
  color: var(--color-border-strong);
  margin: 0 auto var(--space-sm);
}

/* ==========================================================================
   Quality page
   ========================================================================== */

.quality-panel {
  display: flex;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

@media (max-width: 640px) {
  .quality-panel {
    flex-direction: column;
  }
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.step-item {
  display: flex;
  gap: var(--space-sm);
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ==========================================================================
   Supply chain page
   ========================================================================== */

.region-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 900px) {
  .region-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .region-grid {
    grid-template-columns: 1fr;
  }
}

.region-card {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.region-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  color: var(--color-primary-dark);
}

.region-card span {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.prefill-banner {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.prefill-banner.is-visible {
  display: flex;
}

/* ---- About page vision/mission tabs already styled via .tabs in components.css ---- */

.value-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.value-list li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.value-list svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- 404-safe not-found style if needed ---- */
.not-found {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
}
