/* ============================================================
   Paz House 8.2 F5 - Home editorial
   Portada definitiva sobre las fundaciones F1, navegación F2,
   cards F3 y producto F4. No depende del hero legacy 5.x/8.1.
   ============================================================ */

.paz-home-refresh {
  background: var(--ph-bg);
  color: var(--ph-text);
  overflow: clip;
}

.paz-home-refresh .container {
  min-width: 0;
}

/* ---------- Utilidades de portada ---------- */
.home82-eyebrow {
  margin: 0 0 8px;
  color: var(--ph-brand-text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.home82-section {
  padding-block: clamp(42px, 7vw, 82px);
}

.home82-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.home82-section-heading > div {
  min-width: 0;
  max-width: 720px;
}

.home82-section-heading h2,
.home82-story h2,
.home82-community-card h2,
.home82-editorial-card h2 {
  margin: 0;
  color: var(--ph-text);
  font-family: var(--ph-font-sans);
  font-size: clamp(1.65rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.home82-section-heading p:not(.home82-eyebrow) {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--ph-text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.home82-text-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--ph-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.home82-text-link .paz-icon {
  width: 17px;
  height: 17px;
  transition: transform var(--ph-fast);
}

@media (hover:hover) and (pointer:fine) {
  .home82-text-link:hover { color: var(--ph-brand-text); }
  .home82-text-link:hover .paz-icon { transform: translateX(3px); }
}

/* ---------- Hero ---------- */
.home82-hero {
  padding: clamp(20px, 3vw, 34px) 0 clamp(42px, 6vw, 72px);
  background:
    radial-gradient(circle at 8% 8%, rgba(255,79,168,.10), transparent 27%),
    radial-gradient(circle at 92% 84%, rgba(244,134,52,.08), transparent 24%),
    var(--ph-bg);
}

.home82-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, .78fr);
  align-items: center;
  gap: clamp(32px, 7vw, 92px);
}

.home82-hero__copy {
  min-width: 0;
  padding-block: clamp(14px, 3vw, 32px);
}

.home82-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}

.home82-brand-lockup .ph-wordmark b { font-size: 1.45rem; }
.home82-brand-lockup .ph-wordmark em { font-size: 1.15rem; }
.home82-brand-lockup .ph-brand-pill { min-height: 20px; padding-inline: 9px; }

.home82-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ph-text);
  font-family: var(--ph-font-sans);
  font-size: clamp(2.65rem, 6.1vw, 5.7rem);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.075em;
  text-wrap: balance;
}

.home82-hero__lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--ph-text-soft);
  font-size: clamp(.94rem, 1.5vw, 1.08rem);
  line-height: 1.72;
}

.home82-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.home82-hero__actions .btn {
  min-height: 48px;
  padding-inline: 22px;
}

.home82-hero__local {
  margin: 18px 0 0;
  color: var(--ph-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.home82-hero__media {
  position: relative;
  min-width: 0;
  height: min(68vh, 620px);
  min-height: 480px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--ph-surface-muted);
  box-shadow: var(--ph-shadow-md);
}

.home82-hero__media::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(25,23,28,.14));
}

.home82-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.home82-hero__tag {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--ph-radius-pill);
  background: rgba(255,255,255,.88);
  color: var(--ph-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

/* ---------- Rail compartido ---------- */
.home82-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -8px 0 14px;
}

.home82-rail-head > span {
  color: var(--ph-text-muted);
  font-size: 11px;
}

.home82-rail-actions {
  display: flex;
  gap: 8px;
}

.home82-rail-actions button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid var(--ph-border);
  border-radius: 50%;
  background: var(--ph-surface);
  color: var(--ph-text);
  cursor: pointer;
  transition: background-color var(--ph-fast), border-color var(--ph-fast), opacity var(--ph-fast);
}

.home82-rail-actions button:first-child .paz-icon { transform: rotate(180deg); }
.home82-rail-actions button .paz-icon { width: 18px; height: 18px; }
.home82-rail-actions button:disabled { opacity: .32; cursor: default; }

@media (hover:hover) and (pointer:fine) {
  .home82-rail-actions button:not(:disabled):hover {
    border-color: var(--ph-brand-border);
    background: var(--ph-brand-soft);
  }
}

/* ---------- Categorías ---------- */
.home82-categories {
  padding-top: 34px;
  background: var(--ph-surface);
  border-top: 1px solid rgba(234,223,230,.72);
  border-bottom: 1px solid rgba(234,223,230,.72);
}

.home82-category-rail,
.home82-brand-rail {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
  padding: 3px 2px 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 2px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ph-border-strong) transparent;
}

.home82-category-card {
  display: flex;
  flex: 0 0 148px;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 17px 12px 15px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  background: var(--ph-bg);
  color: var(--ph-text);
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform var(--ph-fast), border-color var(--ph-fast), background-color var(--ph-fast);
}

.home82-category-card__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
}

.home82-category-card__icon > svg { width: 34px; height: 34px; }
.home82-category-card__icon > img { width: 100%; height: 100%; object-fit: cover; }

.home82-category-card__name {
  display: -webkit-box;
  min-height: 2.5em;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home82-category-card__count {
  margin-top: 8px;
  color: var(--ph-text-muted);
  font-size: 10px;
}

@media (hover:hover) and (pointer:fine) {
  .home82-category-card:hover {
    transform: translateY(-3px);
    border-color: var(--ph-brand-border);
    background: var(--ph-surface);
  }
}

/* ---------- Productos principales ---------- */
.home82-products { background: var(--ph-bg); }
.home82-product-grid { gap-block: 28px; }
.home82-mobile-action { display: none; margin-top: 26px; text-align: center; }

/* ---------- Beneficios ---------- */
.home82-benefits {
  padding-block: 10px 46px;
  background: var(--ph-bg);
}

.home82-benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  background: var(--ph-surface);
}

.home82-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 22px 24px;
}

.home82-benefit + .home82-benefit { border-left: 1px solid var(--ph-border); }

.home82-benefit__icon {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
}

.home82-benefit__icon .paz-icon { width: 21px; height: 21px; }
.home82-benefit div { min-width: 0; }
.home82-benefit strong,
.home82-benefit span { display: block; }
.home82-benefit strong { color: var(--ph-text); font-size: 12px; line-height: 1.35; }
.home82-benefit div > span { margin-top: 3px; color: var(--ph-text-muted); font-size: 10px; line-height: 1.45; }

/* ---------- Más vendidos ---------- */
.home82-best {
  background: var(--ph-surface);
  border-block: 1px solid rgba(234,223,230,.72);
}

.home82-product-rail {
  display: grid;
}

/* ---------- Feature editorial ---------- */
.home82-editorial { background: var(--ph-bg); }

.home82-editorial-card {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  overflow: hidden;
  border: 1px solid var(--ph-border);
  border-radius: 28px;
  background: var(--ph-surface);
  box-shadow: var(--ph-shadow-sm);
}

.home82-editorial-card__media {
  min-height: 420px;
  background: var(--ph-surface-muted);
}

.home82-editorial-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home82-editorial-card__placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,79,168,.20), transparent 30%),
    radial-gradient(circle at 75% 72%, rgba(244,134,52,.17), transparent 28%),
    var(--ph-surface-soft);
  color: var(--ph-text);
}

.home82-editorial-card__placeholder span {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -.07em;
}
.home82-editorial-card__placeholder em {
  color: var(--ph-orange);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-style: italic;
  font-weight: 600;
}

.home82-editorial-card__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(32px, 5vw, 70px);
}

.home82-editorial-card__copy > p:not(.home82-eyebrow) {
  max-width: 540px;
  margin: 16px 0 24px;
  color: var(--ph-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- Marcas ---------- */
.home82-brands { background: var(--ph-surface); }

.home82-brand-card {
  display: grid;
  flex: 0 0 190px;
  min-height: 132px;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-md);
  background: var(--ph-bg);
  color: var(--ph-text);
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
  transition: border-color var(--ph-fast), background-color var(--ph-fast), transform var(--ph-fast);
}

.home82-brand-card__logo {
  display: grid;
  width: 100%;
  min-height: 70px;
  place-items: center;
  padding: 8px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.home82-brand-card__logo img {
  display: block;
  width: auto;
  max-width: 138px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.home82-brand-card__logo strong {
  font-size: 15px;
  line-height: 1.2;
}

.home82-brand-card > span:last-child {
  color: var(--ph-text-muted);
  font-size: 10px;
}

@media (hover:hover) and (pointer:fine) {
  .home82-brand-card:hover {
    transform: translateY(-2px);
    border-color: var(--ph-brand-border);
    background: var(--ph-surface);
  }
}

/* ---------- Comunidad / ruleta ---------- */
.home82-community {
  padding: clamp(24px, 5vw, 54px) 0;
  background: var(--ph-surface);
}

.home82-community-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--ph-brand-border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,79,168,.13), transparent 26%),
    linear-gradient(135deg, #fff8fb, #fff);
}

.home82-community-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--ph-brand);
  color: var(--ph-text);
}
.home82-community-card__icon .paz-icon { width: 29px; height: 29px; }

.home82-community-card__copy { min-width: 0; }
.home82-community-card__copy h2 { font-size: clamp(1.4rem, 2.7vw, 2.15rem); }
.home82-community-card__copy > p:not(.home82-eyebrow) {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--ph-text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.home82-community-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.home82-community-card__actions .btn { white-space: nowrap; }

/* ---------- Historia ---------- */
.home82-story {
  padding: clamp(54px, 8vw, 96px) 0;
  border-top: 1px solid rgba(234,223,230,.75);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,79,168,.09), transparent 32%),
    var(--ph-bg);
  text-align: center;
}

.home82-story__inner {
  display: flex;
  max-width: 760px;
  flex-direction: column;
  align-items: center;
}

.home82-story__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--ph-brand-soft);
  color: var(--ph-coral);
}
.home82-story__mark .paz-icon { width: 22px; height: 22px; fill: currentColor; }

.home82-story__inner > p:not(.home82-eyebrow):not(.home82-story__signature) {
  max-width: 660px;
  margin: 18px auto 0;
  color: var(--ph-text-soft);
  font-size: clamp(.9rem, 1.5vw, 1.02rem);
  line-height: 1.8;
}

.home82-story__signature {
  margin: 12px 0 22px;
  color: var(--ph-brand-text);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Focus ---------- */
.paz-home-refresh :focus-visible {
  outline: 3px solid var(--ph-brand-text);
  outline-offset: 3px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .home82-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
    gap: 34px;
  }

  .home82-hero h1 { font-size: clamp(2.55rem, 6vw, 4.2rem); }
  .home82-hero__media { min-height: 430px; height: min(58vh, 520px); }

  .home82-benefit { padding: 18px; }
  .home82-benefit__icon { flex-basis: 40px; width: 40px; height: 40px; }

  .home82-community-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .home82-community-card__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 82px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .home82-section { padding-block: 42px; }

  .home82-section-heading {
    align-items: start;
    margin-bottom: 19px;
  }

  .home82-section-heading .home82-text-link { display: none; }
  .home82-section-heading h2 { font-size: clamp(1.55rem, 7.5vw, 2.15rem); }
  .home82-section-heading p:not(.home82-eyebrow) { margin-top: 8px; font-size: 12px; }

  .home82-hero {
    padding: 18px 0 34px;
  }

  .home82-hero__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home82-hero__copy {
    padding: 6px 0 0;
  }

  .home82-brand-lockup { margin-bottom: 17px; }
  .home82-brand-lockup .ph-wordmark b { font-size: 1.25rem; }
  .home82-brand-lockup .ph-wordmark em { font-size: 1rem; }

  .home82-hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 12vw, 3.5rem);
    line-height: .98;
  }

  .home82-hero__lead {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.62;
  }

  .home82-hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
  }

  .home82-hero__actions .btn {
    min-width: 0;
    min-height: 46px;
    padding-inline: 11px;
    font-size: 11px;
  }

  .home82-hero__local { margin-top: 13px; font-size: 10px; }

  .home82-hero__media {
    min-height: 0;
    height: clamp(270px, 39svh, 330px);
    border-radius: 20px;
    box-shadow: var(--ph-shadow-sm);
  }

  .home82-hero__tag { right: 12px; bottom: 12px; min-height: 28px; padding: 6px 10px; font-size: 9px; }

  .home82-categories { padding-top: 36px; }
  .home82-rail-head { margin-bottom: 11px; }
  .home82-rail-head > span { font-size: 10px; }
  .home82-rail-actions button { width: 40px; height: 40px; min-width: 40px; }

  .home82-category-rail,
  .home82-brand-rail {
    margin-inline: calc(var(--ph-gutter) * -1);
    padding-inline: var(--ph-gutter);
    scrollbar-width: none;
  }
  .home82-category-rail::-webkit-scrollbar,
  .home82-brand-rail::-webkit-scrollbar,
  .home82-product-rail::-webkit-scrollbar { display: none; }

  .home82-category-card { flex-basis: 132px; padding: 14px 10px; }
  .home82-category-card__icon { width: 60px; height: 60px; margin-bottom: 10px; }
  .home82-category-card__icon > svg { width: 30px; height: 30px; }
  .home82-category-card__name { font-size: 11px; }
  .home82-category-card__count { font-size: 9px; }

  .home82-product-grid { gap: 22px 10px; }
  .home82-mobile-action { display: block; }

  .home82-benefits { padding: 0 0 38px; }
  .home82-benefits__grid {
    grid-template-columns: 1fr;
    border-radius: var(--ph-radius-md);
  }
  .home82-benefit { padding: 15px 16px; }
  .home82-benefit + .home82-benefit { border-top: 1px solid var(--ph-border); border-left: 0; }
  .home82-benefit strong { font-size: 11px; }
  .home82-benefit div > span { font-size: 9.5px; }

  .home82-rail-head--products { margin-top: -4px; }
  .home82-product-rail {
    display: flex;
    gap: 12px;
    margin-inline: calc(var(--ph-gutter) * -1);
    padding: 2px var(--ph-gutter) 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .home82-product-rail > .product-card {
    flex: 0 0 min(62vw, 230px);
    scroll-snap-align: start;
  }

  .home82-editorial-card { grid-template-columns: 1fr; border-radius: 20px; }
  .home82-editorial-card__media,
  .home82-editorial-card__placeholder { min-height: 280px; max-height: 360px; }
  .home82-editorial-card__copy { padding: 26px 20px; }
  .home82-editorial-card__copy > p:not(.home82-eyebrow) { margin: 12px 0 20px; font-size: 12px; }

  .home82-brand-card { flex-basis: 155px; min-height: 112px; padding: 13px; }
  .home82-brand-card__logo { min-height: 48px; }
  .home82-brand-card__logo img { max-width: 110px; max-height: 46px; }
  .home82-brand-card__logo strong { font-size: 13px; }

  .home82-community { padding: 22px 0 42px; }
  .home82-community-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 16px;
    border-radius: 20px;
  }
  .home82-community-card__icon { width: 48px; height: 48px; border-radius: 15px; }
  .home82-community-card__icon .paz-icon { width: 22px; height: 22px; }
  .home82-community-card__copy h2 { font-size: 1.3rem; }
  .home82-community-card__copy > p:not(.home82-eyebrow) { font-size: 11px; }
  .home82-community-card__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    padding-left: 0;
  }
  .home82-community-card__actions .btn { width: 100%; justify-content: center; }

  .home82-story { padding-block: 58px; }
  .home82-story__mark { width: 48px; height: 48px; }
}

@media (max-width: 359px) {
  .home82-hero__actions { grid-template-columns: 1fr; }
  .home82-hero__media { height: 265px; }
  .home82-category-card { flex-basis: 124px; }
  .home82-product-rail > .product-card { flex-basis: 214px; }
}

@media (min-width: 768px) {
  .home82-products .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home82-best .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1180px) {
  .home82-products .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .paz-home-refresh *,
  .paz-home-refresh *::before,
  .paz-home-refresh *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* F5 ajuste de densidad mobile: el contenido exploratorio debe asomar
   dentro del primer viewport sin convertir la home en un hero gigante. */
@media (max-width: 767px) {
  .home82-brand-lockup { display: none; }
  .home82-hero { padding-top: 15px; padding-bottom: 24px; }
  .home82-hero h1 { font-size: clamp(2.05rem, 10.5vw, 2.85rem); letter-spacing: -.06em; }
  .home82-hero__lead { margin-top: 11px; font-size: 12.5px; line-height: 1.55; }
  .home82-hero__actions { margin-top: 16px; }
  .home82-hero__local { display: none; }
  .home82-hero__media { height: clamp(220px, 30svh, 260px); }
}
