/* Poopy product page — Apple-style high-end AI health product */

:root {
  --product-bg: #fff;
  --product-black: #1d1d1f;
  --product-gray: #424245;
  --product-gray-light: #86868b;
  --product-border: #d2d2d7;
  --product-max: 980px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-size-hero: clamp(2.5rem, 8vw, 4rem);
  --font-size-lead: clamp(1.125rem, 2.5vw, 1.375rem);
}

.poopy-page {
  font-family: var(--font-display);
  background: var(--product-bg);
  color: var(--product-black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Minimal header — sticky on all pages so it stays in the same place when scrolling */
.product-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--product-bg);
  border-bottom: 1px solid var(--product-border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.poopy-page .product-header {
  max-width: var(--product-max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poopy-page .product-header .brand {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.poopy-page .product-header .brand a {
  color: var(--product-black);
  text-decoration: none;
}

.product-header .brand-logo {
  height: 1.75rem;
  width: auto;
  display: block;
  vertical-align: middle;
}

.poopy-page .product-header .view-more {
  font-size: 0.9375rem;
  color: var(--product-gray-light);
  text-decoration: none;
}

.poopy-page .product-header .view-more:hover {
  color: var(--product-black);
  text-decoration: underline;
}

.poopy-page .product-header .view-more + .view-more {
  margin-left: 1rem;
}

/* Site nav: Poopy, Learn, Poopy App */
.product-header .site-nav {
  display: flex;
  align-items: center;
  gap: 0 1.25rem;
}

.product-header .site-nav a {
  font-size: 0.9375rem;
  color: var(--product-gray-light);
  text-decoration: none;
}

.product-header .site-nav a:hover {
  color: var(--product-black);
  text-decoration: underline;
}

/* Hero — only 360° product + minimal words (Apple-style) */
.poopy-hero {
  max-width: var(--product-max);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.poopy-hero .product-name {
  font-size: var(--font-size-hero);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.poopy-hero .product-model {
  font-size: var(--font-size-lead);
  color: var(--product-gray);
  font-weight: 400;
  margin-bottom: 2.5rem;
}

.poopy-rotator-wrap {
  position: relative;
  margin: 0 auto 1.25rem;
  max-width: 440px;
  width: 100%;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

/* 3D viewer (GLB) */
.poopy-viewer-3d {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #fafafa;
}

.poopy-viewer-3d canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.poopy-viewer-fallback {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.poopy-viewer-fallback .rotator-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding-bottom: 0;
}

.poopy-viewer-fallback .frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88%;
  max-width: 340px;
  height: 88%;
  max-height: 340px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poopy-viewer-fallback .frame.active {
  opacity: 1;
  z-index: 1;
}

.poopy-viewer-fallback .frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.poopy-viewer-hint {
  font-size: 0.8125rem;
  color: var(--product-gray-light);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.poopy-rotator-wrap:active {
  cursor: grabbing;
}

.poopy-rotator-wrap .rotator-inner {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
}

.poopy-rotator-wrap .rotator-inner {
  perspective: 1200px;
}

.poopy-rotator-wrap .rotator-inner--3d {
  perspective: 1000px;
}

.poopy-rotator-wrap .rotator-inner--3d img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 85%;
  max-width: 320px;
  height: auto;
  transform: translate(-50%, -50%) rotateY(0deg);
  transform-style: preserve-3d;
  transform-origin: center center;
  pointer-events: none;
  backface-visibility: visible;
  transition: none;
}

.poopy-rotator-wrap .rotator-inner .frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88%;
  max-width: 340px;
  height: 88%;
  max-height: 340px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poopy-rotator-wrap .rotator-inner .frame.active {
  opacity: 1;
  z-index: 1;
}

.poopy-rotator-wrap .rotator-inner .frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.poopy-rotator-arc {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.poopy-rotator-arc .arc-dots {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 22px;
}

.poopy-rotator-arc .arc-dots span {
  width: 4px;
  background: var(--product-gray-light);
  border-radius: 2px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.poopy-rotator-arc .arc-dots span:nth-child(1) { height: 6px; }
.poopy-rotator-arc .arc-dots span:nth-child(2) { height: 10px; }
.poopy-rotator-arc .arc-dots span:nth-child(3) { height: 14px; }
.poopy-rotator-arc .arc-dots span:nth-child(4) { height: 18px; }
.poopy-rotator-arc .arc-dots span:nth-child(5) { height: 14px; }
.poopy-rotator-arc .arc-dots span:nth-child(6) { height: 10px; }
.poopy-rotator-arc .arc-dots span:nth-child(7) { height: 6px; }

.poopy-hero .hero-tagline {
  font-size: var(--font-size-lead);
  color: var(--product-gray);
  max-width: 420px;
  margin: 2rem auto 2rem;
  line-height: 1.45;
  font-weight: 400;
}

.poopy-hero .hero-tagline--stillness {
  margin-bottom: 0.5rem;
}

.poopy-hero .cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--product-black);
  background: transparent;
  border: 1px solid var(--product-black);
  border-radius: 980px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.poopy-hero .cta-btn:hover {
  background: var(--product-black);
  color: var(--product-bg);
}

/* Details — handbook content + products */
.poopy-details {
  max-width: var(--product-max);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.poopy-details .section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.poopy-details .section-intro {
  font-size: 1.25rem;
  color: var(--product-gray);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.5;
}

/* Handbook blocks */
.poopy-handbook {
  margin-bottom: 4rem;
}

.poopy-handbook h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.poopy-handbook p,
.poopy-handbook li {
  font-size: 1.0625rem;
  color: var(--product-gray);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.poopy-handbook ul {
  list-style: none;
  padding-left: 0;
}

.poopy-handbook ul li {
  padding-left: 1.5rem;
  position: relative;
}

.poopy-handbook ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--product-black);
}

.poopy-handbook .spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.poopy-handbook .spec-table th,
.poopy-handbook .spec-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--product-border);
  text-align: left;
}

.poopy-handbook .spec-table th {
  font-weight: 600;
  color: var(--product-black);
  width: 40%;
}

.poopy-handbook .spec-table td {
  color: var(--product-gray);
}

.poopy-handbook .steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.poopy-handbook .steps li {
  counter-increment: step;
  padding-left: 2.5rem;
  position: relative;
}

.poopy-handbook .steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--product-black);
}

/* FAQ */
/* Scroll target: leave room for sticky header when linking to #faq */
#faq {
  scroll-margin-top: 5rem;
}

.poopy-faq .faq-item {
  border-bottom: 1px solid var(--product-border);
  margin-bottom: 0;
}

.poopy-faq .faq-item:last-child {
  border-bottom: none;
}

.poopy-faq .faq-question {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--product-black);
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  display: block;
}

.poopy-faq .faq-question::-webkit-details-marker {
  display: none;
}

.poopy-faq .faq-question::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  color: var(--product-gray-light);
  font-weight: 400;
}

.poopy-faq .faq-item[open] .faq-question::before {
  content: "−";
}

.poopy-faq .faq-answer {
  font-size: 1rem;
  color: var(--product-gray);
  line-height: 1.6;
  margin: 0 0 1rem 1.25rem;
  padding-left: 0;
}

/* Products */
.poopy-collect-intro {
  font-size: 1.125rem;
  color: var(--product-gray);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

/* Product picker — three cards on the Poopy landing */
.poopy-product-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: var(--product-max);
}

.poopy-product-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.poopy-product-card-wrap .poopy-product-card {
  flex: 1;
}

.card-preorder {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--product-black);
  text-decoration: none;
  border: 1px solid var(--product-black);
  padding: 0.5rem 1rem;
  border-radius: 980px;
  text-align: center;
  align-self: flex-start;
}

.card-preorder:hover {
  background: var(--product-black);
  color: var(--product-bg);
}

.product-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.product-price-row .product-price-block {
  margin-bottom: 0;
}

.preorder-btn-inline {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--product-black);
  background: transparent;
  border: 1px solid var(--product-border);
  border-radius: 980px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.preorder-btn-inline:hover {
  border-color: var(--product-black);
}

.poopy-faq .back {
  font-size: 0.9375rem;
  color: var(--product-gray-light);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: 500;
}

.poopy-faq .back:hover {
  color: var(--product-black);
}

.poopy-product-card {
  display: block;
  text-decoration: none;
  color: var(--product-black);
  background: var(--product-bg);
  border: 1px solid var(--product-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.poopy-product-card:hover {
  border-color: var(--product-gray-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.poopy-product-card .card-name {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.poopy-product-card .card-desc {
  font-size: 1rem;
  color: var(--product-gray);
  line-height: 1.45;
}

.poopy-product-card .card-thumb {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.25rem;
  object-fit: contain;
}

.poopy-product-section {
  scroll-margin-top: 5rem;
}

.product-section-back {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--product-gray-light);
  text-decoration: none;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.product-section-back:hover {
  color: var(--product-black);
  text-decoration: underline;
}

.poopy-product-section .poopy-viewer-3d,
.poopy-product-section .poopy-viewer-fallback {
  margin: 1.5rem auto;
}

.poopy-product-section .poopy-viewer-hint {
  margin-bottom: 1.5rem;
}

.poopy-products-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 3rem 0 2rem;
}

.poopy-product-block {
  margin-bottom: 3.5rem;
}

/* Apple-style pricing */
.product-price-block {
  margin-bottom: 1.5rem;
}

.product-price-block--single {
  margin-top: 0.5rem;
}

.price-main {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--product-black);
  line-height: 1.1;
}

.product-price-block--options {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.75rem;
  max-width: 28rem;
}

.price-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.price-option:last-child {
  border-bottom: none;
}

.price-option-label {
  font-size: 0.9375rem;
  color: var(--product-gray);
  line-height: 1.35;
}

.price-option-value {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--product-black);
  flex-shrink: 0;
}

.poopy-product-block h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.poopy-product-block .product-desc {
  font-size: 1.0625rem;
  color: var(--product-gray);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.poopy-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.poopy-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--product-border);
}

.poopy-gallery--original img {
  border: none;
  object-fit: contain;
}

/* Poopy Original: mascots and use-case images in one row */
#poopy-original .poopy-gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#poopy-original .poopy-gallery img {
  max-width: 100%;
}

#poopy-original .poopy-use-cases .gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#poopy-original .poopy-use-cases .gallery img {
  max-width: 100%;
}

/* Poopy Mini: use-case images in one row (5 images) */
#poopy-mini .poopy-use-cases .gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#poopy-mini .poopy-use-cases .gallery img {
  max-width: 100%;
}

.poopy-product-block .single-shot {
  max-width: 300px;
  margin-top: 1rem;
  margin-left: auto;
  margin-right: auto;
}

.poopy-product-block .single-shot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--product-border);
}

.poopy-product-block .single-shot--no-border img {
  border: none;
  object-fit: contain;
}

.poopy-use-cases {
  margin-top: 2rem;
}

.poopy-use-cases h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.poopy-use-cases .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.poopy-use-cases .gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--product-border);
}

/* Footer */
.poopy-page .product-footer {
  max-width: var(--product-max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--product-border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--product-gray-light);
}

.poopy-page .product-footer a {
  color: var(--product-gray);
  text-decoration: none;
}

.poopy-page .product-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .poopy-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .poopy-use-cases .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
