/* ─────────────────────────────────────────────────────────────
   Produkta lapa — inc/product-page.php + templates/single-product.html

   Pa kreisi viena bilde ar noapaļotiem stūriem, bultiņām un
   sīktēliem (pārslēgšana — assets/js/produkts.js); tā paliek
   redzama, kamēr blakus ritina informāciju. Uz telefona bildi
   velk ar pirkstu.
   Krāsas un fonti — v3 mainīgie, tāpat kā sākumlapas maketā.
   ───────────────────────────────────────────────────────────── */

.rota-product { padding-bottom: 0; }

.pp {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(340px, 500px);
  justify-content: center;
  gap: clamp(40px, 6vw, 112px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) var(--gutter) clamp(64px, 8vw, 120px);
  align-items: start;
}

/* ── Bildes ─────────────────────────────────────────────── */

.pp-media {
  position: sticky;
  top: calc(72px + 32px + 24px);
}
/* Bilde + sīktēli vienmēr ietilpst ekrāna augstumā (klēpjdatorā ~730px
   augstumā citādi sīktēli palika zem ekrāna malas). 0.8 = 4:5. */
.pp-gallery {
  --pp-radius: 18px;
  --pp-thumbw: 64px;
  position: relative;
  width: 100%;
  max-width: max(300px, calc((100vh - 72px - 32px - 24px - 48px) * 0.8));
  margin-inline: auto;
}
/* Uz datora sīktēli stāv kolonnā bildes kreisajā pusē. */
@media (min-width: 901px) {
  .pp-gallery[data-count] {
    display: grid;
    grid-template-columns: var(--pp-thumbw) 1fr;
    gap: 14px;
    max-width: calc(max(300px, calc((100vh - 72px - 32px - 24px - 48px) * 0.8)) + var(--pp-thumbw) + 14px);
  }
  .pp-gallery[data-count] .pp-stage { grid-column: 2; grid-row: 1; }
  .pp-gallery[data-count] .pp-thumbs {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    margin: 0;
    max-height: 100%;
    overflow-y: auto;
  }
  .pp-gallery[data-count] .pp-thumb { flex: 0 0 auto; width: var(--pp-thumbw); }
}

/* Mirdzums — bildes krāsas izpludinātas aiz tās. */
.pp-gallery::before {
  content: "";
  position: absolute;
  inset: 8% -10% -6%;
  z-index: -1;
  background: var(--pp-glow) center / cover no-repeat;
  filter: blur(70px) saturate(1.4);
  opacity: .32;
  border-radius: 50%;
  transition: background-image .6s ease;
  pointer-events: none;
}
.pp-media { isolation: isolate; }
.rota-product { overflow-x: clip; }

.pp-stage {
  position: relative;
  border-radius: var(--pp-radius);
  overflow: hidden;
  background: var(--paper-warm);
}
.pp-gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pp-gallery-track::-webkit-scrollbar { display: none; }
.pp-gallery .pp-shot {
  flex: 0 0 100%;
  margin: 0;
  line-height: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.pp-gallery .pp-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Bultiņas — apaļas, parādās, kad pele ir virs bildes. */
.pp-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 239, 227, .88);
  color: #231F20;
  cursor: pointer;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.pp-prev { left: 14px; transform: translateX(-6px); }
.pp-next { right: 14px; transform: translateX(6px) scaleX(-1); }
.pp-stage:hover .pp-nav,
.pp-nav:focus-visible { opacity: 1; transform: none; }
.pp-stage:hover .pp-next,
.pp-next:focus-visible { transform: scaleX(-1); }
.pp-nav:hover { background: #fff; }
.pp-nav:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
@media (hover: none) { .pp-nav { display: none; } }

.pp-gallery-meter {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #fff;
  background: rgba(35, 31, 32, .55);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* Sīktēli */
.pp-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pp-thumbs::-webkit-scrollbar { display: none; }
.pp-thumb {
  flex: 0 0 72px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-warm);
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s ease, border-color .2s ease;
}
.pp-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.pp-thumb:hover { opacity: .85; }
.pp-thumb.is-active {
  opacity: 1;
  border-color: var(--ink);
}
.pp-thumb:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

/* Lightbox poga (palielināt) — noapaļota kā viss pārējais. */
.pp-gallery .lightbox-trigger { border-radius: 50%; }

/* ── Informācija ────────────────────────────────────────── */

.pp-side {
  max-width: 500px;
  padding-top: clamp(8px, 2vw, 32px);
}
.pp-side > * { margin-block: 0; }

.pp-crumbs,
.pp-crumbs.crumbs {
  font-size: 10px;
  letter-spacing: 0.2em;
  margin: 0 0 clamp(28px, 4vw, 56px) !important;
}

.pp-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.pp-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.pp-eyebrow a { color: inherit; text-decoration: none; }
.pp-eyebrow a:hover { color: var(--ink); }

.rota-product .pp-title {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: clamp(44px, 5vw, 78px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 18px 0 0;
  text-wrap: balance;
}

.rota-product .pp-price,
.rota-product .pp-price .wc-block-components-product-price,
.rota-product .pp-price .price {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: 20px;
}

.rota-product .pp-lede,
.rota-product .pp-lede p {
  font-family: var(--f-body);
  font-weight: 300;
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
  max-width: 42ch;
  margin-top: 22px;
}
.rota-product .pp-lede .wp-block-post-excerpt__excerpt { margin: 0; }

/* ── Poga ───────────────────────────────────────────────── */

.rota-product .pp-cart { margin-top: 36px; }
.rota-product .pp-cart form.cart {
  display: flex;
  gap: 0;
  margin: 0;
}
/* Katra rota ir vienā eksemplārā — daudzuma lauks tikai traucē. */
.rota-product .pp-cart .quantity { display: none !important; }
.rota-product .pp-cart .single_add_to_cart_button,
.rota-product .pp-cart button[type="submit"],
.pp-ask-btn {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  padding: 0 28px;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  transition: background .25s ease, color .25s ease, letter-spacing .35s ease;
}
.rota-product .pp-cart .single_add_to_cart_button:hover,
.pp-ask-btn:hover {
  background: #fff;
  border-color: #fff;
  letter-spacing: 0.24em;
}
.rota-product .pp-cart .added_to_cart {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pp-ask { margin-top: 36px; }
.pp-ask-btn {
  background: transparent;
  color: var(--ink);
}
.pp-ask-btn:hover { color: var(--paper); }
.pp-ask p {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
}

/* ── Trīs solījumi ──────────────────────────────────────── */

.pp-promises {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pp-promises li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--muted);
}
.pp-promises svg { color: var(--ink); }
.pp-promises strong {
  display: block;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2px;
}

/* ── Salocāmās sadaļas ──────────────────────────────────── */

.pp-info { margin-top: 8px; }
.pp-acc { border-bottom: 1px solid var(--rule); }
.pp-acc > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.pp-acc > summary::-webkit-details-marker { display: none; }
.pp-acc > summary::after {
  content: "";
  width: 11px;
  height: 11px;
  background:
    linear-gradient(currentColor, currentColor) center / 11px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 11px no-repeat;
  transition: transform .3s ease;
}
.pp-acc[open] > summary::after { transform: rotate(45deg); }
.pp-acc > summary:hover { color: #fff; }

.pp-acc-body {
  padding: 0 0 26px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
}
.pp-acc-body p { margin: 0 0 12px; }
.pp-acc-body p:last-child { margin-bottom: 0; }
.pp-acc-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}
.pp-acc-body a:hover { text-decoration-color: var(--ink); }

html body .rota-product .pp-acc-body table.woocommerce-product-attributes {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
}
html body .rota-product .pp-acc-body table.woocommerce-product-attributes th,
html body .rota-product .pp-acc-body table.woocommerce-product-attributes td {
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--rule-soft);
  background: none;
  font-style: normal;
  text-align: left;
  vertical-align: top;
}
html body .rota-product .pp-acc-body table.woocommerce-product-attributes tr:first-child > * { border-top: 0; }
html body .rota-product .pp-acc-body table.woocommerce-product-attributes th {
  width: 40%;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 13px;
}
html body .rota-product .pp-acc-body table.woocommerce-product-attributes td,
html body .rota-product .pp-acc-body table.woocommerce-product-attributes td p {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  margin: 0;
}

/* ── Varētu arī iet kopā ────────────────────────────────── */

.pp-related {
  border-top: 1px solid var(--rule);
  padding: clamp(56px, 7vw, 104px) var(--gutter) clamp(64px, 8vw, 120px);
}
.pp-related-head { margin-bottom: clamp(28px, 3vw, 44px); gap: 16px; }
.pp-related-title {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
  margin: 0;
}
.pp-related-title em { font-style: italic; color: var(--muted); }
.pp-related-link { margin: 0; }
.pp-related-link a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}
.pp-related-link a:hover { border-color: var(--ink); }

/* ── Planšete un telefons ───────────────────────────────── */

@media (max-width: 900px) {
  .pp {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 0 64px;
  }
  .pp-side {
    position: static;
    max-width: none;
    padding: 0 var(--gutter);
  }
  .pp-crumbs,
  .pp-crumbs.crumbs { margin-bottom: 20px !important; }

  .pp-media {
    position: static;
    padding: 0 var(--gutter);
  }
  .pp-gallery { --pp-radius: 14px; max-width: none; }
  .pp-thumbs { gap: 8px; margin-top: 10px; }
  .pp-thumb { flex-basis: 56px; border-radius: 10px; }
}

@media (max-width: 480px) {
  .pp-promises { grid-template-columns: 1fr; gap: 14px; }
  .pp-promises li { flex-direction: row; align-items: flex-start; gap: 14px; }
  .pp-promises svg { flex: 0 0 auto; }
}

/* Woo smallscreen tabulas šūnas liek vienu zem otras — mums rindā. */
@media (max-width: 768px) {
  html body .rota-product .pp-acc-body table.woocommerce-product-attributes tr { display: table-row; }
  html body .rota-product .pp-acc-body table.woocommerce-product-attributes th,
  html body .rota-product .pp-acc-body table.woocommerce-product-attributes td { display: table-cell; }
}


/* ─────────────────────────────────────────────────────────────
   Noskaņa (2026-10-30, «vēl seksīgāk»)
   ───────────────────────────────────────────────────────────── */

/* Kolekcija un «Vienā eksemplārā» */
.pp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px !important;
}
.pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(244, 239, 227, .03);
}
.pp-chip.is-live i {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9b48a;
}
.pp-chip.is-live i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #c9b48a;
  animation: pp-pulse 2.2s ease-out infinite;
}
@keyframes pp-pulse {
  from { transform: scale(.4); opacity: .9; }
  to   { transform: scale(1.8); opacity: 0; }
}

/* Ienākšana — informācija parādās pa vienam elementam. */
@media (prefers-reduced-motion: no-preference) {
  .pp-side > * {
    animation: pp-rise .9s cubic-bezier(.2, .7, .2, 1) both;
  }
  .pp-side > :nth-child(1) { animation-delay: .05s; }
  .pp-side > :nth-child(2) { animation-delay: .12s; }
  .pp-side > :nth-child(3) { animation-delay: .2s; }
  .pp-side > :nth-child(4) { animation-delay: .28s; }
  .pp-side > :nth-child(5) { animation-delay: .34s; }
  .pp-side > :nth-child(6) { animation-delay: .4s; }
  .pp-side > :nth-child(7) { animation-delay: .46s; }
  .pp-side > :nth-child(n+8) { animation-delay: .52s; }
  .pp-stage { animation: pp-reveal 1.2s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes pp-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pp-reveal {
  from { opacity: 0; transform: scale(.97); clip-path: inset(6% 6% 6% 6% round 24px); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round var(--pp-radius)); }
}

/* Lielāks, plānāks virsraksts ar maigu gradientu. */
.rota-product .pp-title {
  background: linear-gradient(180deg, #fff 30%, rgba(244, 239, 227, .62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: .06em;
}

/* Poga — bultiņa un gaismas atspīdums. */
.rota-product .pp-cart .single_add_to_cart_button,
.pp-ask-btn {
  position: relative;
  overflow: hidden;
}
.rota-product .pp-cart .single_add_to_cart_button::after,
.pp-ask-btn::after {
  content: "→";
  margin-left: 12px;
  font-size: 15px;
  letter-spacing: 0;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.rota-product .pp-cart .single_add_to_cart_button:hover::after,
.pp-ask-btn:hover::after { transform: translateX(6px); }
.rota-product .pp-cart .single_add_to_cart_button::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .8s ease;
  pointer-events: none;
}
.rota-product .pp-cart .single_add_to_cart_button:hover::before { left: 120%; }

/* Solījumi — trīs mazas «stikla» kartītes. */
.pp-promises {
  border: 0;
  padding: 0;
  gap: 10px;
}
.pp-promises li {
  padding: 16px 14px;
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  background: rgba(244, 239, 227, .025);
}

/* Noskaņas josla — citāts pa kreisi, portrets pa labi */
.pp-mood {
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
  gap: clamp(32px, 6vw, 112px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) var(--gutter);
  border-top: 1px solid var(--rule-soft);
}
.pp-mood-img {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: auto;
  max-height: 78vh;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 24px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
}
.pp-mood-text { grid-column: 1; grid-row: 1; }
@media (max-width: 900px) {
  .pp-mood { grid-template-columns: 1fr; }
  .pp-mood-img { grid-column: 1; grid-row: 1; border-radius: 18px; }
  .pp-mood-text { grid-row: 2; }
}
.pp-mood-eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(244, 239, 227, .7);
}
.pp-mood-quote {
  margin: 0;
  max-width: 18ch;
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
}
.pp-mood-quote em { font-style: italic; color: rgba(244, 239, 227, .7); }
.pp-mood-link {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 26px;
  border: 1px solid rgba(244, 239, 227, .5);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background .25s ease, color .25s ease;
}
.pp-mood-link:hover { background: #fff; color: #231F20; }

/* Apakšējā josla — tikai telefonā */
.pp-bar { display: none; }
@media (max-width: 900px) {
  .pp-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 8px 18px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: rgba(35, 31, 32, .82);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
    transform: translateY(140%);
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
  }
  .pp-bar.is-on { transform: none; }
  .pp-bar-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .pp-bar-name {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pp-bar-price { font-size: 12px; font-weight: 300; color: var(--muted); }
  .pp-bar-btn {
    flex: 0 0 auto;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
  }
}

/* Īskoda bloks izlaiž izvadi caur wpautop(), kas pogas (<button> ir
   «inline») ietin <p> — tad zem bildes radās 16px josla un apakšējā
   joslā poga nokrita rindā. display:contents padara <p> neredzamu
   izkārtojumam, pogas paliek savā vietā. */
.pp-stage > p,
.pp-thumbs > p,
.pp-chips > p,
.pp-bar > p { display: contents; }
