/* ============================================================
   Paz House 8.2 F3
   Product cards + catalog. Capa definitiva para catálogo.
   Se carga después del legacy para migrar sin hotfixes.
   ============================================================ */

/* ---------- Product card compartida ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  align-items: start;
}

.product-card {
  position: relative;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.product-card::before { display: none; }
.product-card:hover { transform: none; border-color: transparent; box-shadow: none; }

.product-card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--ph-radius-md);
  background: var(--ph-surface-muted);
}

.product-card__image-link,
.product-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card__imagen {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f6f2f4;
}

.product-card__imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--ph-medium);
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-card__imagen img { transform: scale(1.025); }
}

.product-card__badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: calc(100% - 62px);
  padding: 5px 9px;
  border-radius: var(--ph-radius-pill);
  background: rgba(25, 23, 28, .88);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
}

.product-card__badge.is-sale { background: var(--ph-coral); }
.product-card__badge.is-new { background: var(--ph-text); }
.product-card__badge.is-low-stock { background: #9a5c27; }
.product-card__badge.is-soldout { background: rgba(25,23,28,.78); }

.product-favorite {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--ph-radius-pill);
  background: rgba(255, 255, 255, .88);
  color: var(--ph-text);
  box-shadow: 0 4px 16px rgba(25, 23, 28, .10);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform var(--ph-fast), background-color var(--ph-fast), color var(--ph-fast), border-color var(--ph-fast);
}

.product-favorite .paz-icon { width: 19px; height: 19px; }
.product-favorite:hover { transform: scale(1.04); border-color: var(--ph-brand-border); }
.product-favorite.is-active {
  background: var(--ph-brand);
  border-color: var(--ph-brand);
  color: var(--ph-text);
}
.product-favorite.is-active .paz-icon { fill: currentColor; }

.product-card__body {
  display: grid;
  gap: 5px;
  padding: 10px 1px 0;
}

.product-card__marca,
.product-card__categoria {
  margin: 0;
  overflow: hidden;
  color: var(--ph-text-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-card__nombre {
  display: -webkit-box;
  min-height: 2.55em;
  margin: 0;
  overflow: hidden;
  color: var(--ph-text);
  font-family: var(--ph-font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 18px;
  color: var(--ph-text-soft);
  font-size: 10px;
  line-height: 1;
}
.product-rating .paz-icon { width: 12px; height: 12px; fill: var(--ph-orange); color: var(--ph-orange); }
.product-rating small { color: var(--ph-text-muted); font-size: 10px; }

.product-card__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 7px;
}

.product-card__precio {
  color: var(--ph-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.product-card__precio-original {
  color: var(--ph-text-muted);
  font-size: 11px;
  line-height: 1.2;
  text-decoration: line-through;
}

.product-card__campaign {
  margin: 0;
  color: var(--ph-coral);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.product-card__transfer {
  display: grid;
  gap: 1px;
  margin: 1px 0 0;
  color: var(--ph-text-muted);
  font-size: 9.5px;
  line-height: 1.28;
}
.product-card__transfer strong {
  color: var(--ph-brand-text);
  font-size: 11px;
  font-weight: 700;
}
.product-card__transfer span { display: block; }

.product-card__accion,
.product-card > .product-card__promo { display: none; }
.product-card.is-soldout .product-card__imagen img { filter: saturate(.55); opacity: .76; }

/* ---------- Página catálogo ---------- */
.shop-page {
  padding-bottom: var(--ph-space-8);
}

.shop-page .page-header {
  padding: 22px 0 18px;
  background: transparent;
}

.shop-page .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--ph-text-muted);
  font-size: 11px;
  line-height: 1.4;
}
.shop-page .breadcrumb__item a { color: inherit; text-decoration: none; }
.shop-page .breadcrumb__sep { color: var(--ph-border-strong); font-size: 7px; }
.shop-page .breadcrumb__item.activo { color: var(--ph-text-soft); }

.shop-page .page-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-top: 0;
}
.shop-page .page-header__texto { max-width: 760px; }
.shop-page .page-header .t-label,
.shop-page .page-header .linea-oro { display: none; }
.shop-page .page-header__titulo {
  margin: 0;
  color: var(--ph-text);
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.shop-page .page-header__desc {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--ph-text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.shop-page .page-header__contador {
  display: grid;
  min-width: 96px;
  gap: 1px;
  color: var(--ph-text-muted);
  font-size: 10px;
  line-height: 1.25;
  text-align: right;
}
.shop-page .page-header__contador span {
  color: var(--ph-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.shop-page .tienda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-block: 0;
}

.catalog-filter-overlay {
  position: fixed;
  z-index: calc(var(--ph-z-drawer) - 2);
  inset: 0;
  visibility: hidden;
  background: rgba(25, 23, 28, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ph-fast), visibility var(--ph-fast);
}
.catalog-filter-overlay.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.shop-page .sidebar {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--ph-surface);
  box-shadow: none;
}

.sidebar__mobile-head,
.sidebar__mobile-foot { display: none; }

.shop-page .sidebar__bloque {
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--ph-border);
}
.shop-page .sidebar__bloque:last-of-type { margin-bottom: 0; }
.shop-page .sidebar__titulo {
  margin: 0 0 10px;
  color: var(--ph-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
}
.shop-page .sidebar__lista {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-page .sidebar__opcion {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 4px;
  border-radius: var(--ph-radius-sm);
  cursor: pointer;
}
.shop-page .sidebar__opcion:hover { background: var(--ph-surface-soft); }
.shop-page .sidebar__opcion input[type='radio'],
.shop-page .sidebar__opcion input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--ph-brand-text);
}
.shop-page .sidebar__opcion-label {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ph-text-soft);
  font-size: 12px;
  font-weight: 500;
}
.shop-page .sidebar__count { color: var(--ph-text-muted); font-size: 10px; }
.shop-page .sidebar__limpiar {
  min-height: 36px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ph-brand-text);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.shop-page .sidebar__clear-all { width: 100%; margin-top: 18px; justify-content: center; }

.shop-page .tienda-toolbar {
  position: sticky;
  z-index: var(--ph-z-sticky);
  top: calc(var(--ph-header-h, 56px) - 1px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 0 0 16px;
  padding: 7px 0;
  border-top: 1px solid var(--ph-border);
  border-bottom: 1px solid var(--ph-border);
  background: rgba(255, 248, 251, .94);
  backdrop-filter: blur(14px);
}
.shop-page .tienda-toolbar__izq,
.shop-page .tienda-toolbar__der {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-page .tienda-toolbar__resultados {
  margin: 0;
  color: var(--ph-text-muted);
  font-size: 11px;
  line-height: 1.35;
}
.shop-page .tienda-toolbar__resultados strong { color: var(--ph-text); font-weight: 650; }

.catalog-filter-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-pill);
  background: var(--ph-surface);
  color: var(--ph-text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.catalog-filter-btn .paz-icon { width: 17px; height: 17px; }
.catalog-filter-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  border-radius: var(--ph-radius-pill);
  background: var(--ph-brand);
  color: var(--ph-text);
  font-size: 10px;
  font-weight: 700;
}

.shop-page .select-orden {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 32px 0 10px;
  border-color: var(--ph-border);
  border-radius: var(--ph-radius-pill);
  background-color: var(--ph-surface);
  color: transparent;
  font-size: 12px;
  cursor: pointer;
}
.shop-page .select-orden:focus { color: var(--ph-text); width: min(220px, 56vw); }

.tienda-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -3px 0 15px;
}
.tienda-filter-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--ph-brand-border);
  border-radius: var(--ph-radius-pill);
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
  font-size: 10px;
  font-weight: 650;
}
.tienda-filter-chip button {
  display: grid;
  width: 22px;
  height: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  cursor: pointer;
}
.tienda-filter-chip .paz-icon { width: 13px; height: 13px; }

.shop-page .sin-resultados {
  grid-column: 1 / -1;
  padding: 56px 20px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  background: var(--ph-surface);
  text-align: center;
}
.shop-page .sin-resultados__icono { color: var(--ph-brand-text); }
.shop-page .sin-resultados__titulo { color: var(--ph-text); }
.shop-page .sin-resultados__texto { color: var(--ph-text-muted); }

.shop-page .paginacion {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.shop-page .paginacion__btn {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-pill);
  background: var(--ph-surface);
  color: var(--ph-text-soft);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.shop-page .paginacion__btn.activo {
  border-color: var(--ph-brand);
  background: var(--ph-brand);
  color: var(--ph-text);
}
.shop-page .paginacion__btn[aria-disabled='true'] { pointer-events: none; }

/* Mobile sheet de filtros */
@media (max-width: 767px) {
  .shop-page .page-header { padding: 14px 0 12px; }
  .shop-page .breadcrumb { margin-bottom: 7px; }
  .shop-page .page-header__inner { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .shop-page .page-header__titulo { font-size: 27px; }
  .shop-page .page-header__desc {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    font-size: 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .shop-page .page-header__contador { display: none; }

  .shop-page .sidebar {
    position: fixed;
    z-index: var(--ph-z-drawer);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    max-height: min(78dvh, 720px);
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 48px rgba(25, 23, 28, .18);
    visibility: hidden;
    transform: translateY(104%);
    pointer-events: none;
    transition: transform var(--ph-medium), visibility var(--ph-medium);
  }
  .shop-page .sidebar.abierto {
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .sidebar__mobile-head {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ph-border);
  }
  .sidebar__mobile-head h2 { margin: 0; font-size: 18px; }
  .sidebar__mobile-body {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 18px 16px 6px;
    overscroll-behavior: contain;
  }
  .sidebar__mobile-foot {
    display: block;
    padding: 10px 16px calc(10px + var(--safe-bottom));
    border-top: 1px solid var(--ph-border);
    background: var(--ph-surface);
  }
  .sidebar__mobile-foot .btn { width: 100%; justify-content: center; }

  .shop-page .tienda-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .shop-page .tienda-toolbar__resultados { display: none; }
  .shop-page .tienda-toolbar__der { justify-content: flex-end; }
  .shop-page .select-orden { width: min(160px, 46vw); color: var(--ph-text); }

  .product-grid { gap: 20px 10px; }
  .product-favorite { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .product-card__badge { top: 8px; left: 8px; min-height: 26px; padding: 5px 8px; font-size: 9px; }
}

@media (max-width: 350px) {
  .product-grid { gap: 18px 8px; }
  .product-card__body { padding-top: 8px; }
  .product-card__nombre { font-size: 12px; }
  .product-card__precio { font-size: 14px; }
  .product-card__transfer strong { font-size: 10px; }
}

@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
  .product-card__body { gap: 6px; padding-top: 12px; }
  .product-card__marca { font-size: 11px; }
  .product-card__nombre { min-height: 2.6em; font-size: 14px; }
  .product-card__precio { font-size: 16px; }
  .product-card__transfer { font-size: 10px; }
  .product-card__transfer strong { font-size: 12px; }

  .shop-page .tienda-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
  .shop-page .sidebar {
    display: block;
    position: sticky;
    top: calc(var(--ph-header-h, 72px) + 20px);
    padding: 18px;
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-lg);
  }
  .catalog-filter-overlay { display: none; }
  .catalog-filter-btn { display: none; }
  .shop-page .tienda-toolbar {
    top: calc(var(--ph-header-h, 72px) - 1px);
    min-height: 62px;
  }
  .shop-page .select-orden {
    width: auto;
    min-width: 190px;
    color: var(--ph-text);
  }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-page .tienda-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
}

@media (min-width: 1180px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 20px; }
  .shop-page .tienda-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card__imagen img,
  .shop-page .sidebar,
  .catalog-filter-overlay { transition: none; }
}
.search-related-brands { padding:18px 0 4px; background:var(--ph-surface); }
.search-related-brands h2 { margin:0 0 10px; color:var(--ph-ink); font-size:15px; }
.search-related-brands__grid { display:flex; gap:9px; overflow-x:auto; padding:2px 2px 10px; scrollbar-width:thin; }
.search-related-brands__grid>a { flex:0 0 180px; display:grid; grid-template-columns:54px minmax(0,1fr); grid-template-rows:auto auto; align-items:center; gap:1px 10px; min-height:66px; padding:9px; border:1px solid var(--ph-line); border-radius:14px; background:#fff; color:var(--ph-ink); text-decoration:none; }
.search-related-brands__grid>a:hover { border-color:var(--ph-brand-border); box-shadow:0 8px 24px rgba(43,27,38,.08); }
.search-related-brands__grid span { grid-row:1/3; display:grid; place-items:center; width:54px; height:46px; padding:5px; overflow:hidden; border-radius:10px; background:#fff; }
.search-related-brands__grid img { display:block; max-width:100%; max-height:100%; object-fit:contain; }
.search-related-brands__grid strong { align-self:end; overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.search-related-brands__grid small { align-self:start; color:var(--ph-text-muted); font-size:10px; }
