/* =========================================================
   BioCleaning · Catálogo dinámico y ficha de producto
   Extiende site.css usando sus mismas variables y lenguaje visual.
   ========================================================= */

/* ---------- Barra de filtros + búsqueda ---------- */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
  margin: -18px auto 34px;
}

.catalog-toolbar .filters { margin: 0; }

.filter-btn span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(0,104,71,.08);
  color: var(--bio-green-dark);
}

.filter-btn.active span { background: rgba(255,255,255,.22); color: #fff; }

.catalog-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 100%);
}

.catalog-search svg {
  position: absolute;
  left: 16px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.catalog-search input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 42px;
  border: 1px solid rgba(14,38,56,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(14,38,56,.05);
  backdrop-filter: blur(10px);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.catalog-search input:focus {
  outline: none;
  border-color: rgba(0,104,71,.45);
  box-shadow: 0 0 0 4px rgba(0,104,71,.10);
}

.catalog-empty {
  text-align: center;
  font-weight: 600;
  padding: 28px;
}

.catalog-empty a { color: var(--bio-green); text-decoration: underline; }

.catalog-more {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 38px;
}

.catalog-note {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Tarjeta de producto ---------- */
.pc { display: flex; flex-direction: column; }
.pc[hidden] { display: none; }

.pc-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,104,71,.12), transparent 36%),
    radial-gradient(circle at 80% 75%, rgba(217,198,154,.28), transparent 34%),
    #fffdf6;
}

/* Fondo difuminado de la misma imagen: cualquier proporción se ve bien */
.pc-backdrop,
.pd-stage-backdrop {
  position: absolute;
  inset: -20px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.15);
  opacity: .45;
  transform: scale(1.1);
}

.pc-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(14,38,56,.14));
  transition: transform .6s cubic-bezier(.2,.75,.22,1);
}

.pc:hover .pc-media img { transform: scale(1.045); }

.pc-placeholder {
  font-size: 54px;
  opacity: .55;
}

.pc-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #006847, #159a5f 54%, #8bb174);
  box-shadow: 0 10px 22px rgba(0,104,71,.28);
}

.pc-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.pc-body .tag { align-self: flex-start; }
.pc-body h3 { font-size: 19px; letter-spacing: -.02em; }
.pc-body h3 a { transition: color .2s ease; }
.pc-body h3 a:hover { color: var(--bio-green); }

.pc-tagline {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--bio-green);
  line-height: 1.45;
}

.pc-desc {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 16px;
}

.pc-price {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--forest);
}

.pc-price small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pc-variants {
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc .product-actions { margin-top: 16px; }
.pc .mini-btn { gap: 6px; transition: transform .2s ease, box-shadow .2s ease; }
.pc .mini-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,104,71,.25); }

.mini-btn.ghost {
  flex: 0 0 auto;
  color: var(--forest);
  background: rgba(0,104,71,.08);
  animation: none;
}

.mini-btn.ghost:hover { background: rgba(0,104,71,.14); }

/* ---------- Páginas internas: cabecera siempre sólida ---------- */
.page-inner .site-header { background: rgba(255,255,255,.86); backdrop-filter: blur(18px); box-shadow: 0 14px 34px rgba(14,38,56,.09); }
.page-inner .site-header .nav { background: rgba(255,255,255,.62); border-color: rgba(14,38,56,.08); }
.page-inner .site-header .nav a { color: #375064; text-shadow: none; }
.page-inner .site-header .nav a:hover,
.page-inner .site-header .nav a.active { color: #fff; background: linear-gradient(135deg, #006847, #159a5f 54%, #8bb174); }

/* ---------- Ficha de producto ---------- */
.pd-hero { padding: calc(var(--header-height) + 34px) 0 60px; }

.pd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.pd-breadcrumb a:hover { color: var(--bio-green); }
.pd-breadcrumb span:last-child { color: var(--ink); }

.pd-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 46px;
  align-items: start;
}

.pd-gallery { position: sticky; top: calc(var(--header-height) + 10px); }

.pd-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  max-height: 620px;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(14,38,56,.08);
  background:
    radial-gradient(circle at 25% 18%, rgba(0,104,71,.14), transparent 40%),
    radial-gradient(circle at 82% 80%, rgba(217,198,154,.32), transparent 36%),
    #fffdf6;
  box-shadow: var(--shadow);
}

.pd-stage-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 26px;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.pd-stage-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 26px 34px rgba(14,38,56,.16));
  transition: opacity .25s ease, transform .5s ease;
}

.pd-stage-btn img.swap { opacity: 0; transform: scale(.97); }
.pd-stage:hover .pd-stage-btn img { transform: scale(1.02); }

.pd-nav,
.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--forest);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transform: translateY(-50%);
  transition: transform .2s ease, background .2s ease;
}

.pd-nav:hover, .lightbox-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pd-nav.prev, .lightbox-nav.prev { left: 16px; }
.pd-nav.next, .lightbox-nav.next { right: 16px; }

.pd-zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}

.pd-stage:hover .pd-zoom-hint { opacity: 1; }

.pd-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.pd-thumb {
  flex: 0 0 84px;
  height: 84px;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(14,38,56,.08);
  transition: border-color .2s ease, transform .2s ease;
}

.pd-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.active { border-color: var(--bio-green); }

.pd-info {
  padding: 34px;
  border: 1px solid rgba(14,38,56,.08);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.80);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.pd-info h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.pd-tagline {
  margin: 12px 0 0;
  color: var(--bio-green);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.pd-lead { margin: 14px 0 0; font-size: 16px; }

.pd-quick {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.pd-quick li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.pd-quick i,
.pd-benefit i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #006847, #13a36d);
}

.pd-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pd-variants { margin-top: 26px; }

.pd-variant-list { display: flex; flex-wrap: wrap; gap: 10px; }

.pd-variant {
  display: grid;
  gap: 2px;
  min-width: 108px;
  padding: 12px 16px;
  border: 1.5px solid rgba(14,38,56,.12);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.pd-variant strong { font-size: 14px; }
.pd-variant small { font-size: 13px; font-weight: 700; color: var(--muted); }
.pd-variant:hover { transform: translateY(-2px); border-color: rgba(0,104,71,.4); }

.pd-variant.active {
  border-color: var(--bio-green);
  background: linear-gradient(135deg, rgba(0,104,71,.06), rgba(139,177,116,.10));
  box-shadow: 0 0 0 4px rgba(0,104,71,.10);
}

.pd-variant.active small { color: var(--bio-green); }

.pd-buy {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pd-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 18px; }
.pd-price strong { font-size: 38px; letter-spacing: -.05em; color: var(--forest); line-height: 1; }
.pd-price span { font-size: 13px; font-weight: 700; color: var(--muted); }
.pd-price small { width: 100%; font-size: 12px; font-weight: 700; color: var(--muted); }
.pd-price small:empty { display: none; }

.pd-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.pd-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sage);
  font-size: 13px;
  font-weight: 800;
  color: var(--forest);
}

.pd-trust i { font-style: normal; }

/* Pestañas fijas */
.pd-tabs {
  position: sticky;
  top: 68px;
  z-index: 20;
  padding: 10px 0;
  background: rgba(251,246,232,.86);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pd-tabs nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pd-tabs nav::-webkit-scrollbar { display: none; }

.pd-tabs a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: background .2s ease, color .2s ease;
}

.pd-tabs a:hover { color: var(--forest); background: rgba(0,104,71,.08); }
.pd-tabs a.active { color: #fff; background: linear-gradient(135deg, #006847, #159a5f 54%, #8bb174); }

.pd-sections {
  display: grid;
  gap: 26px;
  padding: 46px 0 20px;
}

.pd-block {
  scroll-margin-top: 150px;
  padding: 34px;
  border: 1px solid rgba(14,38,56,.08);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.pd-block h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.035em;
}

.pd-sub { margin: 26px 0 12px; font-size: 16px; }

.pd-rich p { margin: 0 0 12px; font-size: 16px; }
.pd-rich p:last-child { margin-bottom: 0; }
.pd-rich ul, .pd-rich ol { margin: 0 0 12px; padding-left: 22px; color: var(--muted); line-height: 1.8; }
.pd-rich strong { color: var(--ink); }

.pd-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }

.pd-chips li {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,104,71,.16);
  background: rgba(0,104,71,.06);
  color: var(--forest);
  font-size: 14px;
  font-weight: 700;
}

.pd-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pd-benefit {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(14,38,56,.06);
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(237,246,232,.7));
  transition: transform .25s ease, box-shadow .25s ease;
}

.pd-benefit:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(14,38,56,.08); }
.pd-benefit p { margin: 0; font-size: 15px; color: var(--ink); font-weight: 500; }

.pd-usage {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 22px;
  align-items: start;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(196,245,165,.22), transparent 30%),
    linear-gradient(145deg, #073821, #006847);
}

.pd-usage h2, .pd-usage .pd-rich strong { color: #fff; }
.pd-usage .pd-rich p, .pd-usage .pd-rich ul, .pd-usage .pd-rich ol { color: rgba(255,255,255,.9); }

.pd-usage-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 34px;
  background: rgba(255,255,255,.14);
}

.pd-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  margin: 0;
}

.pd-specs div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(14,38,56,.14);
}

.pd-specs dt { font-size: 14px; font-weight: 800; color: var(--muted); }
.pd-specs dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }

.pd-docs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.pd-doc {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(14,38,56,.08);
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.pd-doc:hover { transform: translateY(-3px); border-color: rgba(0,104,71,.3); box-shadow: 0 14px 28px rgba(14,38,56,.1); }

.pd-doc-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #b3261e, #e05d4f);
}

.pd-doc strong { display: block; font-size: 15px; }
.pd-doc small { font-size: 12px; font-weight: 700; color: var(--muted); }

.pd-doc-dl {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
  font-weight: 900;
}

.pd-warning {
  border: 1px solid rgba(217,160,40,.35);
  background: linear-gradient(135deg, rgba(255,250,235,.95), rgba(255,244,214,.85));
}

.pd-warning h2 { color: #7a4d00; }

.pd-cta-wrap { padding: 40px 0 90px; }
.pd-cta-wrap::before { display: none; }

.pd-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 42px;
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(196,245,165,.28), transparent 32%),
    linear-gradient(135deg, #073821, #006847 60%, #159a5f);
  box-shadow: var(--shadow);
}

.pd-cta h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); }
.pd-cta p { margin: 8px 0 0; color: rgba(255,255,255,.85); max-width: 640px; }

.pd-notfound { text-align: center; padding-top: 80px; }
.pd-notfound h1 { font-size: clamp(32px, 5vw, 56px); margin: 10px 0; }
.pd-notfound .btn-row { justify-content: center; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(4,26,17,.88);
  backdrop-filter: blur(8px);
  animation: lbIn .25s ease;
}

.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 100%); max-height: 86vh; object-fit: contain; border-radius: 18px; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .pd-grid { grid-template-columns: 1fr; gap: 28px; }
  .pd-gallery { position: static; }
  .pd-stage { aspect-ratio: 4 / 3; }
}

@media (max-width: 860px) {
  .pd-tabs { top: 74px; }
  .pd-benefits, .pd-specs { grid-template-columns: 1fr; }
  .pd-cta { flex-direction: column; align-items: flex-start; }
  .catalog-search { width: 100%; }
}

@media (max-width: 560px) {
  .pd-hero { padding-top: calc(var(--header-height) + 20px); }
  .pd-info, .pd-block { padding: 22px; }
  .pd-usage { grid-template-columns: 1fr; }
  .pd-trust { grid-template-columns: 1fr; }
  .pd-price strong { font-size: 32px; }
  .pd-specs div { grid-template-columns: 1fr; gap: 4px; }
  .pd-cta { padding: 28px 24px; }
  .pd-cta .btn { width: 100%; }
  .lightbox { padding: 16px; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; width: 100%; }
  .filter-btn { flex: 0 0 auto; }
}
