/* Редакционните елементи на визуалния редактор (App\Support\PageElementsLux): видео на цял екран,
   снимка и текст, високи карти, бягащ надпис, мозайка, витрина „като в бутик“, цитат на лента,
   предимства на панел. Шрифтът на заглавията идва от темата (--tp-heading-font / --tp-heading-style). */
.tpl {
  --tpl-accent: var(--bs-primary, #a38a5e);
  --tpl-ink: var(--bs-heading-color, #4a4640);
  --tpl-muted: color-mix(in srgb, var(--bs-body-color, #555) 72%, #fff);
  --tpl-serif: var(--tp-heading-font, 'EB Garamond', 'Cormorant Garamond', Georgia, serif);
  --tpl-serif-style: var(--tp-heading-style, italic);
}
.tpl-bleed { position: relative; left: 50%; width: 100vw; margin-left: -50vw; }
/* Срязването е на body, не на html: html с overflow различен от visible спира пренасянето към прозореца
   и body (в магазините с overflow-x: hidden) става отделна зона за скрол — лепкавият хедър спира да лепне. */
html:has(.tpl-bleed) body { overflow-x: clip; }

/* общи: заглавие, текст, надзаглавие, бутони */
.tpl-title { margin: 0 0 1.1rem; font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-weight: 400; line-height: 1.12; letter-spacing: -.005em;
  font-size: clamp(1.85rem, 1.25rem + 1.6vw, 2.7rem); color: var(--tpl-ink); }
.tpl-title.is-sm { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.15rem); margin: 0; }
.tpl-copy { font-size: .875rem; line-height: 1.85; color: var(--tpl-muted); }
.tpl-copy p { margin: 0 0 .9rem; }
.tpl-copy > :last-child { margin-bottom: 0; }
.tpl-copy em, .tpl-copy i { font-style: italic; }
.tpl-kicker { margin-bottom: .85rem; font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--tpl-accent); }
.tpl-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }
.tpl-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 11.5rem; padding: 1.05rem 2.3rem; border: 1px solid transparent; border-radius: 0;
  font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; text-decoration: none !important;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
.tpl-btn.is-primary { background: var(--tpl-accent); color: var(--tp-on-primary, #fff) !important; }
.tpl-btn.is-primary:hover { background: color-mix(in srgb, var(--tpl-accent) 82%, #000); }
.tpl-btn.is-light { background: rgba(255, 255, 255, .86); color: #2f2c28 !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tpl-btn.is-light:hover { background: #fff; }
.tpl-btn.is-ghost { border-color: rgba(255, 255, 255, .75); color: #fff !important; background: transparent; }
.tpl-btn.is-ghost:hover { background: #fff; color: #2f2c28 !important; }
.tpl-btn.is-outline { border-color: var(--tpl-accent); color: var(--tpl-accent) !important; background: transparent; }
.tpl-btn.is-outline:hover { background: var(--tpl-accent); color: #fff !important; }
.tpl-btn.is-link { min-width: 0; padding: .35rem 0; border-width: 0 0 1px; border-color: currentColor; color: var(--tpl-accent) !important; }

/* видео на цял екран */
.tpl-hero { position: relative; display: flex; overflow: hidden; background: #15130f; color: #fff; }
.tpl-hero.is-screen { min-height: 100vh; min-height: 100svh; }
.tpl-hero.is-tall { min-height: 82vh; }
.tpl-hero.is-md { min-height: 62vh; }
.tpl-hero-media, .tpl .tpl-hero-media picture, .tpl .tpl-hero-media img, .tpl .tpl-hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.tpl .tpl-hero-media img, .tpl .tpl-hero-media video { object-fit: cover; object-position: var(--tpl-fx, 50%) 50%; }
.tpl .tpl-hero-media video { opacity: 0; transition: opacity 1s ease; }
.tpl-hero-media video.is-playing { opacity: 1; }
.tpl-hero-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0, 0, 0, var(--tpl-ov, .4)) 0%, rgba(0, 0, 0, calc(var(--tpl-ov, .4) * .35)) 38%, rgba(0, 0, 0, 0) 62%); }
.tpl-hero-inner { position: relative; z-index: 2; display: flex; padding-top: 7rem; padding-bottom: clamp(2.75rem, 8vh, 5.5rem); }
.tpl-hero.is-bottom-left .tpl-hero-inner { align-items: flex-end; }
.tpl-hero.is-bottom-center .tpl-hero-inner { align-items: flex-end; justify-content: center; text-align: center; }
.tpl-hero.is-center .tpl-hero-inner { align-items: center; justify-content: center; text-align: center; }
.tpl-hero.is-bottom-center .tpl-actions, .tpl-hero.is-center .tpl-actions { justify-content: center; }
.tpl-hero-content { max-width: 44rem; }
.tpl-hero .tpl-kicker { color: rgba(255, 255, 255, .88); }
.tpl-hero-title { margin: 0; font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-weight: 400; color: #fff !important; line-height: 1.02; letter-spacing: -.01em;
  font-size: clamp(2.5rem, 1.7rem + 3vw, 4.4rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.tpl-hero-title.is-xl { font-size: clamp(3rem, 1.9rem + 5vw, 6.6rem); }
.tpl-hero-text { max-width: 34rem; margin: 1rem 0 0; font-size: .95rem; line-height: 1.7; color: rgba(255, 255, 255, .9); }
.tpl-hero .tpl-actions { margin-top: 1.7rem; }

/* снимка и текст */
.tpl-split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.tpl-split.is-right .tpl-split-media { order: 2; }
.tpl-split-media { position: relative; overflow: hidden; aspect-ratio: var(--tpl-r, 1 / 1); background: #f2f1ef; }
.tpl .tpl-split-media > img, .tpl .tpl-split-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-split-text { display: flex; align-items: center; justify-content: center; padding: clamp(2.25rem, 5.5vw, 6rem); }
.tpl-split-inner { width: 100%; max-width: 31rem; }
.tpl-split.is-center .tpl-split-inner { text-align: center; }
.tpl-split.is-center .tpl-actions { justify-content: center; }
.tpl-split.is-collage .tpl-split-media { aspect-ratio: auto; overflow: visible; background: transparent; display: flex; align-items: center; }
.tpl-collage { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 1.1rem; width: 100%; }
.tpl-collage > div { position: relative; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .35); }
.tpl-collage-a { aspect-ratio: 3 / 4; transform: translateY(1.5rem); }
.tpl-collage-b { aspect-ratio: 3 / 4; }
.tpl .tpl-collage img, .tpl .tpl-collage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-split.is-edge .tpl-split-media { aspect-ratio: auto; min-height: clamp(420px, 46vw, 760px); }
@media (max-width: 767.98px) {
  .tpl-split { grid-template-columns: 1fr; }
  .tpl-split.is-right .tpl-split-media { order: 0; }
  .tpl-split-text { padding: 2.4rem .25rem 1rem; }
  .tpl-split.is-edge .tpl-split-media { min-height: 0; aspect-ratio: 4 / 5; }
  .tpl-split.is-edge .tpl-split-text { padding-inline: 1.25rem; }
  .tpl-collage-a { transform: translateY(1rem); }
}

/* високи карти */
.tpl-cards { display: grid; grid-auto-flow: column; gap: 1rem; grid-auto-columns: calc((100% - (var(--tpl-cols, 3) - 1) * 1rem) / var(--tpl-cols, 3));
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tpl-cards::-webkit-scrollbar, .tpl-rail-track::-webkit-scrollbar { display: none; }
.tpl-cards.is-peek { grid-auto-columns: calc((100% - var(--tpl-cols, 3) * 1rem) / (var(--tpl-cols, 3) + .14)); margin-right: calc(50% - 50vw); padding-right: 1.5rem; }
.tpl-card { position: relative; display: block; overflow: hidden; aspect-ratio: var(--tpl-r, 2 / 3); background: #2a2622; color: #fff !important; text-decoration: none !important; scroll-snap-align: start; }
.tpl-card-media, .tpl .tpl-card-media img, .tpl .tpl-card-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.tpl .tpl-card-media img, .tpl .tpl-card-media video { object-fit: cover; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.tpl .tpl-card-media video { opacity: 0; transition: opacity .6s ease; }
.tpl-card:hover .tpl-card-media img { transform: scale(1.045); }
.tpl-card:hover .tpl-card-media video.is-playing { opacity: 1; }
.tpl-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 45%); pointer-events: none; }
.tpl-card-cap { position: absolute; z-index: 2; left: clamp(1.1rem, 2vw, 1.6rem); right: 1.2rem; bottom: clamp(1.2rem, 2.2vw, 1.8rem); }
.tpl-card-eyebrow { display: block; margin-bottom: .4rem; font-size: .7rem; font-weight: 600; letter-spacing: .03em; color: rgba(255, 255, 255, .92); }
.tpl-card-title { display: block; font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-size: clamp(1.55rem, 1.2rem + .9vw, 2.1rem); line-height: 1.05; }
@media (max-width: 767.98px) {
  .tpl-cards, .tpl-cards.is-peek { grid-auto-columns: 74%; gap: .75rem; }
}

/* бягащ надпис */
.tpl-marquee { overflow: hidden; padding: .05em 0 .2em; user-select: none; }
.tpl-mq-track { display: flex; width: max-content; animation: tpl-mq var(--tpl-speed, 60s) linear infinite; }
.tpl-marquee.is-reverse .tpl-mq-track { animation-direction: reverse; }
.tpl-mq-group { display: flex; flex-shrink: 0; align-items: baseline; }
.tpl-mq-item, .tpl-mq-sep { font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-weight: 400; line-height: 1.12; white-space: nowrap; padding-right: .32em;
  font-size: clamp(3.4rem, 1.8rem + 6.6vw, 9.6rem); color: var(--tpl-c1); }
.tpl-marquee.is-lg .tpl-mq-item, .tpl-marquee.is-lg .tpl-mq-sep { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 6.4rem); }
.tpl-marquee.is-md .tpl-mq-item, .tpl-marquee.is-md .tpl-mq-sep { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3.4rem); }
.tpl-marquee.is-sm .tpl-mq-item, .tpl-marquee.is-sm .tpl-mq-sep { font-size: clamp(1.15rem, .9rem + 1.1vw, 2rem); }
.tpl-marquee.is-gradient .tpl-mq-item { background: linear-gradient(90deg, var(--tpl-c1) 0%, var(--tpl-c1) 22%, var(--tpl-c2) 78%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tpl-marquee.is-gradient .tpl-mq-sep { color: var(--tpl-c2); }
.tpl-marquee.is-outline .tpl-mq-item, .tpl-marquee.is-outline .tpl-mq-sep { color: transparent; -webkit-text-stroke: 1px var(--tpl-c1); }
@keyframes tpl-mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tpl-mq-track { animation: none; } }

/* мозайка */
.tpl-mosaic { display: grid; gap: 1rem; grid-template-columns: 1fr .5fr .5fr; grid-template-rows: 1fr 1fr; aspect-ratio: 2.24 / 1; }
.tpl-tile { position: relative; display: block; overflow: hidden; background: #2a2622; color: #fff !important; text-decoration: none !important; box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .45); }
.tpl .tpl-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.tpl-tile:hover img { transform: scale(1.045); }
.tpl-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 45%); }
.tpl-tile-title { position: absolute; z-index: 2; left: 1.15rem; bottom: 1rem; font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-size: 1.1rem; line-height: 1.1; }
.tpl-mosaic .t-1 { grid-column: 1; grid-row: 1 / 3; }
.tpl-mosaic .t-1 .tpl-tile-title { font-size: 1.45rem; left: 1.5rem; bottom: 1.3rem; }
.tpl-mosaic .t-2 { grid-column: 2; grid-row: 1; }
.tpl-mosaic .t-3 { grid-column: 3; grid-row: 1; }
.tpl-mosaic .t-4 { grid-column: 2 / 4; grid-row: 2; }
.tpl-mosaic.is-right { grid-template-columns: .5fr .5fr 1fr; }
.tpl-mosaic.is-right .t-1 { grid-column: 3; }
.tpl-mosaic.is-right .t-2 { grid-column: 1; }
.tpl-mosaic.is-right .t-3 { grid-column: 2; }
.tpl-mosaic.is-right .t-4 { grid-column: 1 / 3; }
.tpl-mosaic.n-3 .t-3 { grid-column: 2 / 4; grid-row: 2; }
.tpl-mosaic.n-3 .t-2 { grid-column: 2 / 4; }
@media (max-width: 767.98px) {
  .tpl-mosaic, .tpl-mosaic.is-right { grid-template-columns: 1fr 1fr; grid-template-rows: auto; aspect-ratio: auto; gap: .75rem; }
  .tpl-mosaic .t-1, .tpl-mosaic.is-right .t-1 { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 4 / 5; }
  .tpl-mosaic .t-2, .tpl-mosaic .t-3, .tpl-mosaic.is-right .t-2, .tpl-mosaic.is-right .t-3 { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .tpl-mosaic .t-4, .tpl-mosaic.is-right .t-4 { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 16 / 10; }
}

/* витрина като в бутик (и картите в каталога в бутиков изглед) */
.tpl-rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.tpl-more { display: inline-flex; align-items: center; gap: .55rem; font-size: .72rem; color: var(--tpl-muted); text-decoration: none !important; white-space: nowrap; }
.tpl-more:hover { color: var(--tpl-accent); }
.tpl-more-dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #ececec; color: #555; }
.tpl-rail-track { display: grid; grid-auto-flow: column; gap: 1.1rem; grid-auto-columns: calc((100% - var(--tpl-cols, 3) * 1.1rem) / (var(--tpl-cols, 3) + .16));
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: calc(50% - 50vw); padding-right: 1.5rem; }
.tpl-rail-nav { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }
.tpl-rail-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #dcdad6; border-radius: 0; background: transparent; color: #4a4640; transition: background-color .25s, color .25s; }
.tpl-rail-btn:hover { background: #4a4640; color: #fff; border-color: #4a4640; }
@media (max-width: 767.98px) {
  .tpl-rail-track { grid-auto-columns: 72%; gap: .75rem; }
  .tpl-rail-nav { display: none; }
}
.tpl-pcard { position: relative; display: flex; flex-direction: column; background: var(--tpl-card-bg, #efefef); color: inherit !important; text-decoration: none !important; scroll-snap-align: start; }
.tpl-pcard-media { position: relative; display: block; overflow: hidden; aspect-ratio: var(--tpl-r, 4 / 5); }
.tpl .tpl-pcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.tpl-pcard:hover .tpl-pcard-media img { transform: scale(1.04); }
.tpl-pcard-flag { position: absolute; z-index: 2; top: .95rem; left: 1rem; font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tpl-accent); }
.tpl-pcard-body { display: flex; flex-direction: column; gap: .3rem; padding: 1.05rem 1rem 1.45rem; text-align: center; }
.tpl-pcard-name { font-size: .78rem; font-weight: 600; color: #5d5a55; letter-spacing: .01em; line-height: 1.45; }
.tpl-pcard-sub { font-weight: 500; }
.tpl-pcard-price { font-size: .76rem; color: #9b9893; }
.tpl-pcard-price del { margin-right: .35rem; opacity: .7; }
.tpl-pcard.is-out .tpl-pcard-media img { opacity: .55; }

/* цитат на лента */
.tpl-qband { position: relative; margin: 0; padding: clamp(3.2rem, 7vw, 5.6rem) 1.5rem; overflow: hidden; text-align: center;
  background: linear-gradient(100deg, var(--tpl-c1) 0%, var(--tpl-c2) 62%, var(--tpl-c1) 125%); }
.tpl-qmark { position: absolute; top: clamp(1.4rem, 4vw, 2.4rem); left: calc(50% - min(24rem, 44vw)); font-family: var(--tpl-serif); font-size: clamp(5rem, 9vw, 8.5rem); line-height: 1; opacity: .22; }
.tpl-qtext { position: relative; max-width: 44rem; margin: 0 auto; font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-size: clamp(1.4rem, 1rem + 1.2vw, 2.05rem); line-height: 1.32; }
.tpl-qsig { margin-top: 1.7rem; font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; opacity: .92; }

/* предимства на панел */
.tpl-usp { display: grid; grid-template-columns: repeat(var(--tpl-cols, 4), 1fr); gap: 2rem 1.5rem; padding: clamp(2.2rem, 4vw, 3.3rem) clamp(1.5rem, 3vw, 3rem); background: var(--tpl-panel, #efefef); }
.tpl-usp.has-shadow { box-shadow: 0 34px 60px -34px rgba(0, 0, 0, .28); }
.tpl-usp-item { display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center; color: inherit !important; text-decoration: none !important; }
.tpl-usp-icon { color: #77736d; }
.tpl-usp-title { font-family: var(--tpl-serif); font-style: var(--tpl-serif-style); font-size: 1.22rem; line-height: 1.2; color: var(--tpl-ink); }
.tpl-usp-text { max-width: 15rem; font-size: .78rem; line-height: 1.6; color: var(--tpl-muted); }
@media (max-width: 767.98px) {
  .tpl-usp { grid-template-columns: 1fr 1fr; gap: 1.8rem 1rem; padding: 2rem 1rem; }
}

/* отзиви със снимки (ElPhotoReviews): лента или мозайка, снимката от клиента, думите му, името */
.tpl-reviews { --tpl-review-gap: 1rem; }
.tpl-reviews.is-rail { display: grid; grid-auto-flow: column; gap: var(--tpl-review-gap); grid-auto-columns: calc((100% - var(--tpl-cols, 4) * 1rem) / (var(--tpl-cols, 4) + .18));
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .4rem 1.5rem 1.4rem .2rem; margin-right: calc(50% - 50vw); }
.tpl-reviews.is-rail::-webkit-scrollbar { display: none; }
.tpl-reviews.is-masonry { columns: var(--tpl-cols, 4) 220px; column-gap: var(--tpl-review-gap); }
.tpl-reviews.is-masonry .tpl-review { break-inside: avoid; margin-bottom: var(--tpl-review-gap); }
.tpl-review { margin: 0; display: flex; flex-direction: column; background: var(--tpl-review-bg, #fff); border-radius: 22px; overflow: hidden; scroll-snap-align: start;
  box-shadow: 0 16px 36px -26px rgba(20, 15, 30, .55); border: 1px solid rgba(0, 0, 0, .05); transition: transform .3s ease, box-shadow .3s ease; }
.tpl-review:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -26px rgba(20, 15, 30, .6); }
.tpl-review-media { display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.tpl-reviews.is-masonry .tpl-review-media { aspect-ratio: auto; }
.tpl .tpl-review-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.tpl-review:hover .tpl-review-media img { transform: scale(1.04); }
.tpl-review-body { position: relative; display: flex; flex-direction: column; gap: .9rem; flex: 1; padding: 1.5rem 1.35rem 1.3rem; }
.tpl-review-body::before { content: "\201C"; position: absolute; top: -1.55rem; left: 1.1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--tpl-accent);
  color: #fff; font: 700 2.3rem/3.3rem Georgia, serif; text-align: center; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.tpl-review-media + .tpl-review-body { padding-top: 1.7rem; }
.tpl-review-text { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--tpl-ink); }
.tpl-review-who { margin-top: auto; display: flex; flex-direction: column; }
.tpl-review-name { font-weight: 700; font-size: .9rem; color: var(--tpl-ink); }
.tpl-review-meta { font-size: .75rem; color: var(--tpl-muted); }
.tpl-reviews-nav { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .2rem; }
@media (max-width: 767.98px) {
  .tpl-reviews.is-rail { grid-auto-columns: 78%; gap: .75rem; }
}

/* „Цялата снимка, без изрязване“ (поле image_fit на витрината и картите) — предметът в средата на фона на картата */
.tpl .tpl-fit-contain :is(.tpl-pcard-media, .tpl-card-media, .tpl-review-media) img { object-fit: contain; }
.tpl .tpl-fit-contain .tpl-review-media { position: relative; aspect-ratio: 1 / 1; background: var(--tpl-fit-bg, color-mix(in srgb, var(--tpl-review-bg, #fff) 94%, #000)); }
/* празното около снимката — същата снимка, размазана: еднакви рамки без ивици */
.tpl .tpl-fit-contain .tpl-review-media::before { content: ""; position: absolute; inset: -24px; background: var(--tpl-img) center / cover no-repeat; filter: blur(22px) saturate(1.15); opacity: .75; }
.tpl .tpl-fit-contain .tpl-review-media img { position: relative; }
.tpl .tpl-fit-contain .tpl-pcard-media img { padding: 6%; }
.tpl .tpl-split.tpl-fit-contain .tpl-split-media { background: transparent; }
/* рамката следва ширината на колоната (с aspect-ratio по-високият текст я разширяваше и снимката излизаше от колоната); пропорцията остава като най-малка височина */
.tpl .tpl-split.is-half.tpl-fit-contain .tpl-split-media { aspect-ratio: auto; min-width: 0; }
.tpl .tpl-split.is-half.tpl-fit-contain .tpl-split-media::before { content: ""; display: block; padding-top: calc(100% / (var(--tpl-r, 1 / 1))); }
.tpl .tpl-split.tpl-fit-contain .tpl-split-media > img { object-fit: contain; }
/* колаж: рамката е точно с пропорциите на снимката — запълнена, без изрязване и без празни полета */
.tpl .tpl-split.tpl-fit-contain .tpl-collage > div { aspect-ratio: auto; }
.tpl .tpl-split.tpl-fit-contain .tpl-collage img { position: static; display: block; height: auto; }
