/* ============================================================
   The Butcher Shoppe — Products Page Crown Jewel Polish
   Additive premium showcase layer. Loaded after products.css.
   ============================================================ */

/* ---------- JS-ready gate: only hide elements when our JS runs ---------- */
.pp-js-ready .page-header__content > *,
.pp-js-ready .product-hero .product-hero__body > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

/* ---------- Page header: cinematic case showcase ---------- */
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.07'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 75% 20%,
    rgba(212, 160, 86, 0.14) 0%,
    transparent 55%
  );
}

.page-header__media img {
  filter: saturate(0.9) contrast(1.08) brightness(0.72);
  transform: scale(1.06);
  transition: transform 1.4s var(--ease-out);
}

.page-header.is-loaded .page-header__media img {
  transform: scale(1);
}

.page-header__overlay {
  background: linear-gradient(
    180deg,
    rgba(12, 12, 12, 0.5) 0%,
    rgba(12, 12, 12, 0.62) 55%,
    rgba(12, 12, 12, 0.86) 100%
  );
}

/* Page-header copy entrance */
.page-header.is-loaded .page-header__content > * {
  opacity: 1;
  transform: translateY(0);
}

.page-header.is-loaded .page-header__content > *:nth-child(1) { transition-delay: 0ms; }
.page-header.is-loaded .page-header__content > *:nth-child(2) { transition-delay: 90ms; }
.page-header.is-loaded .page-header__content > *:nth-child(3) { transition-delay: 180ms; }
.page-header.is-loaded .page-header__content > *:nth-child(4) { transition-delay: 270ms; }
.page-header.is-loaded .page-header__content > *:nth-child(5) { transition-delay: 360ms; }

.page-header .display-headline {
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- Primary CTA glow ---------- */
.btn--primary {
  transition: transform 0.25s var(--ease-out),
              background 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  box-shadow: 0 10px 28px rgba(201, 58, 58, 0.28),
              0 0 0 3px rgba(212, 160, 86, 0.18);
}

/* ---------- Category strip: glass rail ---------- */
.category-strip {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(12, 12, 12, 0.06);
  box-shadow: 0 4px 20px rgba(12, 12, 12, 0.06);
}

.category-strip ul {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: var(--space-sm);
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0;
}

.category-strip ul::-webkit-scrollbar {
  display: none;
}

.category-strip a {
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.25s var(--ease-out),
              background 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out),
              transform 0.25s var(--ease-out);
}

.category-strip a::after {
  content: '';
  position: absolute;
  bottom: 0.35rem;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.category-strip a:hover,
.category-strip a:focus-visible {
  color: var(--ember);
  background: rgba(201, 58, 58, 0.06);
  border-color: rgba(201, 58, 58, 0.18);
  transform: translateY(-1px);
}

.category-strip a:hover::after,
.category-strip a:focus-visible::after {
  transform: scaleX(1);
}

.category-strip a.is-active {
  color: var(--white);
  background: var(--ember);
  border-color: var(--ember);
}

.category-strip a.is-active::after {
  background: var(--amber);
  transform: scaleX(0);
}

.category-strip a.is-active:hover,
.category-strip a.is-active:focus-visible {
  background: var(--ember-dark);
  border-color: var(--ember-dark);
}

/* ---------- Product sections: reveal + hover lift ---------- */
.product-hero {
  align-items: stretch;
}

.product-hero__media {
  transition: box-shadow 0.5s var(--ease-out),
              transform 0.5s var(--ease-out);
  will-change: transform;
}

.product-hero__media:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

.product-hero__media img {
  transition: transform 0.9s var(--ease-out);
}

.product-hero__media:hover img {
  transform: scale(1.04);
}

/* Body children stagger reveal (parent is data-reveal="stagger") */
.pp-js-ready .product-hero.is-visible .product-hero__body > * {
  opacity: 1;
  transform: translateY(0);
}

.product-hero.is-visible .product-hero__body > *:nth-child(1) { transition-delay: 120ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(2) { transition-delay: 200ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(3) { transition-delay: 280ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(4) { transition-delay: 360ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(5) { transition-delay: 440ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(6) { transition-delay: 520ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(7) { transition-delay: 600ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(8) { transition-delay: 680ms; }
.product-hero.is-visible .product-hero__body > *:nth-child(9) { transition-delay: 760ms; }

/* Premium stamp should not stretch full width inside flex body */
.premium-stamp {
  align-self: flex-start;
}

/* Case label refinement */
.case-card__label {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* Tags & panels */
.case-tags li {
  transition: background 0.2s var(--ease-out),
              border-color 0.2s var(--ease-out),
              transform 0.2s var(--ease-out);
}

.case-tags li:hover {
  background: rgba(12, 12, 12, 0.08);
  border-color: rgba(201, 58, 58, 0.22);
  transform: translateY(-1px);
}

.case-panel {
  box-shadow: 0 6px 22px rgba(12, 12, 12, 0.05);
  transition: box-shadow 0.3s var(--ease-out),
              transform 0.3s var(--ease-out);
}

.case-panel:hover {
  box-shadow: 0 10px 30px rgba(12, 12, 12, 0.08);
  transform: translateY(-2px);
}

.ask-counter {
  transition: background 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out),
              transform 0.3s var(--ease-out);
}

.ask-counter:hover {
  background: rgba(201, 58, 58, 0.07);
  transform: translateY(-2px);
}

/* ---------- Cut-map framing (no cut-map internals touched) ---------- */
.cow-cut-map {
  position: relative;
}

.cow-cut-map__intro {
  position: relative;
  z-index: 1;
}

/* ---------- Custom cuts dark section ---------- */
.products-page .section--dark .bring-card {
  transition: background 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out),
              transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
}

.products-page .section--dark .bring-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 160, 86, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.products-page .section--dark .preview__visual {
  transition: box-shadow 0.5s var(--ease-out),
              transform 0.5s var(--ease-out);
}

.products-page .section--dark .preview__visual:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.products-page .section--dark .preview__visual img {
  transition: transform 0.9s var(--ease-out);
}

.products-page .section--dark .preview__visual:hover img {
  transform: scale(1.04);
}

.products-page .section--dark .preview__list li::before {
  transform: scale(0);
  opacity: 0;
  transition: transform 0.4s var(--ease-out),
              opacity 0.4s var(--ease-out);
}

.products-page .section--dark .preview__list.is-visible li::before {
  transform: scale(1);
  opacity: 1;
}

.products-page .section--dark .preview__list.is-visible li:nth-child(1)::before { transition-delay: 0ms; }
.products-page .section--dark .preview__list.is-visible li:nth-child(2)::before { transition-delay: 90ms; }
.products-page .section--dark .preview__list.is-visible li:nth-child(3)::before { transition-delay: 180ms; }
.products-page .section--dark .preview__list.is-visible li:nth-child(4)::before { transition-delay: 270ms; }

/* ---------- CTA banner polish ---------- */
.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(212, 160, 86, 0.06) 48%,
    rgba(255, 248, 240, 0.08) 52%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  opacity: 0;
  animation: pp-cta-sweep 10s var(--ease-in-out) infinite;
}

@keyframes pp-cta-sweep {
  0%, 100% {
    opacity: 0;
    background-position: 200% 0;
  }
  45% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  55% {
    opacity: 0;
  }
}

.cta-banner .container {
  position: relative;
  z-index: 1;
}

/* ---------- Mobile simplification ---------- */
@media (max-width: 768px) {
  .page-header::before,
  .page-header::after,
  .cta-banner::after {
    animation: none !important;
  }

  .page-header__media img {
    transform: scale(1);
  }

  .product-hero__media:hover,
  .products-page .section--dark .preview__visual:hover,
  .products-page .section--dark .bring-card:hover,
  .case-panel:hover,
  .ask-counter:hover {
    transform: none;
  }

  .product-hero__media:hover img,
  .products-page .section--dark .preview__visual:hover img {
    transform: scale(1.02);
  }

  .category-strip a::after {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp-js-ready .page-header__content > *,
  .pp-js-ready .product-hero .product-hero__body > *,
  .page-header.is-loaded .page-header__content > *,
  .product-hero.is-visible .product-hero__body > *,
  .page-header__media img,
  .product-hero__media,
  .product-hero__media img,
  .case-tags li,
  .case-panel,
  .ask-counter,
  .products-page .section--dark .bring-card,
  .products-page .section--dark .preview__visual,
  .products-page .section--dark .preview__visual img,
  .products-page .section--dark .preview__list li::before,
  .cta-banner::after,
  .btn--primary {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }
}
