/* ==========================================================================
   ortoto-child / assets/produktas.css
   A+ turinio blokas produkto puslapyje. Enqueue priority 21, deps ortoto-tokens.
   Naudojami esami tokenai; fallback reikšmės — jei tokenas dar neapibrėžtas.
   ========================================================================== */

.oto-prod {
  --oto-r: var(--ortoto-radius-lg, 20px);
  --oto-cream: var(--ortoto-cream, #FFF8E7);
  --oto-tarpas: clamp(3rem, 7vw, 6rem);
  --oto-maks: 1120px;

  display: flex;
  flex-direction: column;
  gap: var(--oto-tarpas);
  max-width: var(--oto-maks);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  padding-block: var(--oto-tarpas);
}

.oto-prod :where(h2) {
  margin: 0 0 .75em;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.15;
  text-wrap: balance;
}

.oto-prod :where(h3) {
  margin: 0 0 .35em;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.oto-prod :where(p) {
  margin: 0;
  line-height: 1.65;
  max-width: 62ch;
}

.oto-prod :where(img) {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--oto-r);
}

.oto-prod :where(figure) { margin: 0; }

/* --- 1. Įvadas ---------------------------------------------------------- */

.oto-prod__intro { max-width: 46rem; }

.oto-prod__intro p { font-size: 1.0625rem; }

/* --- 2. Dėžutėje yra ---------------------------------------------------- */

.oto-prod__dezute {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (min-width: 48rem) {
  .oto-prod__dezute { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .oto-prod__dezute-foto { position: sticky; top: 5rem; }
}

.oto-prod__dezute-sarasas {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.oto-prod__dezute-sarasas h2 { margin-bottom: 0; }

.oto-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.oto-item__zyme {
  display: block;
  width: 2.5rem;
  height: auto;
  border-radius: 0;
  margin-top: .1rem;
}

/* --- 3. Kortelės -------------------------------------------------------- */

/* Dvi versijos: plačiame ekrane originali grafika su įpieštu tekstu,
   siaurame — atskiros kortelės, nes 1920 px grafikoje tekstas telefone
   nukristų iki ~4 px aukščio. */

.oto-prod__korteles-plati { display: none; }

.oto-prod__korteles-siaura {
  background: var(--oto-cream);
  border-radius: var(--oto-r);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: center;
}

/* Šaltinis 522 px pločio — neplečiame, kad neišsipūstų. */
.oto-prod__korteles-siaura figure { width: min(100%, 34rem); }

.oto-prod__korteles-legenda {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(100%, 34rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  text-align: center;
}

.oto-prod__korteles-legenda li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .9375rem;
  line-height: 1.35;
}

.oto-prod__korteles-legenda span { opacity: .72; }

@media (max-width: 30rem) {
  .oto-prod__korteles-legenda { grid-template-columns: 1fr; text-align: start; }
}

/* Perjungimas eina paskutinis: .oto-prod__korteles-siaura turi display: flex,
   o vienodo specifiškumo taisyklė laimi tik būdama vėliau faile. */
@media (min-width: 48rem) {
  .oto-prod__korteles-plati  { display: block; }
  .oto-prod__korteles-siaura { display: none; }
}

/* --- 4. Taisyklės ------------------------------------------------------- */

.oto-prod__taisykles {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 48rem) {
  .oto-prod__taisykles { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}

.oto-prod__taisykles-ivadas {
  margin-bottom: 1.25rem;
  opacity: .72;
}

.oto-prod__taisykles ol {
  margin: 0;
  padding-inline-start: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  line-height: 1.6;
  max-width: 58ch;
}

.oto-prod__taisykles ol::marker { font-variant-numeric: tabular-nums; }

.oto-prod__taisykles-pastaba {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  font-size: .9375rem;
  opacity: .8;
}

.oto-prod__taisykles-foto img { border-radius: 0; }

/* --- 5. Savybių kortelės ------------------------------------------------ */

.oto-prod__savybes {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.oto-prod__savybes article {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.oto-prod__savybes img { aspect-ratio: 600 / 791; object-fit: cover; }

.oto-prod__savybes p { font-size: .9375rem; }

/* --- 6. Gamyba ---------------------------------------------------------- */

.oto-prod__gamyba {
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  padding-top: 1.5rem;
}

.oto-prod__gamyba p {
  font-size: .9375rem;
  opacity: .8;
  max-width: none;
}

/* Originali grafika turi savo baltas paraštes, tad sekcijos tarpus
   aplink ją mažiname, kad nesusidėtų. */
@media (min-width: 48rem) {
  .oto-prod__korteles { margin-block: calc( var(--oto-tarpas) * -0.45 ); }
}

.oto-prod__taisykles-foto img { max-height: 26rem; width: auto; margin-inline: auto; }


/* Labirintas: horizontali nuotrauka, stulpelius lygiuojam per vidurį */
.oto-prod--labirintas .oto-prod__dezute { align-items: center; }

/* Labirintas: dviejų kortelių blokas su nuotrauka */
.oto-prod__blokai { display: grid; gap: 1.5rem; margin-block: 3rem; }
@media (min-width: 48rem) {
	.oto-prod__blokai { grid-template-columns: 1fr 1fr; align-items: stretch; }
}
.oto-prod__blokai-korteles { display: grid; gap: 1.5rem; grid-template-rows: auto 1fr; }
.oto-kortele { border-radius: 1rem; padding: 2rem; color: #fff1dc; display: flex; flex-direction: column; justify-content: flex-end; }
.oto-kortele--geltona { background: #f6b119; color: #3d2b2b; }
.oto-kortele--zydra { background: #4f9aad; }
.oto-kortele h3 { margin: 0 0 .75rem; color: inherit; }
.oto-kortele p { margin: 0; }
.oto-kortele ul { margin: 0; padding-inline-start: 1.1rem; }
.oto-kortele li { margin-block: .3rem; }
.oto-prod__blokai-foto { margin: 0; }
.oto-prod__blokai-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 1rem; display: block; }

/* Labirintas: kortelių turinys viršuje, nuotraukos aukštis ribojamas */
.oto-kortele { justify-content: flex-start; }
.oto-prod__blokai-foto img { max-height: none; aspect-ratio: 491 / 640; }
@media (max-width: 47.99rem) { .oto-prod__blokai-foto img { aspect-ratio: 4 / 3; } }

.oto-kortele__zenklas { display: block; margin-bottom: 1.25rem; }

/* Labirintas: video */
.oto-prod__video { margin: 3rem 0 0; }
.oto-prod__video video { width: 100%; height: auto; border-radius: 1rem; display: block; }
