/* =========================================================
   Kosmoz — Product detail page (e.g. espacia.html)
   Loaded after style.css; reuses its tokens, header, footer.
   ========================================================= */

.product-page {
  --pd-panel: #F4F4F4;
  --pd-card: #F1F1F1;
  --pd-night: #0b0b1d;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.pd-hero {
  padding-top: calc(var(--header-h) + 30px);
}

.pd-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}

.pd-crumbs li + li::before {
  content: '/';
  margin: 0 10px;
  color: var(--soft-text);
}

.pd-crumbs a {
  transition: color .3s;
}

.pd-crumbs a:hover {
  color: var(--pink);
}

.pd-crumbs [aria-current] {
  color: var(--ink);
}

/* =========================================================
   HERO PANEL
   ========================================================= */
.pd-hero-panel {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: clamp(20px, 2.4vw, 30px);
  background: #F7F7F7;
}

.pd-hero-copy {
  padding: clamp(12px, 2.4vw, 28px) 0 clamp(8px, 1.6vw, 20px) clamp(4px, 1.8vw, 16px);
}

.pd-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-brand-mark {
  width: 32px;
  height: 32px;
}

.pd-brand-name {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -.01em;
  color: #2a2a30;
  line-height: 1;
}

.pd-kicker {
  margin-top: 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pd-title {
  margin-top: clamp(16px, 2vw, 26px);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.32;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--ink);
}

.pd-lead {
  margin-top: clamp(16px, 2vw, 26px);
  max-width: 520px;
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  color: var(--muted);
}

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(24px, 2.6vw, 36px);
}

.pd-actions .btn {
  height: 52px;
  padding: 0 40px;
  border-radius: 999px;
  font-size: 15px;
}

.pd-btn-pink {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 12px 30px -14px rgba(226, 13, 121, .8);
}

.pd-btn-pink:hover {
  background: var(--pink-3);
  box-shadow: 0 18px 40px -14px rgba(226, 13, 121, .85);
}

.pd-btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.pd-btn-ghost:hover {
  border-color: var(--ink);
}

.pd-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- product visual ---------- */
.pd-visual {
  position: relative;
  aspect-ratio: 580 / 470;
  border-radius: clamp(16px, 1.8vw, 22px);
  overflow: hidden;
  background: linear-gradient(160deg, #efe4da 0%, #e9ddd2 55%, #e3d6ca 100%);
  isolation: isolate;
}

/* real product preview image: fill the column, let height follow the image */
.pd-visual:has(> img) {
  aspect-ratio: auto;
  background: none;
}

.pd-visual > img {
  display: block;
  width: 100%;
  height: auto;
}

.pd-visual-orb {
  position: absolute;
  left: 50%;
  top: 2%;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #c9c3ef, #b9b2e6 70%);
  transform: translateX(-50%);
  z-index: -1;
}

.pd-laptop {
  position: absolute;
  left: 50%;
  top: 23%;
  width: 62%;
  transform: translateX(-50%);
  animation: pd-bob 7s ease-in-out infinite;
}

.pd-screen {
  display: flex;
  aspect-ratio: 16 / 10;
  padding: 3%;
  gap: 3%;
  border-radius: 10px 10px 4px 4px;
  background: #f7f7fa;
  border: 5px solid #ece9ec;
  box-shadow: 0 24px 50px -24px rgba(60, 40, 30, .45);
}

.pd-base {
  height: 12px;
  margin: 0 -8%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(#f3f1f2, #d9d4d4);
  box-shadow: 0 18px 30px -12px rgba(60, 40, 30, .4);
}

.pd-side {
  width: 7%;
  display: flex;
  flex-direction: column;
  gap: 9%;
  padding-top: 4px;
}

.pd-side i {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: #dcdbe6;
}

.pd-side i.on {
  background: #7177d6;
}

.pd-app {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6%;
  min-width: 0;
}

.pd-app-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(5px, .55vw, 8px);
}

.pd-app-top b {
  font-weight: 600;
  color: var(--ink);
  margin-right: auto;
}

.pd-app-top span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6d5e0;
}

.pd-app-top em {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e8a87c;
}

.pd-app-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 4%;
}

.pd-app-body small {
  display: block;
  font-size: clamp(4px, .45vw, 7px);
  color: var(--muted);
  margin-bottom: 5%;
}

.pd-dir,
.pd-att {
  padding: 6%;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(18, 18, 42, .05);
}

.pd-people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6%;
}

.pd-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8% 6%;
  border-radius: 5px;
  background: #f5f5fa;
}

.pd-person i {
  width: 80%;
  height: 3px;
  border-radius: 2px;
  background: #d9d8e3;
}

.pd-person i.s {
  width: 55%;
}

.pd-person u {
  width: 85%;
  height: 6px;
  margin-top: 4px;
  border-radius: 4px;
  background: #6e74d4;
}

/* simple illustrated avatars */
.pd-ava {
  position: relative;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #cfe0f5;
}

.pd-ava::before {
  /* head */
  content: '';
  position: absolute;
  left: 32%;
  top: 22%;
  width: 36%;
  height: 40%;
  border-radius: 45%;
  background: #f1c7a5;
  box-shadow: 0 -4px 0 1px var(--hair, #3b2a22);
}

.pd-ava::after {
  /* shoulders */
  content: '';
  position: absolute;
  left: 16%;
  bottom: -22%;
  width: 68%;
  height: 46%;
  border-radius: 50% 50% 0 0;
  background: var(--shirt, #34508f);
}

.pd-ava.a2 { background: #f6dfc9; --hair: #5a3a26; --shirt: #e0875a; }
.pd-ava.a3 { background: #f3d4dc; --hair: #2a1d18; --shirt: #b05f84; }

.pd-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.pd-cal i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #ececf2;
}

.pd-cal i.g { background: #9ad49a; }
.pd-cal i.p { background: var(--pink); }

.pd-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10%;
}

.pd-lines i {
  height: 3px;
  border-radius: 2px;
  background: #e3e2ec;
}

.pd-lines i:nth-child(2) { width: 75%; }
.pd-lines i:nth-child(3) { width: 50%; background: #6e74d4; height: 5px; }

/* floating tiles */
.pd-float {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  font-size: clamp(9px, .8vw, 11px);
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 16px 34px -18px rgba(60, 40, 30, .5);
}

.pd-badge svg {
  width: clamp(26px, 3vw, 40px);
  height: auto;
}

.pd-float-l {
  left: 10%;
  top: 40%;
  animation: pd-bob 6s ease-in-out -1.5s infinite;
}

.pd-float-r {
  right: 11%;
  top: 33%;
  animation: pd-bob 6.5s ease-in-out -3s infinite;
}

.pd-caption {
  position: absolute;
  left: 4.5%;
  right: 4.5%;
  bottom: 4.5%;
  padding: clamp(12px, 1.4vw, 18px) clamp(14px, 1.8vw, 24px);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px -20px rgba(60, 40, 30, .5);
}

.pd-caption strong {
  display: block;
  font-size: clamp(.9rem, 1.1vw, 1.05rem);
  font-weight: 500;
  color: var(--ink);
}

.pd-caption span {
  display: block;
  margin-top: 2px;
  font-size: clamp(10px, .8vw, 12px);
  color: var(--muted);
}

@keyframes pd-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* =========================================================
   INTRO / VALUES
   ========================================================= */
.pd-intro {
  padding: clamp(48px, 6vw, 72px) 0 clamp(24px, 3vw, 40px);
}

.pd-intro-grid {
  display: grid;
  grid-template-columns: 1.85fr repeat(3, 1fr);
}

/* variant with four highlights (e.g. Metlone) */
.pd-intro-grid--4 {
  grid-template-columns: 1.85fr repeat(4, .75fr);
}

.pd-intro-head {
  padding-right: clamp(24px, 4vw, 72px);
}

.pd-intro-head h2 {
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink);
}

.pd-intro-head p {
  margin-top: 20px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.6;
  color: #73716B;
}

.pd-value {
  padding: 4px clamp(16px, 1.6vw, 24px) 30px;
  border-left: 1px solid var(--line);
}

.pd-value h3 {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 500;
  color: var(--ink);
}

.pd-value p {
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.65;
  color:#73716B;
}

/* =========================================================
   FEATURES
   ========================================================= */
.pd-features {
  padding: clamp(32px, 4vw, 48px) 0 clamp(64px, 7vw, 68px);
}

.pd-features-head {
  margin-bottom: clamp(28px, 2.6vw, 36px);
}

.pd-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--pink);
}

.pd-h2 {
  margin-top: 16px;
  font-size: clamp(1.7rem, 2.75vw, 2.6rem);
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
}

.pd-sub {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}

.pd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.4vw, 22px);
}

/* variant with five cards: 3 on top, 2 wider below (e.g. Audiur) */
.pd-grid--5 {
  grid-template-columns: repeat(6, 1fr);
}

.pd-grid--5 > .pd-card {
  grid-column: span 2;
}

.pd-grid--5 > .pd-card:nth-child(n + 4) {
  grid-column: span 3;
}

.pd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 1.8vw, 26px) clamp(20px, 1.8vw, 24px) 22px;
  border-radius: 16px;
  background: var(--pd-card);
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform .5s var(--ease), background .4s, border-color .4s, box-shadow .5s var(--ease);
}

/* keep the scroll-reveal timing but add hover properties */
.js .pd-card[data-reveal] {
  transition: opacity 1s var(--ease) var(--d, 0s), transform .9s var(--ease),
    background .4s, border-color .4s, box-shadow .5s var(--ease);
}

.js .pd-card[data-reveal].visible:hover {
  transform: translateY(-4px);
}

.pd-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--pink-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}

.pd-card:hover {
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.pd-card:hover::before {
  transform: scaleX(1);
}

.pd-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--pink);
}

.pd-card h3 {
  margin-top: 18px;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: 500;
  color: var(--ink);
}

.pd-card p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.pd-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding-top: 26px;
  font-size: 12px;
  color: var(--ink);
}

.pd-tags li + li::before {
  content: '·';
  margin: 0 7px;
  color: var(--soft-text);
}

/* =========================================================
   CONNECT CTA
   ========================================================= */
.pd-connect {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(72px, 8vw, 116px) 0 clamp(72px, 8vw, 112px);
  color: #fff;
  background:
    radial-gradient(60% 80% at 92% 0%, rgba(226, 13, 121, .35), transparent 60%),
    radial-gradient(40% 60% at 70% 110%, rgba(123, 92, 255, .12), transparent 70%),
    var(--pd-night);
}

.pd-connect-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.pd-connect-art svg {
  width: 100%;
  height: 100%;
}

.pd-streak {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: pd-draw 6s var(--ease) forwards, pd-pulse 7s ease-in-out 6s infinite;
}

.pd-streak.s2 {
  animation-delay: .8s, 6.8s;
}

@keyframes pd-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes pd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.pd-star {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, .65), 0 0 26px 8px rgba(226, 13, 121, .55);
  animation: pd-twinkle 4s ease-in-out infinite;
}

.pd-star.st1 { left: 66%; top: 57%; }
.pd-star.st2 { left: 86%; top: 65%; width: 5px; height: 5px; animation-delay: -1.2s; }
.pd-star.st3 { left: 97%; top: 77%; width: 9px; height: 9px; background: #ff4d8d; animation-delay: -2.2s; }
.pd-star.st4 { left: 99.5%; top: 41%; width: 6px; height: 6px; background: #ff4d8d; animation-delay: -3s; }

@keyframes pd-twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.75); }
}

.pd-connect-inner {
  position: relative;
  padding-inline: calc(var(--gutter) + clamp(0px, 2vw, 40px));
}

.pd-connect-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}

.pd-connect-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.pd-connect-title {
  margin-top: 20px;
  font-size: clamp(2rem, 3.5vw, 3.3rem);
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: -.01em;
  color: #fff;
}

.pd-connect-text {
  margin-top: clamp(20px, 2.4vw, 34px);
  max-width: 660px;
  font-size: clamp(.95rem, 1.15vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
}

.pd-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(28px, 3vw, 44px);
}

.pd-connect-actions .btn {
  height: 64px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 17px;
  gap: 12px;
}

.pd-connect-actions .btn svg {
  width: 18px;
  height: 18px;
}

.pd-connect-actions .btn:hover svg {
  transform: none;
}

.pd-btn-glow {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 10px 40px -6px rgba(226, 13, 121, .75);
}

.pd-btn-glow:hover {
  background: #f0168a;
  box-shadow: 0 14px 54px -4px rgba(226, 13, 121, .9);
}

.pd-btn-outline {
  color: #fff;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .22);
}

.pd-btn-outline:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .5);
}

.pd-connect-alt {
  margin-top: clamp(24px, 3vw, 40px);
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
}

.pd-connect-alt a {
  margin-left: 4px;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .3s;
}

.pd-connect-alt a:hover {
  color: var(--pink-2);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .pd-intro-grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 36px;
  }

  .pd-intro-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .pd-intro-head {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .pd-intro-head + .pd-value {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 991px) {
  .pd-hero-panel {
    grid-template-columns: 1fr;
  }

  .pd-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pd-grid--5 > .pd-card,
  .pd-grid--5 > .pd-card:nth-child(n + 4) {
    grid-column: auto;
  }

  .pd-grid--5 > .pd-card:last-child {
    grid-column: 1 / -1;
  }

}

@media (max-width: 767px) {
  .pd-intro-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .pd-intro-head {
    margin-bottom: 28px;
  }

  .pd-intro-grid--4 {
    grid-template-columns: 1fr;
  }

  .pd-value,
  .pd-intro-head + .pd-value {
    padding: 20px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .pd-value p {
    margin-top: 8px;
  }

  .pd-grid {
    grid-template-columns: 1fr;
  }

  .pd-visual:not(:has(> img)) {
    aspect-ratio: 4 / 4.2;
  }

  .pd-laptop {
    width: 78%;
    top: 18%;
  }

  .pd-float-l { left: 4%; top: 52%; }
  .pd-float-r { right: 4%; top: 12%; }

  .pd-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 24px;
  }

  .pd-connect-inner {
    padding-inline: var(--gutter);
  }

  .pd-connect-actions .btn {
    height: 56px;
    font-size: 15px;
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-laptop,
  .pd-float,
  .pd-star,
  .pd-streak {
    animation: none;
  }

  .pd-streak {
    stroke-dashoffset: 0;
  }
}
