/**
 * Gerimedical Connector — Category Styles
 *
 * BEM blocks: .bc-cat-* (landing) · .bc-cat-grid (index)
 * Inherits custom properties from gerimedical-booking.css (:root)
 *
 * @package Gerimedical
 */

/*
 * Elementor scroll animations use .elementor-invisible to hide elements until
 * the IntersectionObserver fires. On virtual pages the footer may already be
 * partially visible on load and the observer never removes the class.
 * Force all animated elements visible after a short delay so nothing stays hidden.
 */
.page.singular .elementor-invisible {
  animation: bc-reveal-invisible 0s 0.8s forwards;
}
@keyframes bc-reveal-invisible {
  to {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}

/* ==========================================================================
   Global custom properties for category styles.
   --bc-cat-teal / --bc-cat-teal-light are defined here at :root so they
   resolve correctly both inside .bc-cat-landing (virtual pages) and inside
   the [gerimedical_categories] shortcode grid which sits outside that scope.
   ========================================================================== */
:root {
  --bc-cat-teal:        var(--bc-primary, #0062cc);
  --bc-cat-teal-light:  color-mix(in srgb, var(--bc-primary, #0062cc) 12%, #fff);
  --bc-cat-orange:      #f97316;
  --bc-cat-green:       #16a34a;
  --bc-cat-green-light: #dcfce7;
}

/* ==========================================================================
   Category landing wrapper
   ========================================================================== */
.bc-cat-landing {
  font-family: var(--bc-font, inherit);
  color: var(--bc-text, #212529);
  box-sizing: border-box;
}
.bc-cat-landing *,
.bc-cat-landing *::before,
.bc-cat-landing *::after {
  box-sizing: inherit;
}

/*
 * Scoped Elementor kit reset.
 * Elementor's global kit rule `.elementor-kit-N h1/h2/h3` sets font-size and
 * font-weight with specificity (0,1,1) which beats the plugin's (0,1,0) rules.
 * These overrides use (0,2,0) to restore sane defaults inside plugin blocks,
 * while leaving Elementor widgets untouched (they are not inside .bc-*).
 */
.bc-cat-landing h1,
.bc-catalog h1,
.bc-wizard h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.bc-cat-landing h2,
.bc-catalog h2,
.bc-wizard h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}
.bc-cat-landing h3,
.bc-catalog h3,
.bc-wizard h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
/* Elementor kit also sets `a { font-size:18px; font-weight:700 }` at (0,1,1).
   Restore normal inline-link behaviour inside plugin blocks; buttons are
   handled separately by .bc-btn selectors below. */
.bc-cat-landing a:not(.bc-btn),
.bc-catalog a:not(.bc-btn),
.bc-wizard a:not(.bc-btn),
.bc-product-detail a:not(.bc-btn):not(.bc-product-detail__cta) {
  font-size: inherit;
  font-weight: inherit;
}

/* ==========================================================================
   Content body (below hero) — centers all post-hero sections
   ========================================================================== */
.bc-cat-body {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.bc-cat-hero {
  position: relative;
  background: linear-gradient(135deg, var(--bc-primary, #0062cc) 0%, color-mix(in srgb, var(--bc-primary, #0062cc) 80%, #fff) 100%);
  border-radius: var(--bc-radius, 8px);
  overflow: hidden;
  margin-bottom: 2rem;
}

.bc-cat-hero--has-img {
  background-image: var(--bc-cat-hero-img);
  background-size: cover;
  background-position: center top;
}

.bc-cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.25) 60%, rgba(0,0,0,.10) 100%);
  pointer-events: none;
}

.bc-cat-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2.5rem 2rem;
}

@media (max-width: 640px) {
  .bc-cat-hero__inner {
    flex-direction: column;
    padding: 1.75rem 1.25rem;
  }
}

/* Icon */
.bc-cat-hero__icon {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.bc-cat-hero__icon svg {
  width: 36px;
  height: 36px;
  stroke: #fff;
}

/* Content */
.bc-cat-hero__content {
  flex: 1;
  min-width: 0;
}

.bc-cat-hero__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin: 0 0 .4rem;
}

.bc-cat-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 .5rem;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.bc-cat-hero__subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.9);
  margin: 0 0 1.25rem;
  max-width: 520px;
  line-height: 1.55;
}

/* Trust signals */
.bc-cat-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  margin-bottom: 1.5rem;
}
.bc-cat-hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: .3em .75em;
  backdrop-filter: blur(2px);
}
.bc-cat-hero__trust-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: rgba(255,255,255,.85);
}

/* CTAs */
.bc-cat-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Hero supporting text */
.bc-cat-hero__text {
  font-size: .95rem;
  color: rgba(255,255,255,.82);
  line-height: 1.65;
  max-width: 580px;
  margin: 0 0 1.25rem;
}

/* Hero microcopy */
.bc-cat-hero__microcopy {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  margin: .75rem 0 0;
  font-style: italic;
}

/* ==========================================================================
   SEO intro (paragraph above product grid)
   ========================================================================== */
.bc-cat-seo-intro {
  background: var(--bc-bg-alt, #f8f9fa);
  border-left: 3px solid var(--bc-primary, #0062cc);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  max-width: 800px;
}
.bc-cat-seo-intro p {
  margin: 0;
  font-size: .93rem;
  line-height: 1.7;
  color: var(--bc-text-muted, #6c757d);
}

/* ==========================================================================
   Buttons (shared, extends bc-btn from booking.css)
   ========================================================================== */
.bc-cat-landing .bc-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 600;
  padding: .65em 1.25em;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .1s;
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.bc-cat-landing .bc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.bc-cat-landing .bc-btn--primary {
  background: var(--bc-primary, #0062cc);
  color: #fff;
}
.bc-cat-landing .bc-btn--primary:hover {
  background: var(--bc-primary-hover, #004fa3);
}
.bc-cat-landing .bc-btn--ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(2px);
}
.bc-cat-landing .bc-btn--ghost:hover {
  background: rgba(255,255,255,.25);
}
.bc-cat-landing .bc-btn--whatsapp {
  background: #25d366;
  color: #fff;
}
.bc-cat-landing .bc-btn--whatsapp:hover {
  background: #1ebe5a;
}
.bc-cat-landing .bc-btn--sm {
  font-size: .82rem;
  padding: .5em .9em;
}

/* ==========================================================================
   Benefits strip
   ========================================================================== */
.bc-cat-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.bc-cat-benefits__item {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  background: var(--bc-bg, #fff);
  border: 1px solid var(--bc-border, #dee2e6);
  border-radius: var(--bc-radius, 8px);
  padding: 1rem 1.125rem;
  box-shadow: var(--bc-shadow, 0 2px 8px rgba(0,0,0,.06));
}
.bc-cat-benefits__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bc-cat-teal-light, #ccfbf1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bc-cat-benefits__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--bc-cat-teal, #0d9488);
}
.bc-cat-benefits__title {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  color: var(--bc-text, #212529);
  margin-bottom: .2rem;
}
.bc-cat-benefits__desc {
  font-size: .82rem;
  color: var(--bc-text-muted, #6c757d);
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   Category description
   ========================================================================== */
.bc-cat-desc {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--bc-text, #212529);
  max-width: 800px;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Product grid section
   ========================================================================== */
.bc-cat-products__header {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.bc-cat-products__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--bc-text, #212529);
}
.bc-cat-products__count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--bc-text-muted, #6c757d);
  background: var(--bc-bg-alt, #f8f9fa);
  border: 1px solid var(--bc-border, #dee2e6);
  border-radius: 50px;
  padding: .2em .65em;
}

/* "Inmediato" badge overlaid on card image */
.bc-cat-products__badge-instant {
  position: absolute;
  top: .6rem;
  left: .6rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--bc-cat-green, #16a34a);
  color: #fff;
  border-radius: 4px;
  padding: .25em .55em;
  pointer-events: none;
}

/* Card image link needs relative positioning for the badge */
.bc-catalog__card-img-link {
  position: relative;
  display: block;
}

/* Image placeholder */
.bc-catalog__card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bc-bg-alt, #f8f9fa);
  aspect-ratio: 4/3;
  width: 100%;
}
.bc-catalog__card-img--placeholder svg {
  width: 56px;
  height: 56px;
  opacity: .35;
}

/* Price block */
.bc-catalog__card-pricing {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .4rem;
  margin: .5rem 0 .2rem;
}
.bc-catalog__card-price-from {
  font-size: .78rem;
  color: var(--bc-text-muted, #6c757d);
}
.bc-catalog__card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--bc-cat-teal, #0d9488);
}
.bc-catalog__card-vat {
  font-size: .72rem;
  color: var(--bc-text-muted, #6c757d);
}
.bc-catalog__card-deposit {
  font-size: .78rem;
  color: var(--bc-text-muted, #6c757d);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin: .15rem 0 0;
}
.bc-catalog__card-deposit svg {
  flex-shrink: 0;
  stroke: var(--bc-text-muted, #6c757d);
}

/* Stock indicator */
.bc-catalog__card-stock {
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin: .35rem 0 0;
}
.bc-catalog__card-stock--ok {
  color: var(--bc-cat-green, #16a34a);
}
.bc-catalog__card-stock--ok svg {
  stroke: var(--bc-cat-green, #16a34a);
}
.bc-catalog__card-stock--low {
  color: var(--bc-text-muted, #6c757d);
}
.bc-catalog__card-stock--low svg {
  stroke: var(--bc-text-muted, #6c757d);
}

/* Empty state */
.bc-cat-empty {
  padding: 2.5rem;
  text-align: center;
  background: var(--bc-bg-alt, #f8f9fa);
  border: 1px dashed var(--bc-border, #dee2e6);
  border-radius: var(--bc-radius, 8px);
  color: var(--bc-text-muted, #6c757d);
  margin-bottom: 2rem;
}
.bc-cat-empty p {
  margin: 0 0 1rem;
}

/* ==========================================================================
   Related categories
   ========================================================================== */
.bc-cat-related {
  margin: 2.5rem 0;
}
.bc-cat-related__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--bc-text, #212529);
}
.bc-cat-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.bc-cat-related__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem .875rem;
  background: var(--bc-bg, #fff);
  border: 1px solid var(--bc-border, #dee2e6);
  border-radius: var(--bc-radius, 8px);
  text-decoration: none;
  color: var(--bc-text, #212529);
  text-align: center;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  position: relative;
}
.bc-cat-related__card:hover {
  border-color: var(--bc-cat-teal, #0d9488);
  box-shadow: 0 4px 14px rgba(13,148,136,.12);
  transform: translateY(-2px);
  color: var(--bc-cat-teal, #0d9488);
}
.bc-cat-related__card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bc-cat-teal-light, #ccfbf1);
  border-radius: 50%;
  flex-shrink: 0;
}
.bc-cat-related__card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--bc-cat-teal, #0d9488);
}
.bc-cat-related__card-name {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
}
.bc-cat-related__card-count {
  font-size: .75rem;
  color: var(--bc-text-muted, #6c757d);
}
.bc-cat-related__card-arrow {
  position: absolute;
  top: .7rem;
  right: .7rem;
  stroke: var(--bc-border, #dee2e6);
  transition: stroke .15s;
}
.bc-cat-related__card:hover .bc-cat-related__card-arrow {
  stroke: var(--bc-cat-teal, #0d9488);
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.bc-cat-faq {
  margin: 2.5rem 0;
}
.bc-cat-faq__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.bc-cat-faq__list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 800px;
}
.bc-cat-faq__item {
  background: var(--bc-bg, #fff);
  border: 1px solid var(--bc-border, #dee2e6);
  border-radius: var(--bc-radius, 8px);
  overflow: hidden;
  transition: border-color .15s;
}
.bc-cat-faq__item[open] {
  border-color: var(--bc-cat-teal, #0d9488);
}
.bc-cat-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .92rem;
  list-style: none;
  user-select: none;
  color: var(--bc-text, #212529);
  transition: color .15s;
}
.bc-cat-faq__q::-webkit-details-marker { display: none; }
.bc-cat-faq__item[open] .bc-cat-faq__q {
  color: var(--bc-cat-teal, #0d9488);
}
.bc-cat-faq__chevron {
  flex-shrink: 0;
  stroke: var(--bc-text-muted, #6c757d);
  transition: transform .2s;
}
.bc-cat-faq__item[open] .bc-cat-faq__chevron {
  transform: rotate(180deg);
  stroke: var(--bc-cat-teal, #0d9488);
}
.bc-cat-faq__a {
  padding: 0 1rem .9rem;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--bc-text-muted, #6c757d);
}
.bc-cat-faq__a p { margin: 0; }

/* ==========================================================================
   CTA bottom
   ========================================================================== */
.bc-cat-cta-bottom {
  background: linear-gradient(135deg, var(--bc-primary, #0062cc), var(--bc-primary-hover, #004fa3));
  border-radius: var(--bc-radius, 8px);
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  overflow: hidden;
}
.bc-cat-cta-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
}
.bc-cat-cta-bottom__headline {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .25rem;
}
.bc-cat-cta-bottom__sub {
  font-size: .88rem;
  color: rgba(255,255,255,.8);
  margin: 0;
}
.bc-cat-cta-bottom__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  flex-shrink: 0;
}
.bc-cat-cta-bottom .bc-btn--primary {
  background: #fff;
  color: var(--bc-cat-teal, #0d9488);
}
.bc-cat-cta-bottom .bc-btn--primary:hover {
  background: #f0fdfa;
}

@media (max-width: 600px) {
  .bc-cat-cta-bottom__inner { padding: 1.25rem 1rem; }
  .bc-cat-cta-bottom__actions { width: 100%; }
  .bc-cat-cta-bottom .bc-btn { flex: 1; justify-content: center; }
}

/* ==========================================================================
   Category grid (index page)  —  [gerimedical_categories]
   ========================================================================== */

.bc-cat-grid {
  display: grid;
  gap: 1.25rem;
  margin: 0;
}
.bc-cat-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.bc-cat-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.bc-cat-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .bc-cat-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
  .bc-cat-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .bc-cat-grid--cols-2,
  .bc-cat-grid--cols-3,
  .bc-cat-grid--cols-4 { grid-template-columns: 1fr; }
}

/* Card */
.bc-cat-grid__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: 1.5rem 1.25rem 1.25rem;
  background: var(--bc-bg, #fff);
  border: 1px solid var(--bc-border, #dee2e6);
  border-radius: var(--bc-radius, 8px);
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
}
.bc-cat-grid__card:hover {
  box-shadow: var(--bc-shadow, 0 4px 20px rgba(0,0,0,.1));
  transform: translateY(-2px);
}

/* Icon circle */
.bc-cat-grid__card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bc-cat-teal-light, #ccfbf1);
  border-radius: 50%;
  flex-shrink: 0;
  margin-bottom: .25rem;
}
.bc-cat-grid__card-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--bc-cat-teal, #0d9488);
}

/* Product count badge */
.bc-cat-grid__card-count {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--bc-cat-teal, #0d9488);
  background: var(--bc-cat-teal-light, #ccfbf1);
  border-radius: 50px;
  padding: .2em .65em;
  line-height: 1.4;
}

/* Name */
.bc-cat-grid__card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bc-text, #212529);
  margin: 0;
  line-height: 1.3;
}
.bc-cat-grid__card:hover .bc-cat-grid__card-name {
  color: inherit;
}

/* Description */
.bc-cat-grid__card-desc {
  font-size: .85rem;
  color: var(--bc-text-muted, #6c757d);
  margin: 0;
  line-height: 1.5;
  flex: 1;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA button — layout-only; colour/size/padding come from .bc-btn--primary.bc-btn--sm */
.bc-cat-grid__card-cta {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

/* Full-card clickable overlay (invisible link behind content) */
.bc-cat-grid__card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Empty state */
.bc-cat-grid__empty {
  padding: 2rem;
  text-align: center;
  color: var(--bc-text-muted, #6c757d);
  background: var(--bc-bg-alt, #f8f9fa);
  border: 1px dashed var(--bc-border, #dee2e6);
  border-radius: var(--bc-radius, 8px);
}
