/* =========================================================
   Hero section
   ========================================================= */
.pharm-hero {
  background: linear-gradient(120deg, var(--pharm-bg-soft) 55%, var(--pharm-white) 45%);
  padding: 64px 20px;
}
.pharm-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.pharm-hero__eyebrow {
  display: inline-block;
  color: var(--pharm-primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 12px;
}
.pharm-hero__title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--pharm-text);
}
.pharm-hero__subtitle {
  font-size: 17px;
  color: var(--pharm-text-muted);
  margin-bottom: 28px;
  max-width: 46ch;
}
.pharm-hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.pharm-btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--pharm-radius);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pharm-btn--primary {
  background: var(--pharm-primary);
  color: var(--pharm-white);
}
.pharm-btn--primary:hover {
  background: var(--pharm-primary-dark);
  color: var(--pharm-white);
  transform: translateY(-2px);
}
.pharm-btn--outline {
  border: 2px solid var(--pharm-primary);
  color: var(--pharm-primary);
  background: transparent;
}
.pharm-btn--outline:hover {
  background: var(--pharm-primary);
  color: var(--pharm-white);
}
.pharm-hero__media img {
  width: 100%;
  height: auto;
  border-radius: var(--pharm-radius);
  box-shadow: var(--pharm-shadow);
}

/* =========================================================
   Section wrapper + heading
   ========================================================= */
.pharm-section {
  padding: 64px 20px;
}
.pharm-section--soft {
  background: var(--pharm-bg-soft);
}
.pharm-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.pharm-section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.pharm-section__eyebrow {
  color: var(--pharm-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.pharm-section__title {
  font-size: clamp(24px, 3vw, 34px);
  margin: 8px 0 12px;
  color: var(--pharm-text);
}
.pharm-section__desc {
  color: var(--pharm-text-muted);
}

/* =========================================================
   Why choose us grid (services CPT)
   ========================================================= */
.pharm-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.pharm-service-card {
  background: var(--pharm-white);
  border: 1px solid var(--pharm-border);
  border-radius: var(--pharm-radius);
  padding: 28px 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pharm-service-card:hover {
  box-shadow: var(--pharm-shadow);
  transform: translateY(-4px);
}
.pharm-service-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--pharm-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pharm-service-card__icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.pharm-service-card__title {
  font-size: 18px;
  margin: 0 0 8px;
}
.pharm-service-card__desc {
  color: var(--pharm-text-muted);
  font-size: 14px;
  margin: 0;
}

/* =========================================================
   Stats counter
   ========================================================= */
.pharm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  background: var(--pharm-primary);
  border-radius: var(--pharm-radius);
  padding: 40px 20px;
}
.pharm-stat {
  text-align: center;
  color: var(--pharm-white);
}
.pharm-stat__number {
  font-size: 38px;
  font-weight: 800;
  display: block;
}
.pharm-stat__label {
  font-size: 14px;
  opacity: 0.9;
}

/* =========================================================
   Featured products grid (WooCommerce)
   ========================================================= */
.pharm-products ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 24px;
}
.pharm-products ul.products li.product {
  /* WooCommerce's own CSS sets an explicit float + percentage width on
     .product (e.g. width: 22%; float: left;) which, unlike auto-sized
     boxes, is NOT overridden by the grid's default stretch alignment —
     it was making each card ~22% of its already-narrow grid track,
     collapsing text to one character per line. Force it back to fill
     its grid cell. */
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  border: 1px solid var(--pharm-border);
  border-radius: var(--pharm-radius);
  padding: 16px;
  transition: box-shadow 0.2s ease;
}
.pharm-products ul.products li.product img {
  width: 100%;
  height: auto;
}
.pharm-products ul.products li.product:hover {
  box-shadow: var(--pharm-shadow);
}
.pharm-products .pharm-empty-state {
  text-align: center;
  color: var(--pharm-text-muted);
  padding: 40px 0;
}

/* =========================================================
   Testimonials
   ========================================================= */
.pharm-testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.pharm-testimonial-card {
  background: var(--pharm-white);
  border-radius: var(--pharm-radius);
  padding: 28px;
  box-shadow: var(--pharm-shadow);
}
.pharm-testimonial-card__quote {
  font-style: italic;
  color: var(--pharm-text);
  margin-bottom: 16px;
}
.pharm-testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pharm-testimonial-card__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.pharm-testimonial-card__name {
  font-weight: 700;
  margin: 0;
}
.pharm-testimonial-card__role {
  font-size: 13px;
  color: var(--pharm-text-muted);
  margin: 0;
}

/* =========================================================
   Latest news
   ========================================================= */
.pharm-news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.pharm-news-card {
  background: var(--pharm-white);
  border: 1px solid var(--pharm-border);
  border-radius: var(--pharm-radius);
  overflow: hidden;
}
.pharm-news-card__thumb img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.pharm-news-card__body {
  padding: 18px;
}
.pharm-news-card__date {
  font-size: 12px;
  color: var(--pharm-primary);
  font-weight: 700;
  text-transform: uppercase;
}
.pharm-news-card__title {
  font-size: 17px;
  margin: 8px 0;
}
.pharm-news-card__title a {
  color: var(--pharm-text);
  text-decoration: none;
}
.pharm-news-card__excerpt {
  color: var(--pharm-text-muted);
  font-size: 14px;
}

/* =========================================================
   Homepage banner image (replaces the old stats counters)
   ========================================================= */
.pharm-image-banner__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--pharm-radius);
  box-shadow: var(--pharm-shadow);
}

/* =========================================================
   FAQ accordion
   ========================================================= */
.pharm-faq {
  position: relative;
  overflow: hidden;
}
.pharm-faq__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  z-index: 0;
}
.pharm-faq .pharm-section__inner {
  position: relative;
  z-index: 1;
}
.pharm-faq__list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pharm-faq__item {
  background: var(--pharm-white);
  border: 1px solid var(--pharm-border);
  border-radius: var(--pharm-radius);
  padding: 4px 24px;
}
.pharm-faq__question {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 16px;
  color: var(--pharm-text);
}
.pharm-faq__question::-webkit-details-marker {
  display: none;
}
.pharm-faq__question::marker {
  content: '';
}
.pharm-faq__icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.pharm-faq__icon::before,
.pharm-faq__icon::after {
  content: '';
  position: absolute;
  background: var(--pharm-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.pharm-faq__icon::before {
  top: 9px;
  left: 0;
  width: 20px;
  height: 2px;
}
.pharm-faq__icon::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 20px;
}
.pharm-faq__item[open] .pharm-faq__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
.pharm-faq__item[open] .pharm-faq__question {
  border-bottom: 1px solid var(--pharm-border);
}
.pharm-faq__answer {
  padding: 14px 0 20px;
  color: var(--pharm-text-muted);
}
.pharm-faq__answer p {
  margin: 0;
}

/* =========================================================
   CTA banner
   ========================================================= */
.pharm-cta {
  background: var(--pharm-primary-dark);
  border-radius: var(--pharm-radius);
  padding: 48px 32px;
  color: var(--pharm-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.pharm-cta__title {
  font-size: 24px;
  margin: 0 0 6px;
}
.pharm-cta__desc {
  opacity: 0.85;
  margin: 0;
}
.pharm-cta .pharm-btn--primary {
  background: var(--pharm-accent);
}
.pharm-cta .pharm-btn--primary:hover {
  background: #e68900;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 782px) {
  .pharm-hero__inner {
    grid-template-columns: 1fr;
  }
  .pharm-cta {
    flex-direction: column;
    text-align: center;
  }
}
