/* ============================================================
   GRUPO FERREIRA — C206 · components.css
   Componentes de UI reutilizables entre varias páginas
   (cards, hero interior, galería, lightbox, fichas de producto).
   Requiere las variables definidas en main.css.
   ============================================================ */

/* ── Hero de página interior ───────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--secondary) 100%);
  padding: 3.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(230,126,34,.1) 0%, transparent 60%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: .75rem; }
.page-hero p  { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: .5rem;
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,.8); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: rgba(255,255,255,.4); }

/* ── Imagen placeholder ────────────────────────────────────── */
.img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.img-wrap:hover img { transform: scale(1.04); }
.img-placeholder-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-family: var(--font-heading);
  text-align: center;
  padding: 1rem;
  gap: .5rem;
}
.img-placeholder-box svg { opacity: .4; }

/* ── Cards generales ───────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.card__body { padding: 1.75rem; }
.card__img { width: 100%; height: 220px; object-fit: cover; }

/* ── Feature / Beneficio cards ─────────────────────────────── */
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.feature-card__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--white);
  font-size: 1.5rem;
}
.feature-card h3 { color: var(--primary); margin-bottom: .5rem; font-size: 1.1rem; }
.feature-card p  { color: var(--text-light); font-size: .9375rem; margin-bottom: 0; }

/* ── Producto card ─────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}
/* Fotos cuadradas (1000×1000) con el saco completo: contain + fondo del mismo
   tono que la foto, para que el empaque se vea entero sin recortes. */
.product-card__img {
  height: 260px;
  padding: 1rem;
  background: #ECECEC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform var(--transition);
}
.product-card:hover .product-card__img img { transform: scale(1.03); }
.product-card__img .img-placeholder-box { height: 100%; }
.product-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.product-card__formula {
  font-family: 'Roboto Mono', monospace;
  font-size: .8rem;
  color: var(--text-light);
  background: var(--gray-light);
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: .75rem;
}
.product-card h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: .5rem; }
.product-card p  { color: var(--text-light); font-size: .9rem; flex: 1; margin-bottom: 1rem; }
.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}
.product-card__tag {
  background: var(--gray-light);
  color: var(--gray);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .65rem;
  border-radius: 50px;
  font-family: var(--font-heading);
}
.product-card__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Filtros de catálogo ───────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 600;
  padding: .5rem 1.25rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  color: var(--gray);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ── Galería ───────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.gallery-item .img-placeholder-box { width: 100%; height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,29,66,.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: var(--white);
  font-size: .875rem;
  font-family: var(--font-heading);
  font-weight: 600;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }
.gallery-item__zoom {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  background: rgba(255,255,255,.9);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}
.gallery-item:hover .gallery-item__zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox__inner {
  position: relative;
  max-width: 900px;
  width: 100%;
}
.lightbox__img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox__placeholder {
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-family: var(--font-heading);
  font-size: 1rem;
}
.lightbox__caption {
  text-align: center;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  margin-top: .75rem;
}
.lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox__nav {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: -3rem;
  right: -3rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.lightbox__nav button {
  pointer-events: all;
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox__nav button:hover { background: rgba(255,255,255,.3); }

/* ── Blog cards ────────────────────────────────────────────── */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.blog-card__img { height: 200px; overflow: hidden; }
.blog-card__img img, .blog-card__img .img-placeholder-box { width: 100%; height: 100%; object-fit: cover; }
.blog-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card__meta {
  display: flex;
  gap: .75rem;
  align-items: center;
  font-size: .8rem;
  color: var(--text-light);
  margin-bottom: .75rem;
}
.blog-card__cat {
  background: var(--gray-light);
  padding: .2rem .65rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
}
.blog-card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: .5rem; }
.blog-card p  { color: var(--text-light); font-size: .9rem; flex: 1; margin-bottom: 1rem; }
.blog-card__link {
  color: var(--secondary);
  font-weight: 600;
  font-size: .875rem;
  font-family: var(--font-heading);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: gap var(--transition);
}
.blog-card__link:hover { gap: .6rem; }

/* ── Servicios ─────────────────────────────────────────────── */
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--primary);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.service-card__icon {
  width: 60px; height: 60px;
  background: var(--gray-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}
.service-card h3 { color: var(--primary); margin-bottom: .65rem; }
.service-card p  { color: var(--text-light); font-size: .9375rem; margin-bottom: 0; }

/* ── Sectores ──────────────────────────────────────────────── */
.sector-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}
.sector-badge__icon { font-size: 2rem; flex-shrink: 0; }
.sector-badge h4 { color: var(--primary); margin-bottom: .2rem; font-size: 1rem; }
.sector-badge p  { color: var(--text-light); font-size: .85rem; margin-bottom: 0; }

/* ── Nosotros: valores / misión / marcas ───────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.value-item {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--gray-light);
  border-left: 3px solid var(--accent);
}
.value-item h4 { color: var(--primary); margin-bottom: .35rem; }
.value-item p  { color: var(--text-light); font-size: .9rem; margin-bottom: 0; }

.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.mv-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--primary);
}
.mv-card--accent { border-top-color: var(--accent); }
.mv-card__label {
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}
.mv-card h3 { color: var(--primary); margin-bottom: .75rem; }
.mv-card p  { color: var(--text-light); margin-bottom: 0; line-height: 1.75; }

.brands-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}
.brand-card {
  background: linear-gradient(160deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
  color: var(--white);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.08);
}
.brand-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.brand-card__tagline {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: .6rem;
  line-height: 1.6;
}
.brand-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  flex: 1;
  margin-top: 2rem;
}
.brand-card__content .btn {
  margin-top: auto;
}
.brand-card__desc {
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  line-height: 1.75;
  margin-bottom: 0;
  text-align: center;
  max-width: 100%;
}
.brand-logo-container {
  background: var(--primary-dark);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}
.brand-logo-img {
  max-height: 94px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.hero__brand-logo-img {
  max-height: 162px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.logo-marca {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ── Nosotros two-col ──────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.about-img .img-placeholder-box { height: 420px; }

/* ── CTA Banner ────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(230,126,34,.15) 0%, transparent 70%);
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p  { color: rgba(255,255,255,.8); margin-bottom: 2rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-banner__actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── Nosotros page timeline ────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: .5rem; bottom: .5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary) 0%, var(--accent) 100%);
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.4rem;
  top: .35rem;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 3px var(--accent);
}
.timeline-item h4 { color: var(--primary); margin-bottom: .25rem; }
.timeline-item p  { color: var(--text-light); font-size: .9375rem; margin-bottom: 0; }

/* ── Número destacado ──────────────────────────────────────── */
.stat-block {
  text-align: center;
}
.stat-block__num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat-block__label {
  font-size: .875rem;
  color: var(--text-light);
}

/* ── Subheader (breadcrumb liviano en páginas de producto) ── */
.subheader { background: var(--gray-light); padding: 1.1rem 0; }
.subheader .breadcrumb { justify-content: flex-start; margin-bottom: 0; color: var(--text-light); }
.subheader .breadcrumb a { color: var(--gray); }
.subheader .breadcrumb a:hover { color: var(--secondary); }
.subheader .breadcrumb span { color: var(--border); }

/* ── Product landing pages ────────────────────────────────── */
.product-hero {
  display: grid;
  grid-template-columns: minmax(0,460px) 1fr;
  gap: 3rem;
  align-items: start;
}
.product-gallery__main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  aspect-ratio: 1/1;
}
.product-gallery__main img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity .35s ease;
}
.product-gallery__main img.is-active { opacity: 1; }
.product-gallery__thumbs {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.product-gallery__thumb {
  width: 76px; height: 76px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  padding: 6px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery__thumb.is-active { border-color: var(--accent); }
.product-info__eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  color: var(--text-light);
  background: var(--gray-light);
  display: inline-block;
  padding: .3rem .75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.product-info h1 { margin-bottom: .5rem; }
.product-info__desc { color: var(--text-light); font-size: 1.05rem; line-height: 1.75; margin-bottom: 1.75rem; }
.product-info__block { margin-bottom: 1.5rem; }
.product-info__block h3 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: .65rem;
}
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-row .pill {
  background: var(--gray-light);
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem .9rem;
  border-radius: 50px;
  font-family: var(--font-heading);
}
.pill-row .pill--mesh { background: var(--primary); color: var(--white); }
.presentation-cards { display: flex; flex-wrap: wrap; gap: .75rem; }
.presentation-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .75rem 1.1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .875rem;
  color: var(--primary);
}
.product-info__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.related-products { margin-top: 4rem; }

/* ── Categorías de catálogo ────────────────────────────────── */
.category-section { margin-bottom: 4.5rem; }
.category-section:last-child { margin-bottom: 0; }
.category-head {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--gray-light);
}
.category-head__num {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-head h2 { margin-bottom: .35rem; }
.category-head p { color: var(--text-light); margin-bottom: 0; font-size: .95rem; }
.product-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-link-card h3 { transition: color var(--transition); }
.product-link-card:hover h3 { color: var(--secondary); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .product-hero { grid-template-columns: 1fr; gap: 2rem; }
  .product-gallery__main { max-width: 460px; }
}

@media (max-width: 768px) {
  .values-grid { grid-template-columns: 1fr; }
  .mission-vision { grid-template-columns: 1fr; }
  .brands-section { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .category-head { flex-direction: column; }
  .lightbox__nav { left: 0; right: 0; }
  .product-card__img { height: 300px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .cta-banner__actions { flex-direction: column; align-items: center; }
  .product-gallery__thumb { width: 62px; height: 62px; }
}
