/* ============================================================
   MINTO — Mēbeļu galdniecība
   Custom dark theme, fully responsive
   ============================================================ */

:root {
  /* Minto tumšais ornamentu fons */
  --bg: #081018;
  --bg-soft: rgba(0, 0, 0, 0.35);
  --card: rgba(0, 0, 0, 0.5);
  --card-hover: rgba(0, 0, 0, 0.62);
  --line: rgba(255, 255, 255, 0.08);

  /* Logo rozā / fuksija */
  --accent: #e01848;
  --accent-dark: #b01238;
  --accent-light: #f088a0;
  --accent-soft: rgba(224, 24, 72, 0.14);
  --accent-pale: #f8c0d0;

  /* Logo tirkīzs */
  --minto-gold: #c8961f;
  --minto-gold-deep: #b8862e;
  --teal: #00b0a0;
  --teal-dark: #008f82;
  --teal-soft: rgba(0, 176, 160, 0.14);
  --teal-text: #6de0d4;

  --text: #f8f8f8;
  --muted: #e8e8ec;
  --text-soft: rgba(255, 255, 255, 0.88);

  --nav-bg: #e01848;
  --nav-gradient: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 45%, var(--accent-dark) 100%);

  --radius: 14px;
  --radius-sm: 10px;

  --font-head: "Montserrat", sans-serif;
  --font-body: "Inter", sans-serif;

  --font-head: "Montserrat", sans-serif;
  --font-body: "Inter", sans-serif;

  --container: 1300px;
  --page-gutter: 16px;
  --page-shell: calc(var(--container) + var(--page-gutter) * 2);

  --bg-image: url("../images/bg-body-20260818.webp?v=2");

  --lightbox-top-inset: 180px;
  --lightbox-side-gap: 24px;
}

/* ---------- Reset / base ---------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: url("../images/bg-body-20260818.webp?v=2");
  background-image: image-set(
    url("../images/bg-body-20260818.avif?v=2") type("image/avif"),
    url("../images/bg-body-20260818.webp?v=2") type("image/webp")
  );
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  /* Keep one viewport-sized image so the watermark area stays outside the crop. */
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Sticky footer: short CMS pages must not leave empty damask below footer */
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
}

.container {
  width: 100%;
  max-width: var(--page-shell);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.accent {
  color: var(--text-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  padding: 14px 26px;
  box-shadow: 0 8px 24px rgba(0, 176, 160, 0.35);
}

.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 176, 160, 0.45);
}

.btn-lg {
  padding: 17px 32px;
  font-size: 14px;
}

.btn-sm {
  padding: 12px 22px;
  font-size: 12px;
}

.btn-light {
  background: #fff;
  color: var(--teal);
  padding: 15px 34px;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.arrow {
  transition: transform 0.2s ease;
}

.btn:hover .arrow,
.link-more:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 960;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 16px;
}

.logo img {
  height: 80px;
  width: auto;
}

.header-contacts {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-contact:hover {
  color: var(--text-soft);
}

.header-contact-icon {
  display: inline-flex;
  color: var(--text-soft);
}

.header-contact-icon svg {
  width: 17px;
  height: 17px;
}

.header-contacts-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 1023px) {
  .header-contacts {
    display: none;
  }
}

.main-nav {
  background: var(--nav-gradient);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* ---------- Submenu bar ---------- */

.nav-home {
  position: relative;
  z-index: 5;
}

/* Section pages: reserve space below nav so absolute submenu does not cover breadcrumb.
   Use margin (not padding) — padding:0 on .site-intro--subpage .nav-home would wipe padding,
   and padding also inflates absolute top:100% and pushes the panel onto the breadcrumb. */
.nav-home.has-docked-submenu,
.site-intro--subpage .nav-home.has-docked-submenu,
.intro-stack .nav-home.has-docked-submenu {
  margin-bottom: var(--submenu-dock-height, 110px);
}

/* Overlay under the nav — never pushes page content (stops jump/flicker). */
.main-nav-submenu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 950;
  background: rgba(0, 0, 0, 0.5);
  background: color(a98-rgb 0 0 0 / 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    max-height 0.2s ease,
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.main-nav-submenu.is-visible {
  max-height: 320px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Sticky: do NOT pin the submenu. Fixed submenu overlaps .page-breadcrumb-bar.
   Keep it absolute under .nav-home so it scrolls away with the intro; only main nav stays pinned. */

.main-nav-submenu__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px var(--page-gutter);
}

.main-nav-submenu__list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
}

.main-nav-submenu__list.is-visible {
  display: flex;
}

.main-nav-submenu__list li {
  white-space: nowrap;
}

.main-nav-submenu__list a {
  display: inline-block;
  padding: 4px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav-submenu__list li:last-child a {
  border-right: none;
}

.main-nav-submenu__list a:hover {
  background: rgba(150, 85, 85, 0.08);
  color: #fff;
}

.main-nav-submenu__list a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
  color: #fff;
}

.main-nav-submenu__list a.is-active,
.main-nav-submenu__list a.is-active:hover {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border-bottom: 3px solid var(--teal, #00b0a0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.main-nav li.has-sub.is-open > a {
  color: #fff;
  text-decoration: none;
}

.main-nav li.has-sub.is-open > a.is-active::after,
.main-nav li > a.is-active::after,
.main-nav li > a.active::after,
.main-nav li > a[aria-current="page"]::after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 70%;
  max-width: 7.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--teal);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
}

.main-nav li.has-sub.is-open {
  position: relative;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0 4px;
  max-width: var(--container);
  margin: 0 auto;
}

.main-nav li {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  min-width: max-content;
}

.main-nav li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(88, 6, 30, 0.45);
  z-index: 3;
  pointer-events: none;
}

.main-nav a {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 56px;
  padding: 18px 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

/* Uiverse sweet-bobcat-36: transparent 3D hover — desktop only (961+)
   Do NOT apply below 961px: mobile hamburger uses max-height:0 + overflow:hidden. */
@media (min-width: 961px) {
  .main-nav,
  .intro-stack .main-nav,
  .site-intro--subpage .main-nav,
  .main-nav.is-pinned {
    overflow: visible;
  }

  .main-nav > ul > li > a,
  .main-nav > ul > li > .main-nav__link {
    background: transparent;
    border: none;
    border-radius: 5px;
    outline: none;
    box-shadow: none;
    transition: box-shadow 0.25s ease, color 0.25s ease;
  }

  .main-nav > ul > li > a:hover,
  .main-nav > ul > li > .main-nav__link:hover {
    background: transparent;
    color: #fff;
    text-decoration: none;
    box-shadow:
      4px 4px 6px 0 rgba(255, 255, 255, 0.5),
      -4px -4px 6px 0 rgba(116, 125, 136, 0.5),
      inset -4px -4px 6px 0 rgba(255, 255, 255, 0.2),
      inset 4px 4px 6px 0 rgba(0, 0, 0, 0.4);
  }

  .main-nav > ul > li.has-sub.is-open > a,
  .main-nav > ul > li.has-sub.is-open > .main-nav__link {
    background: transparent;
    color: #fff;
    box-shadow: none;
    text-decoration: none;
  }

  /* Scroll-spy / current page — teal underline (not on bare hover) */
  .main-nav > ul > li > a.is-active,
  .main-nav > ul > li > a.active,
  .main-nav > ul > li > a[aria-current="page"],
  .main-nav > ul > li > .main-nav__link.is-active,
  .main-nav > ul > li > .main-nav__link.active,
  .main-nav > ul > li > .main-nav__link[aria-current="page"] {
    background: transparent;
    color: #fff;
    box-shadow: none;
    text-decoration: none;
  }

  .main-nav > ul > li > a.is-active::after,
  .main-nav > ul > li > a.active::after,
  .main-nav > ul > li > a[aria-current="page"]::after,
  .main-nav > ul > li > .main-nav__link.is-active::after,
  .main-nav > ul > li > .main-nav__link.active::after,
  .main-nav > ul > li > .main-nav__link[aria-current="page"]::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 70%;
    max-width: 7.5rem;
    height: 3px;
    border-radius: 2px;
    background: var(--teal);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 4;
  }

}

/* Garāki nosaukumi — nedaudz platāka kolonna */
.main-nav li:has(a[href="#produkti"]),
.main-nav li:has(a[href*="#produkti"]),
.main-nav li:has(a[href="#iebuvetie-skapji"]),
.main-nav li:has(a[href*="#iebuvetie-skapji"]),
.main-nav li:has(a[href="/iebuvetie-skapji"]),
.main-nav li:has(a[href*="iebuvetie-skapji"]),
.main-nav li:has(a[href="/gatavas-mebeles"]),
.main-nav li:has(a[href*="gatavas-mebeles"]) {
  flex: 1.55 1 auto;
  min-width: max-content;
}

.main-nav li:has(a[href="#produkti"]) a,
.main-nav li:has(a[href*="#produkti"]) a,
.main-nav li:has(a[href="#iebuvetie-skapji"]) a,
.main-nav li:has(a[href*="#iebuvetie-skapji"]) a,
.main-nav li:has(a[href="/iebuvetie-skapji"]) a,
.main-nav li:has(a[href*="iebuvetie-skapji"]) a,
.main-nav li:has(a[href="/gatavas-mebeles"]) a,
.main-nav li:has(a[href*="gatavas-mebeles"]) a {
  padding-left: 14px;
  padding-right: 14px;
  letter-spacing: 0.03em;
}


/* ---------- Homepage sticky menu ---------- */
/* sticky bar regression fix v165 */
/* mobile scroll bg + call animation v166 */
/* short-height landscape mobile nav v167 */

.home-sticky-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  z-index: 961;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Frosted card bg on scroll (all pages with sticky bar) */
.home-sticky-bar.is-scrolled {
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.home-sticky-bar-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(6px, 2vw, 12px);
  padding-top: 8px;
  padding-bottom: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.logo.logo--compact {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 0;
  overflow: hidden;
}

.logo--compact img {
  display: block;
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.home-sticky-bar-top .nav-toggle--sticky {
  position: static;
  transform: none;
  right: auto;
  top: auto;
}

.nav-toggle--sticky {
  display: flex;
  flex-shrink: 0;
  margin-left: auto;
}

.header-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--teal-dark) 0%, var(--teal) 50%, #33c4b8 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 176, 160, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.header-call-btn svg {
  width: 20px;
  height: 20px;
}

.header-call-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(0, 176, 160, 0.3);
  animation: none;
}

@keyframes call-btn-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 176, 160, 0.35), 0 0 0 0 rgba(0, 176, 160, 0.35);
  }
  50% {
    box-shadow: 0 2px 8px rgba(0, 176, 160, 0.35), 0 0 0 6px rgba(0, 176, 160, 0);
  }
}

@media (max-width: 960px) {
  .home-sticky-bar.is-scrolled .home-sticky-bar-top {
    padding-top: 12px;
    padding-bottom: 12px;
    min-height: 56px;
  }

  body.home-sticky-active .home-sticky-bar.is-scrolled .home-sticky-bar-top {
    padding-top: 16px;
    padding-bottom: 16px;
    min-height: 72px;
  }
}

/* sticky bar tablet padding fix */
/* External homepage only: taller sticky bar + oversized hamburger */
body.home-sticky-active .home-sticky-bar-top {
  padding-top: 14px;
  padding-bottom: 14px;
  min-height: 72px;
}

body.home-sticky-active .logo--compact img {
  height: 56px;
}

body.home-sticky-active .nav-toggle--sticky {
  width: 50px;
  height: 50px;
  padding: 12px;
  gap: 6px;
}

body.home-sticky-active .nav-toggle--sticky span {
  height: 3px;
}

body.home-sticky-active .nav-toggle--sticky.open span:nth-child(1),
body.home-sticky-active .nav-toggle--sticky[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

body.home-sticky-active .nav-toggle--sticky.open span:nth-child(3),
body.home-sticky-active .nav-toggle--sticky[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.main-nav.is-pinned {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 960;
  width: min(var(--container), calc(100% - 32px));
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  transform: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

body.home-sticky-active .main-nav.is-pinned {
  top: var(--home-sticky-nav-top, 0);
}

body.home-sticky-active .main-nav.is-pinned ul {
  max-width: 100%;
}

.nav-home {
  order: 3;
}

.nav-placeholder {
  display: block;
  width: 100%;
}


#mebeles-katalogs {
  scroll-margin-top: 88px;
}
#virtuves-katalogs {
  scroll-margin-top: 88px;
}

#ergonomika,
#tehnikas-pieslegumi,
#ka-top-virtuve {
  scroll-margin-top: 88px;
}


section[id],
article[id].service-card {
  scroll-margin-top: 88px;
}

.main-nav a.active,
.main-nav a.is-active {
  background: transparent;
}

/* Hamburger */

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 8px;
  background: linear-gradient(180deg, var(--teal-dark) 0%, var(--teal) 50%, #33c4b8 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1),
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2),
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3),
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Site intro (logo → attēls → izvēlne) ---------- */

.site-intro {
  display: flex;
  flex-direction: column;
  background: transparent;
}

.intro-stack {
  order: 2;
  width: 100%;
  max-width: var(--page-shell);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.intro-stack .intro-hero-image {
  order: unset;
  padding: 0;
}

.intro-stack .hero-scene {
  max-width: none;
  width: 100%;
  border-radius: 0;
}

.intro-stack .nav-home {
  order: unset;
  padding: 0;
}

.intro-stack .main-nav {
  border-radius: 0;
  border-top: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.intro-stack .main-nav ul {
  max-width: 100%;
}

.intro-stack .main-nav li {
  flex: 1 1 auto;
  min-width: max-content;
}


.site-intro--subpage {
  width: 100%;
  max-width: var(--page-shell);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.site-intro--subpage .nav-home {
  padding: 0;
}

.site-intro--subpage .main-nav {
  border-radius: 0;
  border-top: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.site-intro--subpage .main-nav ul {
  max-width: 100%;
}

.site-intro--subpage .main-nav li {
  flex: 1 1 auto;
  min-width: max-content;
}


.intro-logo-bar {
  order: 1;
  padding: 20px 0 16px;
  background: transparent;
}

.intro-logo-bar .intro-logo-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--page-shell);
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.intro-logo-bar .logo img {
  height: 80px;
}

.intro-hero-image {
  order: 2;
  line-height: 0;
  background: transparent;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.site-intro .intro-stack .intro-hero-image {
  padding: 0;
}

/* ---------- Hero scene (fixed people + rotating kitchen bg) ---------- */

.hero-scene {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  contain: layout style paint;
  background: #1a1a1e;
}

.hero-scene__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-scene__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.hero-scene__bg-img.is-active {
  opacity: 1;
}

.hero-scene__people,
.hero-scene__people-shadow {
  position: absolute;
  inset: 0;
  margin-left: clamp(72px, 22vw, 256px);
  width: clamp(58%, 70%, 70%);
  height: 98%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-scene__people-shadow {
  z-index: 2;
  filter: brightness(0) blur(clamp(8px, 1.4vw, 16px));
  opacity: 0.36;
  transform: translate(clamp(6px, 1.1%, 14px), clamp(8px, 1.6%, 20px));
}

.hero-scene__people {
  z-index: 3;
}
@media (prefers-reduced-motion: reduce) {
  .hero-scene__bg-img {
    transition: none;
  }
}




/* ---------- Hero1 (zem izvēlnes) ---------- */

.intro-stack .hero1 {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.intro-stack .hero1__panel {
  padding-left: 0;
  padding-right: 0;
}

.hero1__panel {
  width: 100%;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  background: transparent;
}

.hero1__layout {
  display: grid;
  grid-template-columns: minmax(0, min(520px, 100%)) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
  padding-top: 60px;
}

.hero1__content {
  width: 100%;
  max-width: min(100%, 520px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hero1__content-viewport {
  overflow: hidden;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hero1__content-track {
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  align-items: stretch;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero1__content-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.hero1__content-slide .btn-hero1 {
  margin-top: 24px;
  align-self: flex-start;
  width: auto;
  max-width: 100%;
}

.hero1__slider {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero1__slider-viewport {
  overflow-x: hidden;
  overflow-y: visible;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hero1__slider-track {
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  align-items: stretch;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero1__slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero1__card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero1__card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.38);
}

.hero1__card-img {
  flex-shrink: 0;
  line-height: 0;
  aspect-ratio: 380 / 260;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

.hero1__card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero1__card-body {
  position: static;
  flex: 1 1 auto;
  padding: 14px 16px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
  transition: background 0.25s ease;
}

.hero1__card:hover .hero1__card-body {
  background: var(--card-hover);
}

.hero1__card-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(224, 24, 72, 0.14);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero1__card-body h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: #fff;
}

.hero1__card-body p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}

.hero1__slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero1__slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero1__slider-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

.hero1__slider-dot:hover,
.hero1__slider-dot:focus-visible {
  background: var(--teal);
  outline: none;
}

.hero1__content h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
}

.hero1__sub {
  margin-top: 16px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text);
}

.hero1__sub .dot {
  color: var(--text-soft);
  margin: 0 6px;
}

.hero1__features {
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.hero1__features li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 500;
  color: var(--text);
}

.hero1__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  color: #fff;
}

.hero1__icon svg {
  width: 20px;
  height: 20px;
}

.btn-hero1 {
  background: var(--accent);
  color: #fff;
  padding: 17px 32px;
  box-shadow: 0 8px 28px rgba(224, 24, 72, 0.45);
}

.btn-hero1:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(224, 24, 72, 0.55);
}

@media (max-width: 960px) {
  .hero1__layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero1__content {
    width: auto;
    max-width: none;
    display: block;
    min-height: 0;
  }

  .hero1__content-viewport {
    display: block;
    flex: none;
  }

  .hero1__content-track {
    height: auto;
    flex: none;
    align-items: stretch;
  }

  .hero1__content-slide {
    display: block;
    height: auto;
    min-height: 0;
  }

  .hero1__content-slide .btn-hero1 {
    margin-top: 0;
  }

  .hero1__slider {
    display: block;
    height: auto;
    max-width: none;
  }

  .hero1__slider-viewport {
    display: block;
    flex: none;
  }

  .hero1__slider-track {
    height: auto;
    flex: none;
  }

  .hero1__slide {
    display: block;
    height: auto;
  }

  .hero1__card {
    height: auto;
    flex: none;
  }

  .hero1__card-body {
    flex: none;
  }
}

@media (max-width: 640px) {
  .hero1__panel {
    padding: 28px 20px 32px;
  }

  .intro-stack .hero1__panel {
    padding-left: 0;
    padding-right: 0;
  }

  .hero1__features {
    margin: 18px 0 22px;
    gap: 10px;
  }

  .hero1__icon {
    width: 36px;
    height: 36px;
  }

  .hero1__slider {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero1__slider-track,
  .hero1__content-track {
    transition: none;
  }
}


/* ---------- Services ---------- */

.services {
  padding: 56px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  background: var(--card-hover);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.service-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-img img {
  transform: scale(1.06);
}

.service-body {
  position: relative;
  padding: 40px 24px 26px;
}

.service-icon {
  position: absolute;
  top: -28px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(224, 24, 72, 0.45);
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
}


.service-topics {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.service-topics li + li {
  border-top: 1px solid var(--line);
}

.service-topics a {
  display: block;
  padding: 9px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-topics a:hover {
  color: var(--teal-text);
}

.service-body .service-topics {
  margin-top: 4px;
}

.services-grid {
  align-items: start;
}

.service-body p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.link-more:hover {
  color: #fff;
}

/* ---------- Gallery ---------- */

.gallery {
  padding: 24px 0 64px;
}

.gallery--page {
  min-height: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2,
.why-us h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  overflow-anchor: none;
  min-height: 0;
}

.gallery-grid.is-empty,
.gallery-grid[hidden] {
  display: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  overflow-anchor: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px) scale(1.015);
  box-shadow: inset 2px 2px 2px 0 rgba(255, 255, 255, 0.5),
    7px 7px 20px 0 rgba(0, 0, 0, 0.28),
    4px 4px 6px 0 rgba(255, 255, 255, 0.28),
    -4px -4px 6px 0 rgba(116, 125, 136, 0.32),
    inset -4px -4px 6px 0 rgba(255, 255, 255, 0.2),
    inset 4px 4px 6px 0 rgba(0, 0, 0, 0.4);
}

.gallery-item.is-filtered-out {
  display: none !important;
}

/* ---------- Gallery filter (chips / pill buttons) ---------- */

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 20px 0 28px;
}

.gallery-filter__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gallery-filter__label {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: 2px;
}

.gallery-filter__chip {
  appearance: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 9px 18px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition:
    color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-filter__chip:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.55);
  background: var(--card-hover);
  box-shadow: 0 2px 10px rgba(45, 212, 191, 0.08);
  transform: translateY(-1px);
}

.gallery-filter__chip:active {
  transform: translateY(0);
  box-shadow: none;
}

.gallery-filter__chip:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.22);
}

.gallery-filter__chip.is-active,
.gallery-filter__chip[aria-pressed="true"] {
  color: var(--teal-text);
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.2),
    0 4px 16px rgba(45, 212, 191, 0.12);
  transform: translateY(0);
}

.gallery-filter__chip.is-active:hover,
.gallery-filter__chip[aria-pressed="true"]:hover {
  color: var(--teal-text);
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.15);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.25),
    0 4px 18px rgba(45, 212, 191, 0.16);
  transform: none;
}

.gallery-filter-empty {
  margin: -8px 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Gallery filter mobile ---------- */

@media (max-width: 960px) {
  .gallery-filter {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 16px 0 24px;
  }

  .gallery-filter__label {
    width: 100%;
    font-size: 12px;
    margin-right: 0;
  }

  .gallery-filter__chips {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--page-gutter));
    padding: 2px var(--page-gutter) 8px;
    scroll-snap-type: x proximity;
  }

  .gallery-filter__chips::-webkit-scrollbar {
    display: none;
  }

  .gallery-filter__chip {
    flex: 0 0 auto;
    font-size: 12.5px;
    padding: 10px 16px;
    min-height: 40px;
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .gallery-filter {
    gap: 8px;
    margin: 12px 0 20px;
  }

  .gallery-filter__chip {
    font-size: 12px;
    padding: 10px 14px;
    min-height: 42px;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-item__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.gallery-item__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* ---------- Products ---------- */

.products {
  padding: 24px 0 64px;
}

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

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-6px);
  background: var(--card-hover);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.product-img {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.06);
}

/* No-image placeholder */

.product-no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 140px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  user-select: none;
  opacity: 0.55;
}

.product-page-main-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.04);
  line-height: normal;
}

.product-page-no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 200px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  user-select: none;
  opacity: 0.5;
}

.product-body {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-body h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.product-body p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.product-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-price {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---------- Why us ---------- */

.why-us {
  padding: 48px 0 56px;
}

.why-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.why-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}

.why-us h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.5vw, 28px);
}

.why-intro {
  flex: 1 1 280px;
  max-width: 520px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.stats-grid--compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat--compact {
  padding: 14px 10px;
  gap: 4px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.stat--compact:hover {
  transform: translateY(-2px);
}

.stat-icon--compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.stat-icon--compact svg {
  width: 21px;
  height: 21px;
}

.stat--compact:hover .stat-icon--compact {
  background: var(--accent);
  color: #fff;
}

.stat--compact .stat-number {
  font-size: 18px;
}

.stat--compact .stat-label {
  font-size: 12px;
}

.why-panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.why-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 28px;
  align-items: stretch;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 24, 72, 0.4);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--text-soft);
  background: var(--accent-soft);
}

.stat-icon svg {
  width: 28px;
  height: 28px;
}

.stat-number {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.why-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}

.why-card p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- CTA ---------- */

.cta {
  padding: 0;
  background: transparent;
  border: none;
}

.cta .container.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding: 40px var(--page-gutter);
  background: linear-gradient(100deg, var(--accent-dark) 0%, var(--accent) 55%, var(--accent-light) 130%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-text h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
}

.cta-text p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.8);
}

.cta-contacts {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.cta-contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}

.cta-contact:hover {
  color: #fff;
}

.cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cta-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- Contacts ---------- */

.contacts {
  padding: 64px 0 72px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 28px;
  align-items: start;
}

.contacts-form-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-map {
  margin-top: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
}

.contact-map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.contact-map-head h3 {
  font-family: var(--font-head);
  font-size: 17px;
  margin: 0;
}

.contact-map-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  transition: opacity 0.2s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.contact-map-link:hover {
  opacity: 0.85;
}

.contact-map-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  min-height: 260px;
  background: var(--bg);
}

.contact-map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-info {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-list li > div {
  flex: 1;
  min-width: 0;
}

.contact-list a,
.contact-list li > div > span:not(.contact-label) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  color: var(--text-soft);
}

.contact-icon svg {
  width: 19px;
  height: 19px;
}

.contact-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.contact-list a {
  font-weight: 600;
  transition: color 0.2s ease;
}

.contact-list a:hover {
  color: var(--text-soft);
}

.contact-team {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.contact-team h3 {
  font-family: var(--font-head);
  font-size: 17px;
  margin-bottom: 16px;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-list li {
  display: block;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: var(--bg-soft);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.team-name {
  font-weight: 700;
  font-size: 14px;
}

.team-name small {
  font-weight: 500;
  color: var(--muted);
}

.team-list a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.team-info a {
  word-break: break-word;
}

.team-list a:hover {
  color: var(--text-soft);
}

.contact-note {
  margin-top: 18px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

.contact-requisites {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.contact-requisites h3 {
  font-family: var(--font-head);
  font-size: 17px;
  margin-bottom: 14px;
}

.requisites-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.requisites-row {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.requisites-row dt {
  color: var(--muted);
  font-weight: 500;
}

.requisites-row dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}


.contact-form-head {
  margin-bottom: 16px;
}

.contact-form-head h3 {
  font-family: var(--font-head);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  margin: 0 0 8px;
}

.contact-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.form-required-note {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.req-star {
  color: var(--accent);
  font-weight: 700;
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--text-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form .form-field input,
.contact-form .form-field textarea {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.contact-form .form-field input:focus,
.contact-form .form-field textarea:focus {
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  cursor: pointer;
}

.form-consent a {
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(109, 224, 212, 0.45);
  text-underline-offset: 2px;
}

.form-consent a:hover {
  color: var(--teal);
  text-decoration-color: var(--teal);
}

.form-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}


.field-error {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--accent);
}

.field-error:empty {
  display: none;
}

.field-error--consent {
  margin-top: 8px;
  margin-left: 26px;
}

.contact-form .form-field input.is-invalid,
.contact-form .form-field textarea.is-invalid {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-consent input[type="checkbox"].is-invalid {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--teal);
  min-height: 1.4em;
}

/* ---------- Footer ---------- */

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: rgba(0, 0, 0, 0.5);
  padding-top: 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.1fr 1.1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  max-width: 240px;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.socials a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.footer-col h4,
.footer-col .footer-col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.footer-col ul a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-col ul a:hover {
  color: var(--text-soft);
}

.footer-contacts li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contacts svg {
  width: 16px;
  height: 16px;
  color: var(--text-soft);
  flex: 0 0 auto;
}

.footer-hours li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.footer-hours span {
  color: var(--text);
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--text-soft);
}

/* ---------- Legal pages (privacy / cookies) ---------- */

.legal-page {
  padding: 120px 0 70px;
}

.legal-page .container {
  max-width: var(--page-shell);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 36px 44px;
}

.legal-page h1 {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 36px;
}

.legal-page h2 {
  font-family: var(--font-head);
  font-size: 17px;
  margin: 34px 0 12px;
}

.legal-page p,
.legal-page li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.legal-page ul {
  margin: 10px 0 10px 20px;
  list-style: disc;
}

.legal-page a {
  color: var(--text-soft);
}

.legal-page a:hover {
  text-decoration: underline;
}

/* --- Image grid (1–4 columns) --- */
.image-grid-1 {
  display: block;
  margin: 24px 0;
  max-width: 100%;
}
.image-grid-1 img {
  width: 100%;
  max-width: min(100%, 800px);
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.image-grid-2 {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  max-width: 100%;
  min-width: 0;
}
.image-grid-2 > * {
  flex: 1;
  min-width: 0;
}
.image-grid-2 img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}
.image-grid-2 picture {
  display: block;
  width: 100%;
}
.image-grid-2 picture img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}
/* Mobile carousel for image-grid-* is defined after .image-grid-4 */

.image-grid-2--wide-left > :first-child { flex: 1.5; }
.image-grid-2--wide-left > :last-child { flex: 1; }
.image-grid-2--wide-right > :first-child { flex: 1; }
.image-grid-2--wide-right > :last-child { flex: 1.5; }

.cms-content .image-grid-2,
.cms-content .image-grid-3 {
  max-width: 100%;
}

.image-grid-3 {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}
.image-grid-3 > * {
  flex: 1;
  min-width: 0;
}
.image-grid-3 img,
.image-grid-3 picture img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}
.image-grid-3 picture {
  display: block;
  width: 100%;
}
/* see shared mobile image-grid carousel below */

.image-grid-4 {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}
.image-grid-4 > * {
  flex: 1;
  min-width: 0;
}
.image-grid-4 img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}
@media (max-width: 900px) {
  .image-grid-4 {
    flex-wrap: wrap;
  }
  .image-grid-4 > * {
    flex: 1 1 calc(50% - 12px);
  }
}
/* Mobile: swipeable image carousel (replaces stacked column layout) */
@media (max-width: 640px) {
  .image-grid-2,
  .image-grid-3,
  .image-grid-4 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 0;
    margin: 18px 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x pan-y;
  }

  .image-grid-2::-webkit-scrollbar,
  .image-grid-3::-webkit-scrollbar,
  .image-grid-4::-webkit-scrollbar {
    display: none;
  }

  .image-grid-2 > *,
  .image-grid-3 > *,
  .image-grid-4 > * {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    margin: 0 !important;
  }

  .image-grid-2 img,
  .image-grid-3 img,
  .image-grid-4 img,
  .image-grid-2 picture img,
  .image-grid-3 picture img,
  .image-grid-4 picture img,
  .cms-content .image-grid-2 img,
  .cms-content .image-grid-3 img,
  .cms-content .image-grid-4 img,
  .cms-content .image-grid-2 img.cms-img--sm,
  .cms-content .image-grid-2 img.cms-img--md,
  .cms-content .image-grid-2 img.cms-img--lg,
  .cms-content .image-grid-2 img.cms-img--full,
  .cms-content .image-grid-3 img.cms-img--sm,
  .cms-content .image-grid-3 img.cms-img--md,
  .cms-content .image-grid-3 img.cms-img--lg,
  .cms-content .image-grid-3 img.cms-img--full,
  .cms-content .image-grid-4 img.cms-img--sm,
  .cms-content .image-grid-4 img.cms-img--md,
  .cms-content .image-grid-4 img.cms-img--lg,
  .cms-content .image-grid-4 img.cms-img--full {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    max-height: min(68vh, 480px);
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: var(--radius-sm);
  }

  .image-grid-2 picture,
  .image-grid-3 picture,
  .image-grid-4 picture {
    display: block;
    width: 100%;
  }

  .cms-content .image-grid-2.cms-img--sm,
  .cms-content .image-grid-2.cms-img--md,
  .cms-content .image-grid-2.cms-img--lg,
  .cms-content .image-grid-2.cms-img--full,
  .cms-content .image-grid-3.cms-img--sm,
  .cms-content .image-grid-3.cms-img--md,
  .cms-content .image-grid-3.cms-img--lg,
  .cms-content .image-grid-3.cms-img--full,
  .cms-content .image-grid-4.cms-img--sm,
  .cms-content .image-grid-4.cms-img--md,
  .cms-content .image-grid-4.cms-img--lg,
  .cms-content .image-grid-4.cms-img--full {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .cms-img-carousel__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
    padding: 0;
  }

  .cms-img-carousel__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .cms-img-carousel__dot.is-active {
    background: var(--teal, #00b0a0);
    transform: scale(1.15);
  }

  .cms-img-carousel__dot:focus-visible {
    outline: 2px solid var(--teal, #00b0a0);
    outline-offset: 2px;
  }
}

@media (min-width: 641px) {
  .cms-img-carousel__dots {
    display: none;
  }
}

.cms-img-carousel__stage {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

/* Same swipe cue as product page, scoped to CMS image carousels */
.cms-img-carousel__stage > .product-swipe-hint {
  border-radius: var(--radius-sm);
  z-index: 4;
}

.cms-img-carousel__stage > .product-swipe-hint .product-swipe-hint__icon {
  width: min(140px, 42vw) !important;
  max-width: 140px !important;
}

.cms-img-carousel__stage > .product-swipe-hint .product-swipe-hint__text,
.about-panel .cms-img-carousel__stage > .product-swipe-hint p.product-swipe-hint__text {
  color: #fff !important;
  margin: 0 !important;
  font-size: clamp(0.8rem, 3.4vw, 0.95rem) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

@media (max-width: 640px) {
  .cms-img-carousel__stage > .product-swipe-hint {
    display: flex;
  }
}

@media (min-width: 641px) {
  .cms-img-carousel__stage > .product-swipe-hint {
    display: none !important;
  }
}


/* CMS image display sizes (chosen in admin image dialog) */
.cms-content .cms-img-wrap.cms-img--sm,
.cms-content .image-grid-1.cms-img--sm,
.cms-content .image-grid-2.cms-img--sm,
.cms-content .image-grid-3.cms-img--sm,
.cms-content .image-grid-4.cms-img--sm,
.cms-content img.cms-img--sm {
  max-width: min(100%, 360px);
  margin-left: auto;
  margin-right: auto;
}
.cms-content .cms-img-wrap.cms-img--md,
.cms-content .image-grid-1.cms-img--md,
.cms-content .image-grid-2.cms-img--md,
.cms-content .image-grid-3.cms-img--md,
.cms-content .image-grid-4.cms-img--md,
.cms-content img.cms-img--md {
  max-width: min(100%, 560px);
  margin-left: auto;
  margin-right: auto;
}
.cms-content .cms-img-wrap.cms-img--lg,
.cms-content .image-grid-1.cms-img--lg,
.cms-content .image-grid-2.cms-img--lg,
.cms-content .image-grid-3.cms-img--lg,
.cms-content .image-grid-4.cms-img--lg,
.cms-content img.cms-img--lg {
  max-width: min(100%, 760px);
  margin-left: auto;
  margin-right: auto;
}
.cms-content .cms-img-wrap.cms-img--full,
.cms-content .image-grid-1.cms-img--full,
.cms-content .image-grid-2.cms-img--full,
.cms-content .image-grid-3.cms-img--full,
.cms-content .image-grid-4.cms-img--full,
.cms-content img.cms-img--full {
  max-width: 100%;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.cms-content .cms-img-wrap {
  display: block;
  text-align: center;
}
.cms-content .cms-img-wrap img {
  width: 100%;
  height: auto;
}

/* Honor editor-set image width attribute on the live site */
.cms-content img[width] {
  width: auto;
  max-width: 100%;
  height: auto;
}
/* Single-image wraps may keep intrinsic width; multi-image grids must share row space */
.cms-content .image-grid-1 img[width],
.cms-content .cms-img-wrap img[width] {
  width: auto;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
}
.cms-content .image-grid-2 img[width],
.cms-content .image-grid-3 img[width],
.cms-content .image-grid-4 img[width] {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.cms-content .image-grid-2.cms-img--sm,
.cms-content .image-grid-2.cms-img--md,
.cms-content .image-grid-2.cms-img--lg,
.cms-content .image-grid-3.cms-img--sm,
.cms-content .image-grid-3.cms-img--md,
.cms-content .image-grid-3.cms-img--lg,
.cms-content .image-grid-4.cms-img--sm,
.cms-content .image-grid-4.cms-img--md,
.cms-content .image-grid-4.cms-img--lg {
  width: 100%;
}

/* Also make standalone images in cms-content larger */
.cms-content p > img:only-child {
  max-width: 90%;
}
.cms-content img:not([style*="float"]):not([class*="cms-img--"]) {
  max-width: min(100%, 800px);
}
.cms-content picture {
  display: block;
  margin: 16px 0;
}
.cms-content picture img {
  max-width: min(100%, 800px);
  height: auto;
  border-radius: var(--radius-sm);
}

/* --- CMS rich-text content (Summernote output) --- */
.cms-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cms-content > *:first-child {
  margin-top: 0;
}

.cms-content p {
  margin: 0 0 16px;
}

.cms-content h2,
.cms-content h3,
.cms-content h4 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.3;
  margin: 30px 0 12px;
}

.cms-content h2 {
  font-size: clamp(20px, 3vw, 26px);
}

.cms-content h3 {
  font-size: clamp(18px, 2.4vw, 21px);
}

.cms-content h4 {
  font-size: 17px;
}

.cms-content ul,
.cms-content ol {
  margin: 0 0 16px 22px;
}

.cms-content li {
  margin-bottom: 6px;
}

.cms-content a {
  color: var(--text-soft);
  text-decoration: underline;
}

/* Responsive images that never overflow the content column */
.cms-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Standalone image on its own line gets breathing room and centers */
.cms-content p > img:only-child {
  display: block;
  margin: 8px auto;
}

/* Floated image + text: keep the text top aligned with the image top */
.cms-content img[style*="float: left"],
.cms-content img[style*="float:left"],
.cms-content img.float-start {
  float: left;
  margin: 4px 24px 16px 0;
}

.cms-content img[style*="float: right"],
.cms-content img[style*="float:right"],
.cms-content img.float-end {
  float: right;
  margin: 4px 0 16px 24px;
}

/* Tables are the usual way images are placed beside text - align every cell
   to the same top level instead of vertical centering, so images and text
   start on one line. */
.cms-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
}

.cms-content table td,
.cms-content table th {
  vertical-align: top;
  padding: 12px 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cms-content table img {
  display: block;
}

.cms-content figure {
  margin: 0 0 20px;
}

.cms-content figure img {
  display: block;
}

.cms-content figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.cms-content::after {
  content: "";
  display: block;
  clear: both;
}

/* On phones, side-by-side image/text rows stack cleanly */
@media (max-width: 640px) {
  .cms-content img[style*="float: left"],
  .cms-content img[style*="float:left"],
  .cms-content img[style*="float: right"],
  .cms-content img[style*="float:right"],
  .cms-content img.float-start,
  .cms-content img.float-end {
    float: none;
    display: block;
    margin: 8px auto 16px;
  }

  .cms-content table,
  .cms-content table tbody,
  .cms-content table tr,
  .cms-content table td {
    display: block;
    width: 100%;
  }

  .cms-content table td {
    padding: 8px 0;
  }
}

.measure-guide {
  margin: 2rem 0;
}

.measure-guide img {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}


.measure-guide-html {
  margin: 2rem 0 2.5rem;
}

.measure-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.measure-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.4rem;
  border-left: 4px solid var(--line);
}

.measure-step--audums { border-left-color: #2d8a4e; }
.measure-step--kase { border-left-color: #c0392b; }
.measure-step--augstums { border-left-color: #2980b9; }

.measure-step__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.measure-step__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.measure-step--audums .measure-step__num { background: rgba(45, 138, 78, 0.12); color: #2d8a4e; }
.measure-step--kase .measure-step__num { background: rgba(192, 57, 43, 0.12); color: #c0392b; }
.measure-step--augstums .measure-step__num { background: rgba(41, 128, 185, 0.12); color: #2980b9; }

.measure-step__title {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
}

.measure-step p {
  margin: 0 0 0.65rem;
}

.measure-step p:last-child {
  margin-bottom: 0;
}

.measure-step__figure {
  margin: 1rem 0 0.75rem;
}

.measure-step__figure img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.measure-variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.measure-variant {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}

.measure-variant__label {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.measure-variant p {
  margin: 0;
  font-size: 0.92rem;
}

.measure-variant__figure {
  margin-top: 0.75rem;
}

.measure-variant__figure img {
  display: block;
  width: 250px;
  height: 250px;
  max-width: 250px;
  margin: 0 auto;
  object-fit: contain;
}

.measure-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem !important;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.measure-note--ok {
  background: rgba(45, 138, 78, 0.08);
  border: 1px solid rgba(45, 138, 78, 0.25);
}

.measure-note--warn {
  background: rgba(41, 128, 185, 0.08);
  border: 1px solid rgba(41, 128, 185, 0.25);
}

.measure-note__icon {
  flex-shrink: 0;
  font-weight: 700;
}

.measure-summary {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.measure-summary h2 {
  margin: 0 0 1.15rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.measure-summary__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.measure-summary__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border-top: 3px solid var(--line);
}

.measure-summary__item--audums { border-top-color: #2d8a4e; }
.measure-summary__item--kase { border-top-color: #c0392b; }
.measure-summary__item--augstums { border-top-color: #2980b9; }

.measure-summary__num {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  color: var(--text-soft);
}

.measure-summary__item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.measure-summary__item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.measure-footnotes {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.measure-footnotes p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .measure-variants,
  .measure-summary__grid {
    grid-template-columns: 1fr;
  }

  .measure-step {
    padding: 1.1rem 1.15rem;
  }
}


/* ---------- About us (index) ---------- */

.about-us {
  padding: 36px 0 44px;
}

.about-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-panel__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

/* Two columns only when the side carousel is present */
.about-panel__inner:has(.about-carousel) {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
}

.about-panel__content {
  padding: 22px 26px 20px;
}

.about-panel p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.about-panel p:last-of-type {
  margin-bottom: 0;
}

.about-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}

.about-panel a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-panel a:hover {
  color: var(--accent);
}

.about-panel a.btn:hover,
.about-panel a.btn:focus-visible {
  color: #fff;
}

.about-signoff {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.about-carousel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--bg);
  align-self: stretch;
}

.about-carousel__viewport {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: var(--bg);
}

.about-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.about-carousel__slide.is-active {
  opacity: 1;
}

.about-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.about-carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.about-carousel__dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.about-carousel__dot:hover,
.about-carousel__dot:focus-visible {
  background: var(--accent);
  outline: none;
}

.about-panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 8px;
}

.partner-logos--inline {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  gap: 12px;
  margin: 0 4px;
}

.partner-logo {
  display: inline-block;
  height: 28px;
  width: auto;
  max-width: 140px;
}

.partner-logos--inline .partner-logo {
  height: 32px;
  max-width: 150px;
}

.product-page-leasing .partner-logos--inline .partner-logo {
  height: 36px;
  max-width: 168px;
}

.partner-logo--incredit {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* ---------- Catalog page (gatavas-mebeles.html) ---------- */

.catalog-page {
  padding: 36px 0 80px;
}

.catalog-page .catalog-footer-note {
  margin-top: 1cm;
  text-align: center;
}


.catalog-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--muted);
}

.catalog-breadcrumb a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.catalog-breadcrumb a:hover {
  color: var(--text-soft);
}


/* ---------- Catalog pagination (circular, contact-icon language) ---------- */
.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 36px;
  width: 100%;
}

.catalog-pagination__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-pagination__link,
.catalog-pagination__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  touch-action: manipulation;
  flex-shrink: 0;
  box-sizing: border-box;
}

.catalog-pagination__link {
  color: var(--text-soft);
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  box-shadow: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.catalog-pagination__link--prev,
.catalog-pagination__link--next {
  width: auto;
  min-width: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.catalog-pagination__link:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(224, 24, 72, 0.35);
  box-shadow: 0 6px 18px rgba(224, 24, 72, 0.28);
  transform: translateY(-1px);
}

.catalog-pagination__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.catalog-pagination__link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.catalog-pagination__current {
  color: #fff;
  background: var(--teal);
  border: none;
  box-shadow: 0 8px 24px rgba(0, 176, 160, 0.4);
}

@media (max-width: 720px) {
  .catalog-pagination {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px 10px;
    margin-top: 28px;
    padding: 0 2px;
  }

  .catalog-pagination__list {
    gap: 6px;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .catalog-pagination {
    gap: 6px 8px;
  }

  .catalog-pagination__list {
    gap: 5px;
  }

  .catalog-pagination__link,
  .catalog-pagination__current {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 14px;
  }

  .catalog-pagination__link--prev,
  .catalog-pagination__link--next {
    width: auto;
    min-width: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (hover: none) {
  .catalog-pagination__link:hover {
    transform: none;
    color: var(--text-soft);
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: none;
  }

  .catalog-pagination__link:active {
    color: #fff;
    background: rgba(224, 24, 72, 0.4);
    border-color: var(--accent);
  }
}

.catalog-page h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 0;
}

.catalog-grid {
  margin-top: 36px;
}


.catalog-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
  margin: 20px 0 28px;
  width: 100%;
}

.catalog-filter__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
}

.catalog-filter__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}

.catalog-filter__select {
  min-width: 240px;
  max-width: 100%;
  width: auto;
  box-sizing: border-box;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23aaa' d='M1.4 1.4 6 6l4.6-4.6L12 3.8 6 9.8 0 3.8z'/%3E%3C/svg%3E") no-repeat right 14px center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  color-scheme: dark;
  touch-action: manipulation;
  transition: border-color 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.catalog-filter__select:hover {
  background: var(--card-hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ccc' d='M1.4 1.4 6 6l4.6-4.6L12 3.8 6 9.8 0 3.8z'/%3E%3C/svg%3E") no-repeat right 14px center;
}

.catalog-filter__select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.catalog-filter__select option {
  background: rgba(0, 0, 0, 0.92);
  color: var(--text);
}

@media (max-width: 720px) {
  .catalog-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin: 16px 0 22px;
  }

  .catalog-filter__group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .catalog-filter__label {
    font-size: 13px;
  }

  .catalog-filter__select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 44px 12px 16px;
    font-size: 16px; /* prevents iOS zoom on focus */
    border-radius: 12px;
    background-position: right 16px center;
  }

  .catalog-filter__select:hover {
    background-position: right 16px center;
  }
}



/* ---------- Furniture catalog photo cards (active state for filters) ---------- */

.furniture-catalog__cat.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 16px 40px rgba(0, 0, 0, 0.35);
}

.furniture-catalog__cat.is-active .furniture-catalog__cat-cta .arrow {
  color: var(--accent-light);
}

.catalog-filter-empty {
  margin: 0 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.product-card.is-filtered-out {
  display: none !important;
}

.catalog-grid--4col {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.catalog-grid--4col .product-card--featured,
.catalog-grid--4col .product-card {
  grid-column: auto;
}

.catalog-grid--4col .product-card--featured .product-card-link,
.catalog-grid--4col .product-card-link {
  flex-direction: column;
}

.catalog-grid--4col .product-card--featured .product-img,
.catalog-grid--4col .product-img {
  flex: none;
  aspect-ratio: 4 / 3;
  min-height: 0;
}

.catalog-grid--4col .product-body {
  padding: 14px 16px 16px;
}

.catalog-grid--4col .product-title,
.catalog-grid--4col .product-body h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.catalog-grid--4col .product-teaser,
.catalog-grid--4col .product-body p {
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-grid--4col .product-foot {
  padding-top: 10px;
  gap: 8px;
}

.catalog-grid--4col .product-price {
  font-size: 11px;
}

.catalog-grid--4col .link-more {
  font-size: 13px;
}

.catalog-grid--4col .product-badges {
  top: 8px;
  left: 8px;
  gap: 4px;
}

.catalog-grid--4col .product-badge {
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 9px;
}

.catalog-note {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.catalog-note a {
  color: var(--text-soft);
}

.product-card--clickable {
  cursor: pointer;
}

.product-card--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.product-card--clickable .product-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.product-teaser {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.product-specs {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.product-specs li + li {
  margin-top: 6px;
}

/* ---------- Product modal ---------- */

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.product-modal.open {
  opacity: 1;
  visibility: visible;
}

body.product-modal-open .main-nav-submenu,
body.product-modal-open .home-sticky-bar {
  z-index: 200;
}

.product-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(40, 40, 44, 0.88);
}

.product-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(100dvh - 24px, 100vh - 24px);
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.55);
  padding: 18px 20px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.product-modal-close:hover {
  background: var(--accent-soft);
  color: var(--text-soft);
}

.product-modal-top {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px 16px;
  margin: 0;
  padding-right: 36px;
  flex: 0 0 auto;
  align-items: start;
}

.product-modal-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1;
  width: 100%;
  max-height: 120px;
}

.product-modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

.product-modal-info h2 {
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 0 0 6px;
  padding-right: 4px;
  line-height: 1.25;
}

.product-modal-price {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 8px;
}

.product-modal-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-modal-desc p {
  margin: 0;
}

.product-modal-form-wrap {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-modal-form-wrap .contact-form-head {
  margin-bottom: 8px;
}

.product-modal-form-wrap .contact-form-head h3,
.product-modal-form-wrap h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.product-modal-form-wrap .contact-form-head p,
.product-modal-form-lead {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.product-modal-form {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.product-modal-form .form-required-note {
  display: none;
}

.product-modal-form .form-field {
  margin: 0;
}

.product-modal-form .form-field label {
  font-size: 12px;
  margin-bottom: 4px;
}

.product-modal-form .form-field input,
.product-modal-form .form-field textarea {
  padding: 10px 12px;
  font-size: 14px;
}

.product-modal-form .form-field textarea {
  min-height: 72px;
  max-height: 96px;
  resize: none;
}

.product-modal-form .btn-lg {
  padding: 12px 20px;
  font-size: 13px;
  width: 100%;
  justify-content: center;
}

.product-modal-form .form-status {
  margin: 0;
  min-height: 0;
  font-size: 13px;
}

@media (max-width: 640px) {
  .product-modal {
    align-items: flex-end;
    padding: 0;
  }

  .product-modal-dialog {
    width: 100%;
    max-height: min(92dvh, 100vh - 8px);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 16px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .product-modal-top {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 12px;
    padding-right: 32px;
  }

  .product-modal-media {
    max-height: 72px;
  }

  .product-modal-info h2 {
    font-size: 17px;
  }

  .product-modal-desc {
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .product-modal-form .form-field textarea {
    min-height: 64px;
    max-height: 80px;
  }
}

@media (max-height: 720px) {
  .product-modal-top {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .product-modal-media {
    max-height: 88px;
  }

  .product-modal-desc {
    -webkit-line-clamp: 2;
  }

  .product-modal-form .form-field textarea {
    min-height: 56px;
    max-height: 72px;
  }
}




/* ---------- Furniture catalog (Mēbeļu katalogs) ---------- */

.furniture-catalog {
  padding: 72px 0 80px;
}

.furniture-catalog__feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.9fr);
  gap: 0;
  margin-bottom: 18px;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.furniture-catalog__feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: clamp(18px, 2.2vw, 28px) clamp(20px, 2.8vw, 32px);
  min-height: 0;
}

.furniture-catalog__feature-copy h3 {
  font-family: var(--font-head);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  max-width: 16ch;
}

.furniture-catalog__feature-copy p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  max-width: 42ch;
}

.furniture-catalog__feature-media {
  min-height: 0;
  line-height: 0;
  background: rgba(0, 0, 0, 0.35);
}

.furniture-catalog__feature-media picture {
  display: block;
  width: 100%;
  line-height: 0;
}

.furniture-catalog__feature-media img {
  width: 100%;
  height: auto;
  object-fit: unset;
  display: block;
}

.furniture-catalog__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.furniture-catalog__cat {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.furniture-catalog__cat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0.08) 68%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.furniture-catalog__cat-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.furniture-catalog__cat-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.furniture-catalog__cat h3 {
  font-family: var(--font-head);
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.furniture-catalog__cat-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.furniture-catalog__cat-cta .arrow {
  color: var(--accent);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.furniture-catalog__cat:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-4px);
}

.furniture-catalog__cat:hover .furniture-catalog__cat-img {
  transform: scale(1.04);
}

.furniture-catalog__cat:hover .furniture-catalog__cat-cta .arrow {
  transform: translateX(3px);
}

@media (max-width: 1023px) {
  .furniture-catalog__feature {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .furniture-catalog__feature-media {
    order: -1;
  }

  .furniture-catalog__feature-copy h3 {
    max-width: none;
  }

  .furniture-catalog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 639px) {
  .furniture-catalog {
    padding: 56px 0 64px;
  }

  .furniture-catalog__grid {
    grid-template-columns: 1fr;
  }

  .furniture-catalog__cat {
    aspect-ratio: 16 / 11;
  }

  .furniture-catalog__cat-overlay {
    padding: 16px 16px 18px;
  }
}


/* ---------- Page breadcrumb bar (product & subpages) ---------- */

.page-breadcrumb-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-bottom: none;
}

.page-breadcrumb-bar > .container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--page-gutter);
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 14px;
  line-height: 1.4;
}



.page-breadcrumb a {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.page-breadcrumb a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.page-breadcrumb a.is-active {
  color: var(--teal-text);
  font-weight: 600;
  opacity: 1;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--teal);
  padding-bottom: 3px;
}
.page-breadcrumb-current.is-active {
  color: var(--teal-text);
  box-shadow: inset 0 -3px 0 var(--teal);
  padding-bottom: 3px;
}


.page-breadcrumb-categories a.is-active,
.page-breadcrumb-subnav-list a.is-active {
  box-shadow: inset 0 -3px 0 var(--teal);
  padding-bottom: 3px;
}

.page-breadcrumb-subnav-list span.is-active {
  display: inline-block;
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--teal);
  padding-bottom: 3px;
}




.page-breadcrumb-sep {
  color: var(--muted);
  font-size: 16px;
  user-select: none;
}



.page-breadcrumb--with-cats {
  row-gap: 8px;
}


.page-breadcrumb a[data-gatavas-filter],
.page-breadcrumb-subnav a[data-gatavas-filter] {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
}

.page-breadcrumb a[data-gatavas-filter]:hover,
.page-breadcrumb a[data-gatavas-filter].is-active,
.page-breadcrumb-subnav a[data-gatavas-filter]:hover,
.page-breadcrumb-subnav a[data-gatavas-filter].is-active {
  color: var(--teal-text);
  opacity: 1;
  text-decoration: none;
}

.page-breadcrumb a[data-gatavas-filter].is-active,
.page-breadcrumb-subnav a[data-gatavas-filter].is-active {
  font-weight: 600;
}

.page-breadcrumb a[data-skapji-filter],
.page-breadcrumb-subnav a[data-skapji-filter] {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
}

.page-breadcrumb a[data-skapji-filter]:hover,
.page-breadcrumb a[data-skapji-filter].is-active,
.page-breadcrumb-subnav a[data-skapji-filter]:hover,
.page-breadcrumb-subnav a[data-skapji-filter].is-active {
  color: var(--teal-text);
  opacity: 1;
  text-decoration: none;
}

.page-breadcrumb a[data-skapji-filter].is-active,
.page-breadcrumb-subnav a[data-skapji-filter].is-active {
  font-weight: 600;
}
.page-breadcrumb a[data-virtuves-filter],
.page-breadcrumb-subnav a[data-virtuves-filter] {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
}

.page-breadcrumb a[data-virtuves-filter]:hover,
.page-breadcrumb a[data-virtuves-filter].is-active,
.page-breadcrumb-subnav a[data-virtuves-filter]:hover,
.page-breadcrumb-subnav a[data-virtuves-filter].is-active {
  color: var(--teal-text);
  opacity: 1;
  text-decoration: none;
}

.page-breadcrumb a[data-virtuves-filter].is-active,
.page-breadcrumb-subnav a[data-virtuves-filter].is-active {
  font-weight: 600;
}

.page-breadcrumb a[data-virtuves-scroll] {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
}

.page-breadcrumb a[data-virtuves-scroll]:hover {
  color: var(--teal-text);
  opacity: 1;
  text-decoration: none;
}


.page-breadcrumb a[data-gatavas-filter].is-active {
  font-weight: 600;
}


.page-breadcrumb-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}

.page-breadcrumb-cat-sep {
  color: var(--muted);
  margin: 0 10px;
  user-select: none;
}

.page-breadcrumb-categories a {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-breadcrumb-categories a:hover,
.page-breadcrumb-categories a.is-active {
  color: var(--teal-text);
}

.page-breadcrumb-categories a.is-active {
  font-weight: 600;
}

@media (max-width: 640px) {
  .page-breadcrumb-cat-sep { margin: 0 8px; }
  .page-breadcrumb-categories { font-size: 12px; }
}


/* ---------- Page breadcrumb subnav (related links / filters) ---------- */

.page-breadcrumb-subnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-breadcrumb-subnav-list a {
  color: var(--text-soft);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.page-breadcrumb-subnav-list a:hover {
  color: var(--teal-text);
}


.page-breadcrumb-subnav--siblings {
  flex: 1 1 100%;
}

@media (min-width: 769px) {
  .page-breadcrumb-subnav--siblings .page-breadcrumb-subnav-list li:first-child::before {
    content: "|";
    margin-left: 4px;
    margin-right: 2px;
  }
}

.page-breadcrumb-subnav-list a.is-active {
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: none;
}

@media (min-width: 769px) {
  .page-breadcrumb-bar > .container:has(.page-breadcrumb-subnav) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    row-gap: 8px;
    font-size: 14px;
    line-height: 1.4;
  }

  .page-breadcrumb-bar > .container:has(.page-breadcrumb-subnav) .page-breadcrumb,
  .page-breadcrumb-bar > .container:has(.page-breadcrumb-subnav) .page-breadcrumb-subnav {
    display: contents;
  }

  .page-breadcrumb-subnav-list {
    display: contents;
  }

  .page-breadcrumb-subnav-list li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .page-breadcrumb-subnav-list li::before {
    content: "›";
    color: var(--muted);
    font-size: 16px;
    user-select: none;
  }

  .page-breadcrumb-subnav-list a:hover {
    opacity: 0.85;
    text-decoration: underline;
  }
}

@media (max-width: 768px) {
  .page-breadcrumb-subnav {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .page-breadcrumb-bar > .container {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  }

  .page-breadcrumb {
    font-size: 13px;
    line-height: 1.45;
    gap: 4px 6px;
    width: 100%;
    min-width: 0;
  }

  .page-breadcrumb a,
  .page-breadcrumb-current {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .page-breadcrumb-sep {
    flex-shrink: 0;
  }

  .page-breadcrumb-current,
  .page-breadcrumb-current.is-active {
    flex: 0 1 auto;
    width: fit-content;
    max-width: 100%;
  }

  .page-breadcrumb-subnav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
  }

  .page-breadcrumb-subnav-list li::before {
    content: none;
  }

  .page-breadcrumb-subnav-list li + li {
    border-top: 1px solid var(--line);
  }

  .page-breadcrumb-subnav-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.18);
  }

  .page-breadcrumb-subnav-list a:hover {
    text-decoration: none;
    background: rgba(0, 0, 0, 0.28);
  }

  .page-breadcrumb-subnav-list a.is-active {
    background: rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 480px) {
  .page-breadcrumb-bar > .container {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .page-breadcrumb {
    font-size: 12px;
  }
}

.page-breadcrumb-current {
  display: inline-block;
  max-width: 100%;
  color: var(--teal-text);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--teal);
  padding-bottom: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Full product page ---------- */

.product-page {
  padding: 36px 0 80px;
}

.product-page > .page-breadcrumb-bar + .container {
  margin-top: 20px;
}

.product-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr);
  gap: 40px 40px;
  align-items: start;
  margin-bottom: 48px;
}

.product-page-main-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  line-height: 0;
}

.product-page-main-img > img#productMainImg,
.product-page-main-img > img:not(.product-swipe-hint__icon) {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(70vh, 620px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

/* Desktop: full product visible; frame matches buybox card */
@media (min-width: 961px) {
  .product-page-main-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: var(--card);
  }

  .product-page-main-img > img#productMainImg,
  .product-page-main-img > img:not(.product-swipe-hint__icon) {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(70vh, 620px);
    object-fit: contain;
  }
}

.product-page-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: #1a2433;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.product-page-img-nav:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.product-page-img-nav--prev {
  left: 12px;
}

.product-page-img-nav--next {
  right: 12px;
}

.product-page-zoom {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  bottom: auto;
  z-index: 4;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--teal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.product-page-zoom:hover,
.product-page-zoom:focus-visible {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  outline: none;
}

.product-page-zoom:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 176, 160, 0.35), 0 2px 12px rgba(0, 0, 0, 0.18);
}

.product-page-zoom svg {
  display: block;
}

@media (min-width: 961px) {
  .product-page-main-img:not(.product-page-main-img--empty) {
    cursor: zoom-in;
  }

  .product-page-img-nav,
  .product-page-zoom {
    cursor: pointer;
  }
}


@media (max-width: 640px) {
  .product-page-img-nav {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .product-page-img-nav--prev {
    left: 8px;
  }

  .product-page-img-nav--next {
    right: 8px;
  }

  .product-page-zoom {
    width: 40px;
    height: 40px;
    top: 8px;
    left: 8px;
    right: auto;
    bottom: auto;
  }

  .product-page-zoom svg {
    width: 20px;
    height: 20px;
  }
}

.product-page-gallery {
  min-width: 0;
  width: 100%;
}

.product-page-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.product-page-thumb {
  flex: 1 1 calc(25% - 8px);
  min-width: 88px;
  max-width: 203px;
  aspect-ratio: 6 / 5;
  height: auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.product-page-thumb.is-active,
.product-page-thumb:hover {
  border-color: var(--text-soft);
}

.product-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-page-buybox {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-page-buybox > .page-breadcrumb {
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.product-page-category {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.product-page-buybox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.product-page-buybox-head h1,
.product-page-buybox h1 {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.2;
  margin: 0;
  flex: 1 1 min(100%, 14rem);
}

.product-page-buybox-head .product-badge--inline {
  margin: 6px 0 0;
  align-self: flex-start;
}

.product-page-variant {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 16px;
}

.product-page-variant + .product-page-sku {
  margin-top: -10px;
}

.product-page-sku {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.product-page-sku strong {
  color: var(--text);
  font-weight: 700;
}

.product-page-sku + .product-page-meta {
  margin-top: -8px;
}

.product-page-meta {
  margin: 0 0 16px;
  padding: 0;
}

.product-page-meta-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 6px;
}

.product-page-meta-row:last-child {
  margin-bottom: 0;
}

.product-page-meta-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.product-page-meta-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}


.product-page-price-block {
  margin: 0 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-page-price {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.product-page-price-label {
  font-weight: 700;
  margin-right: 0.35em;
  color: var(--text-soft);
}

.product-page-price-note {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.product-page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.product-page-cta .btn {
  width: 100%;
  justify-content: center;
}

.product-page-highlights {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 16px;
}

@media (min-width: 520px) {
  .product-page-highlights {
    grid-template-columns: 1fr 1fr;
  }
}

.product-page-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.product-page-highlights svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--teal);
}

.product-page-leasing {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.product-page-leasing-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--text) 45%, transparent);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.product-page-leasing-link:hover,
.product-page-leasing-link:focus-visible {
  color: var(--teal);
  text-decoration-color: var(--teal);
}

.product-page-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding-top: 12px;
  border-top: none;
}

.product-page-share[hidden] {
  display: none;
}

.product-page-share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.product-page-share-buttons {
  display: flex;
  gap: 8px;
}

.product-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.product-share-btn svg {
  width: 18px;
  height: 18px;
}

.product-share-btn:hover,
.product-share-btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.product-share-btn--facebook:hover,
.product-share-btn--facebook:focus-visible {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.product-share-btn--instagram:hover,
.product-share-btn--instagram:focus-visible {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: #dc2743;
  color: #fff;
}

.product-share-btn--whatsapp:hover,
.product-share-btn--whatsapp:focus-visible {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.product-share-btn--telegram:hover,
.product-share-btn--telegram:focus-visible {
  background: #229ed9;
  border-color: #229ed9;
  color: #fff;
}

.product-share-btn.is-copied {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.product-page-share-status {
  flex: 1 1 100%;
  font-size: 13px;
  color: var(--teal);
  min-height: 1.2em;
}

.product-page-link-copy {
  margin-top: 16px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.product-page-link-copy__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.product-page-link-copy__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.product-page-link-copy__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: text;
}

.product-page-link-copy__input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.15);
}

.product-page-link-copy__btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.product-page-link-copy__btn:hover,
.product-page-link-copy__btn:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.product-page-link-copy__btn.is-copied {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

@media (max-width: 640px) {
  .product-page-link-copy__row {
    flex-direction: column;
  }

  .product-page-link-copy__btn {
    width: 100%;
  }
}



.product-page-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.product-page-details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}

.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.product-tab {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.product-tab.is-active {
  color: var(--text);
  background: var(--card);
  border-bottom-color: var(--text-soft);
}

.product-tab-panels {
  padding: 28px 28px 32px;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.product-tab-panel {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Apraksts / Specifikācijas / Piegāde — garie teksti nedrīkst iziet ārpus malām */
.product-tab-panel .cms-content,
.product-tab-panel .cms-content p,
.product-tab-panel .cms-content li,
.product-tab-panel .cms-content a,
.product-tab-panel .cms-content span,
.product-tab-panel .cms-content td,
.product-tab-panel .cms-content th,
.product-tab-panel .cms-content h2,
.product-tab-panel .cms-content h3,
.product-tab-panel .cms-content h4,
#tab-apraksts,
#tab-specifikacijas,
#tab-piegade {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-tab-panel h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.product-tab-panel h3 {
  font-size: 16px;
  margin: 22px 0 10px;
}

.product-tab-panel p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 12px;
}

.product-spec-table {
  margin: 0 0 20px;
}

.product-spec-table div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 8px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.product-spec-table div > * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-spec-table dt {
  color: var(--muted);
  font-weight: 500;
}

.product-spec-table dd {
  margin: 0;
  font-weight: 600;
}

.product-page-note {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-top: 16px;
}


.product-page-form-section {
  margin-bottom: 56px;
}

.product-page-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 32px 40px;
  align-items: start;
}

.product-page-form-intro h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.product-page-form-intro p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.product-page-form-product {
  margin-top: 16px;
  font-size: 14px;
}

.product-page-form {
  padding: 28px 26px;
}

.product-page-related {
  margin-top: 40px;
  padding-top: 8px;
}

.product-page-related h2 {
  font-size: 22px;
  margin-bottom: 24px;
}

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

.product-card--link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card--link:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.product-card--link .link-more {
  color: var(--text-soft);
}
/* ---------- Product page related carousel ---------- */

.product-related-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-related-carousel__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  container-type: inline-size;
}

.product-related-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.product-related-carousel__track {
  display: flex;
  gap: 20px;
  padding: 4px 0 8px;
  width: max-content;
  min-width: 100%;
  scroll-snap-type: inline;
}

.product-related-carousel__track .product-card {
  flex: 0 0 calc((100cqi - 60px) / 4);
  width: calc((100cqi - 60px) / 4);
  min-width: 0;
  max-width: calc((100cqi - 60px) / 4);
  scroll-snap-align: start;
}

@container (max-width: 600px) {
  .product-related-carousel__track .product-card {
    flex: 0 0 calc(100cqi - 20px);
    width: calc(100cqi - 20px);
    max-width: calc(100cqi - 20px);
  }
}

@container (min-width: 601px) and (max-width: 900px) {
  .product-related-carousel__track .product-card {
    flex: 0 0 calc((100cqi - 40px) / 2);
    width: calc((100cqi - 40px) / 2);
    max-width: calc((100cqi - 40px) / 2);
  }
}

.product-related-carousel__btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.product-related-carousel__btn:hover:not(:disabled):not([hidden]) {
  background: var(--teal);
  border-color: var(--teal);
}

.product-related-carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.product-related-carousel__btn[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .product-related-carousel__track .product-card {
    flex: 0 0 calc((100cqi - 20px) / 2);
    width: calc((100cqi - 20px) / 2);
    max-width: calc((100cqi - 20px) / 2);
  }
}

@media (max-width: 640px) {
  .product-related-carousel {
    gap: 8px;
  }

  .product-related-carousel__btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .product-related-carousel__track .product-card {
    flex: 0 0 85cqi;
    width: 85cqi;
    max-width: 85cqi;
  }
}



.catalog-breadcrumb-bar {
  margin-bottom: 0;
}

/* Gap between breadcrumb strip and content card (same idea as .product-page) */
.catalog-page > .page-breadcrumb-bar + .container {
  margin-top: 20px;
}

.catalog-page .page-breadcrumb-bar + .container .section-head,
.catalog-page > .container > .section-head:first-child {
  margin-top: 28px;
}

@media (max-width: 768px) {
  .catalog-page > .page-breadcrumb-bar + .container {
    margin-top: 16px;
  }

  .catalog-page .page-breadcrumb-bar + .container .section-head {
    margin-top: 0;
  }
}


.product-card--featured {
  grid-column: 1 / -1;
}

.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.product-card--featured .product-card-link {
  flex-direction: row;
}

.product-card--featured .product-img {
  flex: 0 0 42%;
  aspect-ratio: auto;
  min-height: 220px;
  position: relative;
}

.product-card--featured .product-body {
  flex: 1;
  justify-content: center;
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  pointer-events: none;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  pointer-events: none;
}

.product-badges .product-badge {
  position: static;
  top: auto;
  left: auto;
}

.product-badge--new {
  background: var(--teal);
  color: #fff;
}

.product-badge--bestseller {
  background: var(--accent);
  color: #fff;
}

.product-badge--inline {
  position: static;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  font-size: 10px;
  padding: 4px 10px;
}

@media (max-width: 768px) {
  .product-card--featured .product-card-link {
    flex-direction: column;
  }

  .product-card--featured .product-img {
    flex: none;
    aspect-ratio: 16 / 11;
  }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--lightbox-top-inset) var(--lightbox-side-gap) var(--lightbox-side-gap);
  overflow-y: auto;
  background: rgba(8, 16, 24, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(96vw, 1180px);
  min-height: 0;
  margin: 0 auto;
}

.lightbox-inner > .lightbox-topbar {
  width: 100%;
  max-width: 100%;
}

.lightbox-inner > .lightbox-stage {
  width: 100%;
  max-width: 100%;
}

.lightbox-inner > .lightbox-bottombar {
  width: 100%;
  max-width: 100%;
}

.lightbox-inner > .lightbox-thumbs {
  width: 100%;
  max-width: 100%;
}

.lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  pointer-events: none;
}

.lightbox-topbar__left,
.lightbox-topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.lightbox .lightbox-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox .lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox .lightbox-btn--close:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.lightbox .lightbox-arrow {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox .lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox .lightbox-arrow[hidden] {
  display: none;
}

.lightbox-arrow--fs {
  position: fixed;
  top: 50%;
  z-index: 2147483647;
  transform: translateY(-50%);
}

#lightboxPrev.lightbox-arrow--fs {
  left: 16px;
}

#lightboxNext.lightbox-arrow--fs {
  right: 16px;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}


/* Sidebar toggle: only in fullscreen. */
#lightboxSidebarToggle {
  display: none;
}

#lightbox:fullscreen #lightboxSidebarToggle,
#lightbox:-webkit-full-screen #lightboxSidebarToggle,
#lightbox.is-fullscreen #lightboxSidebarToggle {
  display: flex;
}

/* Fullscreen: large image, collapsible sidebar, title under image. */
#lightbox:fullscreen,
#lightbox:-webkit-full-screen,
#lightbox.is-fullscreen {
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  /* Match lightbox overlay hue; opaque so browser FS black does not show through */
  background: rgb(8, 16, 24);
  overflow: hidden;
}

#lightbox:fullscreen .lightbox-inner,
#lightbox:-webkit-full-screen .lightbox-inner,
#lightbox.is-fullscreen .lightbox-inner {
  max-width: none;
  width: 100%;
  height: 100%;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  box-sizing: border-box;
  gap: 0;
}

/* Reserve space for controls — do not overlay sidebar thumbs */
#lightbox:fullscreen .lightbox-topbar,
#lightbox:-webkit-full-screen .lightbox-topbar,
#lightbox.is-fullscreen .lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 250px;
  flex: 0 0 auto;
  z-index: 12;
  padding: 12px 16px;
  width: auto;
  max-width: none;
  box-sizing: border-box;
}

#lightbox:fullscreen.lightbox-sidebar-collapsed .lightbox-topbar,
#lightbox:-webkit-full-screen.lightbox-sidebar-collapsed .lightbox-topbar,
#lightbox.is-fullscreen.lightbox-sidebar-collapsed .lightbox-topbar {
  right: 64px;
}

#lightbox:fullscreen .lightbox-topbar .lightbox-btn,
#lightbox:-webkit-full-screen .lightbox-topbar .lightbox-btn,
#lightbox.is-fullscreen .lightbox-topbar .lightbox-btn {
  width: 38px;
  height: 38px;
}

#lightbox:fullscreen .lightbox-topbar .lightbox-btn svg,
#lightbox:-webkit-full-screen .lightbox-topbar .lightbox-btn svg,
#lightbox.is-fullscreen .lightbox-topbar .lightbox-btn svg {
  width: 18px;
  height: 18px;
}

#lightbox:fullscreen .lightbox-dialog,
#lightbox:-webkit-full-screen .lightbox-dialog,
#lightbox.is-fullscreen .lightbox-dialog {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  margin: 0;
  overflow: hidden;
}

#lightbox:fullscreen .lightbox-main,
#lightbox:-webkit-full-screen .lightbox-main,
#lightbox.is-fullscreen .lightbox-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  padding: 56px 16px 12px;
  box-sizing: border-box;
}

/* Title under the big image in fullscreen. */
#lightbox:fullscreen .lightbox-meta,
#lightbox:-webkit-full-screen .lightbox-meta,
#lightbox.is-fullscreen .lightbox-meta {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 8px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  position: relative;
  z-index: 2;
}

#lightbox:fullscreen .lightbox-title,
#lightbox:-webkit-full-screen .lightbox-title,
#lightbox.is-fullscreen .lightbox-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

#lightbox:fullscreen .lightbox-desc,
#lightbox:-webkit-full-screen .lightbox-desc,
#lightbox.is-fullscreen .lightbox-desc {
  display: none;
}

#lightbox:fullscreen .lightbox-stage,
#lightbox:-webkit-full-screen .lightbox-stage,
#lightbox.is-fullscreen .lightbox-stage {
  width: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

#lightbox:fullscreen .lightbox-image-wrap,
#lightbox:-webkit-full-screen .lightbox-image-wrap,
#lightbox.is-fullscreen .lightbox-image-wrap {
  display: block;
  width: fit-content;
  height: fit-content;
  max-width: 100%;
  max-height: 100%;
  flex: 0 1 auto;
  background: transparent;
  overflow: hidden;
  border-radius: 0;
}

.lightbox-blur {
  display: none !important;
}

#lightbox:fullscreen .lightbox-image-wrap img,
#lightbox:-webkit-full-screen .lightbox-image-wrap img,
#lightbox.is-fullscreen .lightbox-image-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  box-shadow: none;
  border-radius: 0;
}

#lightbox:fullscreen .lightbox-sidebar,
#lightbox:-webkit-full-screen .lightbox-sidebar,
#lightbox.is-fullscreen .lightbox-sidebar {
  display: flex;
  flex: 0 0 250px;
  width: 250px;
  max-width: 250px;
  height: 100%;
  max-height: none;
  align-self: stretch;
  margin: 0;
  border-radius: 0;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 18, 24, 0.98);
  transition: width 0.2s ease, opacity 0.2s ease, flex-basis 0.2s ease;
}

#lightbox:fullscreen .lightbox-sidebar-list,
#lightbox:-webkit-full-screen .lightbox-sidebar-list,
#lightbox.is-fullscreen .lightbox-sidebar-list {
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

#lightbox:fullscreen .lightbox-bottombar,
#lightbox:-webkit-full-screen .lightbox-bottombar,
#lightbox.is-fullscreen .lightbox-bottombar {
  display: none;
}

/* Collapsed sidebar → keep control toolbar, hide thumbs. */
#lightbox.lightbox-sidebar-collapsed .lightbox-sidebar {
  display: flex !important;
  flex: 0 0 64px;
  width: 64px;
  max-width: 64px;
  background: rgba(12, 18, 24, 0.92);
}

#lightbox.lightbox-sidebar-collapsed .lightbox-sidebar-list {
  display: none !important;
}

#lightbox.lightbox-sidebar-collapsed .lightbox-sidebar-toolbar {
  border-bottom: none;
  flex-direction: column;
  padding: 10px 8px;
  gap: 8px;
}

#lightbox:fullscreen.lightbox-sidebar-collapsed .lightbox-image-wrap img,
#lightbox:-webkit-full-screen.lightbox-sidebar-collapsed .lightbox-image-wrap img,
#lightbox.is-fullscreen.lightbox-sidebar-collapsed .lightbox-image-wrap img {
  max-height: min(100%, calc(100dvh - 160px));
  max-width: 100%;
}

#lightbox.lightbox-sidebar-collapsed #lightboxSidebarToggle {
  background: rgba(0, 176, 160, 0.22);
  border-color: rgba(0, 176, 160, 0.55);
}


@media (max-width: 900px) {
  #lightbox:fullscreen .lightbox-dialog,
  #lightbox:-webkit-full-screen .lightbox-dialog,
  #lightbox.is-fullscreen .lightbox-dialog {
    flex-direction: column;
  }

  #lightbox:fullscreen .lightbox-sidebar,
  #lightbox:-webkit-full-screen .lightbox-sidebar,
  #lightbox.is-fullscreen .lightbox-sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 120px;
  }

  #lightbox:fullscreen .lightbox-sidebar-list,
  #lightbox:-webkit-full-screen .lightbox-sidebar-list,
  #lightbox.is-fullscreen .lightbox-sidebar-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  #lightbox:fullscreen .lightbox-sidebar-item,
  #lightbox:-webkit-full-screen .lightbox-sidebar-item,
  #lightbox.is-fullscreen .lightbox-sidebar-item {
    flex: 0 0 min(34vw, 140px);
  }

  #lightbox:fullscreen .lightbox-image-wrap img,
  #lightbox:-webkit-full-screen .lightbox-image-wrap img,
  #lightbox.is-fullscreen .lightbox-image-wrap img {
    max-height: calc(100dvh - 210px);
  }

  #lightbox:fullscreen.lightbox-sidebar-collapsed .lightbox-image-wrap img,
  #lightbox:-webkit-full-screen.lightbox-sidebar-collapsed .lightbox-image-wrap img,
  #lightbox.is-fullscreen.lightbox-sidebar-collapsed .lightbox-image-wrap img {
    max-height: calc(100dvh - 120px);
  }
}



/* Desktop: full-height sidebar flush to page edge, controls inside sidebar */
.lightbox-sidebar-toolbar {
  display: none;
}

@media (min-width: 901px) {
  .lightbox-sidebar-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
    padding: 10px 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .lightbox.open {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .lightbox.open .lightbox-inner {
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    align-items: stretch;
    justify-content: stretch;
  }

  .lightbox.open .lightbox-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    gap: 0;
  }

  .lightbox.open .lightbox-main {
    padding: 56px var(--lightbox-side-gap) 16px;
    box-sizing: border-box;
  }

  .lightbox.open .lightbox-sidebar {
    flex: 0 0 250px;
    width: 250px;
    height: 100%;
    max-height: none;
    align-self: stretch;
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    background: rgba(12, 18, 24, 0.96);
  }

  .lightbox.open .lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 250px;
    width: auto;
    padding: 12px var(--lightbox-side-gap);
    box-sizing: border-box;
    z-index: 12;
  }

  .lightbox.open .lightbox-topbar__right:empty {
    display: none;
  }

  .lightbox.open.lightbox-sidebar-collapsed .lightbox-topbar {
    right: 64px;
  }
}

.lightbox-dialog {
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: min(96vw, 1180px);
  height: min(calc(100dvh - var(--lightbox-top-inset) - var(--lightbox-side-gap)), 860px);
  max-height: calc(100dvh - var(--lightbox-top-inset) - var(--lightbox-side-gap));
  min-height: 0;
  margin: auto;
  overflow: hidden;
}

.lightbox-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  overflow: hidden;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.lightbox-image-wrap {
  position: relative;
  flex: 0 1 auto;
  width: fit-content;
  height: fit-content;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: transparent;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zoom state */
.lightbox-image-wrap.is-zoomed {
  overflow: visible;
  z-index: 5;
}

.lightbox-image-wrap.is-zoomed img {
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

/* Loading spinner + text */
.lightbox-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: rgba(12, 18, 22, 0.55);
  text-align: center;
  pointer-events: none;
}

.lightbox-image-wrap.is-loading {
  min-width: min(280px, 72vw);
  min-height: min(220px, 48vh);
}

.lightbox-image-wrap.is-loading .lightbox-loading {
  display: flex;
}

.lightbox-loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(240, 215, 140, 0.28);
  border-top-color: var(--minto-gold, #c8961f);
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
}

.lightbox-loading__text {
  max-width: 16rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

/* Gallery grid loading */
.gallery-item {
  position: relative;
}

.gallery-item__loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(20, 28, 32, 0.45);
  text-align: center;
  pointer-events: none;
  border-radius: inherit;
}

.gallery-item.is-loading .gallery-item__loading {
  display: flex;
}

.gallery-item.is-loading > img {
  opacity: 0.35;
}

.gallery-item__loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(240, 215, 140, 0.28);
  border-top-color: var(--minto-gold, #c8961f);
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
}

.gallery-item__loading-text {
  max-width: 11rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Broken image fallback */
.lightbox-image-wrap.has-error img {
  opacity: 0.3;
  filter: grayscale(1);
}

.lightbox-image-wrap.has-error::after {
  content: "Nevar ielādēt attēlu";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--font-body);
}

.lightbox-image-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(64vh, 680px);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-counter {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.lightbox-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 8px 4px 0;
  flex: none;
  position: relative;
  z-index: 2;
}

.lightbox-meta-text {
  min-width: 0;
}

.lightbox-title {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.lightbox-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.lightbox-desc[hidden] {
  display: none;
}

.lightbox-product-link {
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 176, 160, 0.35);
}

.lightbox-product-link[hidden] {
  display: none;
}

.lightbox-sidebar {
  flex: 0 0 252px;
  width: 252px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  max-height: calc(100dvh - var(--lightbox-top-inset) - var(--lightbox-side-gap));
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.lightbox-sidebar-heading {
  margin: 0;
  padding: 12px 12px 10px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  flex: 0 0 auto;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(18, 26, 34, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.lightbox-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 8px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.lightbox-sidebar-list::-webkit-scrollbar {
  width: 6px;
}

.lightbox-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.lightbox-sidebar-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-sidebar-item {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: block;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.lightbox-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lightbox-sidebar-item.is-active {
  background: rgba(0, 176, 160, 0.12);
}

.lightbox-sidebar-item__img {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.lightbox-sidebar-item.is-active .lightbox-sidebar-item__img {
  border-color: var(--teal);
}

.lightbox-sidebar-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-sidebar-item__badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.lightbox-sidebar-item__label {
  display: block;
  margin-top: 7px;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}

a.lightbox-sidebar-item:hover .lightbox-sidebar-item__label {
  color: var(--teal);
}

.lightbox button {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 970;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: var(--teal);
}

.lightbox-prev,
.lightbox-next {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1a2433;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.lightbox-prev[hidden],
.lightbox-next[hidden] {
  display: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* ---------- Tablet / mobile (≤900px) ---------- */

@media (max-width: 900px) {
  .lightbox {
    --lightbox-side-gap: 12px;
    align-items: flex-start;
    justify-content: flex-start;
    padding:
      calc(var(--lightbox-top-inset) + env(safe-area-inset-top, 0px))
      calc(var(--lightbox-side-gap) + env(safe-area-inset-right, 0px))
      calc(var(--lightbox-side-gap) + env(safe-area-inset-bottom, 0px))
      calc(var(--lightbox-side-gap) + env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lightbox-inner {
    max-width: 100%;
    gap: 0;
  }

  .lightbox-dialog {
    flex-direction: column;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    gap: 12px;
    margin: 0 auto;
  }

  .lightbox-main {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
  }

  .lightbox-stage {
    flex: 0 1 auto;
    min-height: 0;
    gap: 8px;
  }

  .lightbox-image-wrap {
    width: fit-content;
    height: fit-content;
    max-width: 100%;
    max-height: min(52dvh, 440px);
  }

  .lightbox-image-wrap img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(52dvh, 440px);
    object-fit: contain;
    border-radius: var(--radius-sm);
  }

  .lightbox-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0;
  }

  .lightbox-product-link {
    align-self: stretch;
    text-align: center;
    white-space: normal;
  }

  /* Mobile: hide thumbnail strip — swipe / arrows instead */
  .lightbox-sidebar,
  #lightboxSidebarList,
  #lightboxSidebarToggle {
    display: none !important;
  }

  .lightbox-close {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
  }

  /* Keep close (left) + action buttons (right) visible on mobile */
  .lightbox-topbar__left {
    display: flex;
    pointer-events: auto;
  }

  .lightbox-topbar {
    background: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px;
    pointer-events: none;
    z-index: 11;
    justify-content: space-between;
  }

  .lightbox-topbar__right {
    display: flex;
    gap: 6px;
    pointer-events: auto;
  }

  .lightbox-topbar .lightbox-btn--close {
    pointer-events: auto;
  }

  .lightbox-btn {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Mobile landscape: fill the short viewport with the image ---------- */

@media (max-width: 900px) and (orientation: landscape) {
  .lightbox {
    --lightbox-top-inset: 6px;
    --lightbox-side-gap: 6px;
    align-items: center;
    justify-content: center;
    padding:
      calc(6px + env(safe-area-inset-top, 0px))
      calc(6px + env(safe-area-inset-right, 0px))
      calc(6px + env(safe-area-inset-bottom, 0px))
      calc(6px + env(safe-area-inset-left, 0px));
    overflow: hidden;
  }

  .lightbox-inner {
    width: 100%;
    max-height: 100%;
  }

  .lightbox-dialog {
    gap: 4px;
    width: 100%;
    max-height: calc(100dvh - 12px);
    justify-content: center;
  }

  .lightbox-main {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
  }

  .lightbox-stage {
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    justify-content: center;
  }

  .lightbox-image-wrap,
  .lightbox-image-wrap img {
    width: auto;
    max-width: min(100%, calc(100vw - 72px));
    max-height: min(88dvh, calc(100dvh - 48px));
  }

  .lightbox-meta {
    gap: 4px;
    padding: 0 4px;
  }

  .lightbox-title {
    font-size: 14px;
    line-height: 1.2;
  }

  .lightbox-desc {
    display: none;
  }

  .lightbox-product-link {
    padding: 6px 12px;
    font-size: 11px;
  }

  .lightbox-topbar {
    padding: 4px;
  }

  .lightbox-btn {
    width: 34px;
    height: 34px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
}

/* Short portrait only — do not shrink landscape */
@media (max-height: 600px) and (orientation: portrait) {
  .lightbox-meta {
    gap: 10px;
  }

  .lightbox-product-link {
    padding: 10px 16px;
    font-size: 11px;
  }
}

/* ---------- Small screen (≤640px) ---------- */

@media (max-width: 640px) {
  .lightbox-stage {
    gap: 6px;
  }

  .lightbox-image-wrap,
  .lightbox-image-wrap img {
    max-height: min(50dvh, 380px);
  }

  .lightbox-sidebar-item {
    flex-basis: min(36vw, 140px);
  }

  .lightbox-close {
    width: 44px;
    height: 44px;
    font-size: 24px;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 10px);
  }

  .lightbox-prev,
  .lightbox-next {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .lightbox-title {
    font-size: 17px;
  }

  .lightbox-desc {
    font-size: 13px;
  }

  .lightbox-topbar {
    padding: 6px;
  }

  .lightbox-btn {
    width: 38px;
    height: 38px;
  }
}

/* ---------- Phone (≤480px) ---------- */

@media (max-width: 480px) {
  .lightbox {
    --lightbox-side-gap: 8px;
  }

  .lightbox-dialog {
    gap: 10px;
  }

  .lightbox-stage {
    gap: 4px;
  }

  .lightbox-image-wrap,
  .lightbox-image-wrap img {
    max-height: min(55dvh, 420px);
  }

  .lightbox-image-wrap {
    border-radius: var(--radius-sm);
  }

  .lightbox-image-wrap img {
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }

  .lightbox-counter {
    left: 8px;
    bottom: 8px;
    padding: 4px 10px;
    font-size: 11px;
  }

  .lightbox-meta {
    gap: 10px;
  }

  .lightbox-title {
    font-size: 16px;
  }

  .lightbox-desc {
    font-size: 12px;
    line-height: 1.4;
  }

  .lightbox-product-link {
    font-size: 11px;
    padding: 8px 14px;
  }

  .lightbox-sidebar {
    border-radius: var(--radius-sm);
  }

  .lightbox-sidebar-list {
    gap: 6px;
    padding: 6px;
  }

  .lightbox-sidebar-item {
    flex: 0 0 min(40vw, 132px);
  }

  .lightbox-sidebar-item__label {
    font-size: 10px;
    margin-top: 3px;
  }

  .lightbox-sidebar-item__img {
    border-radius: 6px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 22px;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: calc(env(safe-area-inset-right, 0px) + 8px);
  }

  .lightbox-topbar {
    padding: 4px;
  }

  .lightbox-topbar__right {
    gap: 4px;
  }

  .lightbox-btn {
    width: 36px;
    height: 36px;
  }

  .lightbox-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Tighter fullscreen buttons */
  .lightbox-arrow--fs.lightbox-arrow--prev { left: 8px; }
  .lightbox-arrow--fs.lightbox-arrow--next { right: 8px; }
  .lightbox-close--fs { top: 8px; right: 8px; }

  /* Swipe hint — hand SVG + text until first swipe */
  .lightbox-swipe-hint {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    padding: 16px;
    background: rgba(8, 16, 24, 0.34);
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .lightbox-swipe-hint.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .lightbox-swipe-hint__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: min(280px, 82vw);
    text-align: center;
  }

  .lightbox-swipe-hint__icon {
    width: min(148px, 42vw);
    height: auto;
    aspect-ratio: 1;
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
    user-select: none;
    -webkit-user-drag: none;
  }

  .lightbox-swipe-hint__text {
    margin: 0;
    color: #fff;
    font-family: var(--font-body, "Inter", sans-serif);
    font-size: clamp(0.85rem, 3.6vw, 1rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  }
}


/* Product page swipe hint (mobile) */
.product-swipe-hint {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  padding: 16px;
  background: rgba(8, 16, 24, 0.34);
  transition: opacity 0.35s ease, visibility 0.35s ease;
  line-height: normal;
}

.product-swipe-hint.is-visible {
  opacity: 1;
  visibility: visible;
}

.product-swipe-hint__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(280px, 82vw);
  max-width: 82vw;
  text-align: center;
  line-height: normal;
}

.product-swipe-hint__icon {
  display: block !important;
  width: min(200px, 52vw) !important;
  max-width: 200px !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  aspect-ratio: 1;
  object-fit: contain !important;
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.product-swipe-hint__text {
  display: block;
  margin: 0;
  width: 100%;
  color: #fff;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: clamp(0.8rem, 3.4vw, 0.95rem);
  font-weight: 500;
  line-height: 1.35 !important;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

@media (max-width: 960px) {
  .product-swipe-hint {
    display: flex;
  }
}

@media (min-width: 961px) {
  .product-swipe-hint {
    display: none !important;
  }
}

/* Desktop: never show swipe hint */
@media (min-width: 901px) {
  .lightbox-swipe-hint {
    display: none !important;
  }
}

/* ---------- Extra-small phone (≤375px) ---------- */

@media (max-width: 375px) {
  .lightbox-stage {
    gap: 0;
  }

  .lightbox-image-wrap,
  .lightbox-image-wrap img {
    max-height: min(60dvh, 380px);
  }

  .lightbox-sidebar-item {
    flex: 0 0 min(44vw, 120px);
  }

  .lightbox-meta {
    gap: 8px;
  }

  .lightbox-title {
    font-size: 15px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 30px;
    height: 30px;
    font-size: 18px;
    border-radius: 50%;
  }

  .lightbox-prev svg,
  .lightbox-next svg {
    width: 18px;
    height: 18px;
  }

  .lightbox-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .lightbox-topbar {
    padding: 2px;
  }

  .lightbox-topbar__right {
    gap: 3px;
  }

  .lightbox-btn {
    width: 34px;
    height: 34px;
  }
}

/* Final landscape override — wins over ≤640/480/375 max-height caps */
@media (max-width: 900px) and (orientation: landscape) {
  .lightbox-image-wrap,
  .lightbox-image-wrap img {
    max-width: min(100%, calc(100vw - 72px)) !important;
    max-height: min(88dvh, calc(100dvh - 48px)) !important;
  }
}

/* ---------- Mobile / tablet call button ---------- */

.mobile-call-fab {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 91;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 176, 160, 0.4);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mobile-call-fab svg {
  display: block;
  width: 25px;
  height: 25px;
  /* Compositor-friendly: transform-only, GPU layer, no layout paint. */
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}

/* ~60fps-friendly: ~150ms steps (~9 frames), linear pacing, long rest. */
@keyframes mobile-call-fab-wiggle {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  5% {
    transform: translate3d(0, 0, 0) rotate(12deg);
  }
  10% {
    transform: translate3d(0, 0, 0) rotate(-10deg);
  }
  15% {
    transform: translate3d(0, 0, 0) rotate(8deg);
  }
  20% {
    transform: translate3d(0, 0, 0) rotate(-5deg);
  }
  25%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

.mobile-call-fab:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 176, 160, 0.5);
}

.mobile-call-fab:hover svg,
.mobile-call-fab:focus-visible svg,
.mobile-call-fab:active svg {
  animation: none;
  transform: translate3d(0, 0, 0);
}

.mobile-call-fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .mobile-call-fab svg {
    animation: mobile-call-fab-wiggle 3s linear infinite;
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-call-fab svg {
    animation: none;
    will-change: auto;
  }
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 176, 160, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
}

.back-to-top svg {
  display: block;
  width: 25px;
  height: 25px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--teal-dark);
}

.back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 55px;
    height: 55px;
  }

  .mobile-call-fab {
    left: calc(40px + env(safe-area-inset-left, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
  }
}


/* ---------- Contact subnav + team page ---------- */

.contact-subnav {
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.5);
}

.contact-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 0 14px;
}

.contact-subnav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.contact-subnav a:hover,
.contact-subnav a.is-active {
  color: var(--text);
  border-bottom-color: var(--teal);
}

.team-page-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 32px;
}

.team-page-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.team-page-card img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto 16px;
  display: block;
}

.team-page-card h2,
.team-page-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.team-page-card a {
  color: var(--text-soft);
}

.requisites-list--page {
  margin: 24px 0 32px;
}

.contacts-page {
  padding-top: 0;
}

@media (max-width: 900px) {
  .team-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .team-page-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Laptop / small desktop --- */
@media (max-width: 1100px) {
  .main-nav a {
    min-height: 50px;
    padding: 16px 12px;
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .main-nav li:has(a[href="#produkti"]) a,
  .main-nav li:has(a[href*="#produkti"]) a,
  .main-nav li:has(a[href="#iebuvetie-skapji"]) a,
  .main-nav li:has(a[href*="#iebuvetie-skapji"]) a {
    padding-left: 12px;
    padding-right: 12px;
    letter-spacing: 0.025em;
  }
}


@media (min-width: 961px) {
  .nav-toggle {
    display: none;
  }

  .intro-stack {
    display: flex;
    flex-direction: column;
  }

  /* Desktop: menu sections sit below the intro image */
  .intro-stack .intro-hero-image {
    order: 1;
  }

  .intro-stack .nav-home {
    order: 2;
  }

  .intro-stack .hero1 {
    order: 3;
  }

  .main-nav,
  .main-nav.open,
  body.home-sticky-active .main-nav.is-pinned,
  body.home-sticky-active .main-nav.is-pinned.open {
    max-height: none;
    overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
  }

  .main-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0;
  }

  .main-nav li + li::before {
    display: block;
  }

  .main-nav li + li {
    border-top: none;
  }

  body.home-sticky-active .home-sticky-bar {
    display: none;
  }
}

/* --- Short-height landscape (Nest Hub, Nest Hub Max, small laptops) --- */
@media (min-width: 961px) and (max-height: 850px) {
  .header-contacts {
    display: none;
  }

  .header-call-btn {
    display: flex;
    animation: call-btn-pulse 2.5s ease-in-out infinite;
  }

  .home-sticky-bar-top {
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  }

  .home-sticky-bar.is-scrolled .home-sticky-bar-top {
    padding-top: 12px;
    padding-bottom: 12px;
    min-height: 56px;
  }

  body.home-sticky-active .home-sticky-bar.is-scrolled .home-sticky-bar-top {
    padding-top: 16px;
    padding-bottom: 16px;
    min-height: 72px;
  }

  .intro-logo-bar .intro-logo-inner {
    padding-left: 56px;
    padding-right: 56px;
  }

  .intro-stack {
    display: flex;
    flex-direction: column;
  }

  /* Desktop: logo → intro image → menu → hero content */
  .intro-stack .intro-hero-image {
    order: 1;
  }

  .intro-stack .nav-home {
    order: 2;
  }

  .intro-stack .hero1 {
    order: 3;
  }
}

@media (min-width: 961px) and (max-height: 850px) and (prefers-reduced-motion: reduce) {
  .header-call-btn {
    animation: none;
  }
}

/* --- Tablet --- */
@media (max-width: 960px) {
  .mobile-call-fab {
    display: flex;
    left: calc(40px + env(safe-area-inset-left, 0px));
    right: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
  }

  body {
    background-attachment: scroll;
  }

  .header-inner {
    padding-left: 56px;
    padding-right: 56px;
  }

  .intro-logo-bar .intro-logo-inner {
    padding-left: 56px;
    padding-right: 56px;
  }

  .home-sticky-bar-top {
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  }

  .intro-stack {
    display: flex;
    flex-direction: column;
  }

  /* Mobilaja: izvelne starp logo un hero attelu */
  .intro-stack .nav-home {
    order: 1;
  }

  .intro-stack .intro-hero-image {
    order: 2;
  }

  .intro-stack .hero1 {
    order: 3;
  }

  .nav-toggle {
    display: flex;
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
  }

  body.home-sticky-active .home-sticky-bar {
    display: block;
    padding-top: env(safe-area-inset-top, 0);
  }

  body.home-sticky-active .main-nav.is-pinned {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border-top: none;
    border-bottom: none;
    transition: max-height 0.35s ease, opacity 0.2s ease, visibility 0s linear 0.35s;
  }

  body.home-sticky-active .main-nav.is-pinned.open,
  body.mobile-nav-open .main-nav.is-pinned {
    max-height: min(480px, calc(100dvh - var(--home-sticky-nav-top, 0px) - env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    transition: max-height 0.35s ease, opacity 0.2s ease, visibility 0s;
  }

  .main-nav,
  .intro-stack .main-nav,
  .site-intro--subpage .main-nav {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border-top: none;
    border-bottom: none;
    transition: max-height 0.35s ease, opacity 0.2s ease, visibility 0s linear 0.35s;
  }

  .main-nav.open,
  body.mobile-nav-open .main-nav {
    max-height: min(480px, calc(100dvh - var(--home-sticky-nav-top, 0px) - env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    transition: max-height 0.35s ease, opacity 0.2s ease, visibility 0s;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 8px 0;
  }

  .main-nav li + li::before {
    display: none;
  }

  .main-nav li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }

  .main-nav li {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .main-nav a {
    width: 100%;
    min-height: 0;
    padding: 16px 24px;
    font-size: 14px;
    text-align: center;
    white-space: normal;
  }

  .hero-scene__people,
  .hero-scene__people-shadow {
    margin-left: clamp(32px, 10vw, 120px);
    width: clamp(62%, 78%, 78%);
  }

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

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

  .contacts {
    padding: 48px 0 56px;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contacts-form-col {
    gap: 16px;
  }

  .contact-map-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .requisites-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .requisites-row dd {
    margin-bottom: 8px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .gallery .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }

  .gallery .section-head h2 {
    font-size: clamp(22px, 5.5vw, 28px);
  }

  .gallery .section-head .btn {
    width: 100%;
    justify-content: center;
  }

  .gallery {
    padding: 20px 0 48px;
  }

  .gallery-item__title {
    font-size: 12px;
    padding: 22px 10px 8px;
  }

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

  .why-panel {
    padding: 22px 20px;
    gap: 18px;
  }

  .why-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .why-panel-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-panel__inner {
    grid-template-columns: 1fr;
  }

  .about-carousel {
    border-left: none;
    border-bottom: 1px solid var(--line);
    order: -1;
  }

  .about-carousel__viewport {
    aspect-ratio: 16 / 9;
  }

  .about-panel__content {
    padding: 18px 18px 16px;
  }

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

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-contacts {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }

  .product-page-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product-page-gallery {
    width: 100%;
  }

  .product-page-main-img {
    width: 100%;
  }

  .product-page-main-img > img#productMainImg,
  .product-page-main-img > img:not(.product-swipe-hint__icon) {
    width: 100%;
    height: auto;
    max-height: min(62vw, 520px);
    object-fit: contain;
    background: transparent;
    pointer-events: none;
  }

  /* Mobile: hide thumbnail strip — swipe / arrows on main image instead */
  .product-page-thumbs {
    display: none;
  }

  .product-page-main-img {
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  .product-page-main-img:active {
    cursor: grabbing;
  }

  .product-page-form-grid {
    grid-template-columns: 1fr;
  }

  .products-grid--compact {
    grid-template-columns: 1fr 1fr;
  }

  .product-tab {
    min-width: 50%;
  }



}

/* Keyboard: keep open menu visible while tabbing links inside it.
   Do NOT open/keep menu from toggle :focus — that blocks closing the X button. */
@supports selector(body:has(*)) {
  @media (max-width: 960px) {
    body:has(.main-nav.open:focus-within) .main-nav.open,
    body.home-sticky-active:has(.main-nav.is-pinned.open:focus-within) .main-nav.is-pinned.open {
      max-height: min(480px, calc(100dvh - var(--home-sticky-nav-top, 0px) - env(safe-area-inset-bottom, 0px)));
      overflow-y: auto;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
  }
}

/* Mobile: submenu in document flow — sits above intro image, does not overlay it */
@media (max-width: 960px) {
  .main-nav-submenu {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    z-index: 2;
  }

  .main-nav-submenu.is-visible {
    transform: none;
  }

  /* Full-bleed to page edges (match intro hero image) */
  .intro-stack .main-nav,
  .site-intro--subpage .main-nav,
  .intro-stack .main-nav-submenu,
  .site-intro--subpage .main-nav-submenu {
    width: calc(100% + (2 * var(--page-gutter)));
    max-width: none;
    margin-left: calc(-1 * var(--page-gutter));
    margin-right: calc(-1 * var(--page-gutter));
  }

  .intro-stack .main-nav-submenu__inner,
  .site-intro--subpage .main-nav-submenu__inner {
    max-width: none;
    margin: 0;
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  }

  /* In-flow panel already pushes hero down — skip absolute-dock margin */
  .nav-home.has-docked-submenu,
  .site-intro--subpage .nav-home.has-docked-submenu,
  .intro-stack .nav-home.has-docked-submenu {
    margin-bottom: 0;
  }

  /* Submenu: single column — avoids empty gaps when titles differ in length */
  .main-nav-submenu.is-visible {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav-submenu__inner {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .main-nav-submenu__list.is-visible {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
  }

  .main-nav-submenu__list li {
    min-width: 0;
    width: 100%;
    white-space: normal;
    background: transparent;
  }

  .main-nav-submenu__list li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav-submenu__list a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 12px 14px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    border-right: none;
    border-bottom: none;
    font-size: 0.875rem;
    line-height: 1.35;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
  }

  .main-nav-submenu__list a:hover {
    background: rgba(0, 0, 0, 0.5);
  }

  .main-nav-submenu__list a.is-active,
  .main-nav-submenu__list a.is-active:hover {
    border-bottom: none;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 var(--teal, #00b0a0);
  }
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .main-nav-submenu__list a {
    font-size: 0.84rem;
    padding: 12px 10px;
  }

  .hero-scene {
    aspect-ratio: 4 / 5;
    transform: scale(1.06);
    transform-origin: center top;
  }

  .intro-stack .intro-hero-image {
    width: calc(100% + (2 * var(--page-gutter)));
    margin-left: calc(-1 * var(--page-gutter));
    padding: 0;
  }

  .intro-stack .hero-scene {
    width: 100%;
  }

  .hero-scene__bg-img {
    object-position: center center;
  }

  .container {
    padding: 0 var(--page-gutter);
  }

  section[id],
  article[id].service-card {
    scroll-margin-top: calc(72px + env(safe-area-inset-top, 0));
  }

  .logo img {
    height: 58px;
  }

  .nav-toggle {
    right: 18px;
  }

  .header-inner {
    padding-left: 52px;
    padding-right: 52px;
  }

  .intro-logo-bar .intro-logo-inner {
    padding-left: 52px;
    padding-right: 52px;
  }

  .home-sticky-bar-top {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .intro-logo-bar .logo img {
    height: 58px;
  }

  .logo--compact img {
    height: clamp(32px, 9vw, 42px);
    max-height: 42px;
  }

  body.home-sticky-active .logo--compact img {
    height: clamp(36px, 10vw, 56px);
    max-height: 56px;
  }

  .hero-scene__people,
  .hero-scene__people-shadow {
    inset: auto;
    bottom: 0;
    left: 50%;
    margin-left: 0;
    width: min(92%, 420px);
    height: 96%;
    transform: translateX(-50%);
  }

  .hero-scene__people-shadow {
    filter: brightness(0) blur(clamp(6px, 2vw, 12px));
    opacity: 0.32;
    transform: translate(calc(-50% + 5px), clamp(6px, 1.2vw, 12px));
  }

  .btn-lg,
  .cta-inner .btn-light {
    width: 100%;
    justify-content: center;
  }

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

  .products-grid,
  .products-grid--compact {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .gallery .section-head .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .gallery-item {
    border-radius: 10px;
  }

  .gallery-item:hover {
    transform: none;
    box-shadow: none;
  }

  .gallery-item:hover img {
    transform: none;
  }

  .stats-grid {
    gap: 12px;
  }

  .stat {
    padding: 22px 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-hours li {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .contacts {
    padding: 36px 0 44px;
  }

  .contacts-grid {
    gap: 16px;
  }

  .contact-info,
  .contact-form,
  .contact-map,
  .product-page-buybox,
  .product-page-form {
    padding: 20px 16px;
  }

  .contact-list {
    gap: 18px;
  }

  .contact-team,
  .contact-requisites {
    margin-top: 22px;
    padding-top: 18px;
  }

  .contact-map-frame {
    min-height: 200px;
    aspect-ratio: 4 / 3;
  }

  .contact-form .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .form-consent label {
    font-size: 13px;
  }

  .contact-subnav-inner {
    gap: 6px 10px;
  }

  .contact-subnav a {
    font-size: 13px;
  }

  .cta-contacts {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
  }

  .cta-contact {
    justify-content: center;
    font-size: 15px;
  }

  .service-category-copy,
  .service-category-steps,
  .service-category-steps--process {
    padding: 24px 20px;
  }

  .product-tab {
    min-width: 100%;
    flex: 1 1 100%;
    padding: 14px 16px;
    font-size: 13px;
  }

  .product-tab-panels {
    padding: 20px 18px 24px;
  }

  .product-spec-table div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .product-page {
    padding: 24px 0 56px;
  }

  .product-page-layout {
    gap: 20px;
    margin-bottom: 32px;
  }

  .product-page-main-img {
    border-radius: var(--radius-sm);
  }

  .product-page-main-img > img#productMainImg,
  .product-page-main-img > img:not(.product-swipe-hint__icon) {
    width: 100%;
    height: auto;
    max-height: min(72vw, 400px);
    object-fit: contain;
    pointer-events: none;
  }

  .product-page-buybox h1 {
    font-size: clamp(22px, 6.5vw, 28px);
  }

  .product-page-price {
    font-size: 24px;
  }

  .product-page-tab-panels,
  .product-tab-panels {
    padding: 20px 16px 24px;
  }


  .product-page-cta .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .legal-page {
    padding: 32px 0 48px;
  }

  .legal-page h1 {
    font-size: clamp(24px, 7vw, 32px);
  }

  .error-page {
    min-height: auto;
    padding: 48px 0 64px;
  }

  .error-page__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }


  .back-to-top {
    right: calc(16px + env(safe-area-inset-right, 0));
    bottom: calc(16px + env(safe-area-inset-bottom, 0));
  }
}

/* --- Very small screens --- */

/* Gallery: single column on small phones */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-item {
    aspect-ratio: 4 / 3;
  }

  .gallery-item__title {
    font-size: 13px;
    padding: 28px 12px 10px;
  }

  .gallery .section-head h2 {
    font-size: 22px;
  }
}

@media (max-width: 380px) {
  .contact-map-frame {
    min-height: 180px;
  }

  .contact-list li {
    gap: 12px;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
  }

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

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


/* ---------- Service category pages (virtuves, skapji, žalūzijas) ---------- */

.service-category-page {
  padding-top: 36px;
}

.subpage-card-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px 32px;
}

.subpage-card-wrap .section-head {
  margin-bottom: 20px;
}

.subpage-card-wrap .section-head h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 0;
}

.subpage-card-wrap .catalog-footer-note {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.service-category-hero {
  margin-bottom: 48px;
}

.service-category-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
}

.service-category-copy {
  padding: 8px 4px 8px 0;
}

.service-category-copy h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
}

.service-category-copy .section-sub {
  margin-bottom: 20px;
}

.service-category-copy .btn {
  margin-top: 24px;
}

.service-category-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.service-category-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border-radius: 0;
  object-fit: cover;
  object-position: center 35%;
  aspect-ratio: 16 / 10;
}

.service-category-steps {
  margin-bottom: 48px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px 32px;
}

.service-category-steps h2 {
  font-family: var(--font-head);
  font-size: 22px;
  margin-bottom: 16px;
}

.service-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.service-steps li + li {
  margin-top: 10px;
}
/* ---------- Process steps (Kā tas notiek) ---------- */

.service-category-steps.service-category-steps--process {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 36px;
}

.process-head {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 32px;
}

.process-head h2 {
  margin-bottom: 8px;
}

.process-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: process;
}

.process-step {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 22px 18px 20px;
  text-align: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.process-step:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.process-step__icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

.process-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(224, 24, 72, 0.45);
}

.process-step__icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.process-step__icon svg[viewBox="0 0 64 64"] {
  width: 38px;
  height: 38px;
}

.process-step__num {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}


.process-step__title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.process-step__text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (min-width: 901px) {
  .process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 42px;
    right: -24px;
    width: 42px;
    height: 42px;
    background: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M49 200.913a2800 2800 0 0 1 151.778-4.133c75.602 0 135.225 4.133 150.82 4.133' stroke='%23fff' stroke-opacity='.95' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M297.858 148c13.558 3.811 44.348 42.498 52.527 46.54 8.179 4.041-27.08 50.291-43.266 58.46' stroke='%23fff' stroke-opacity='.95' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0.9;
    pointer-events: none;
  }
}

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .service-category-steps--process {
    padding: 24px 18px 28px;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .process-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 16px;
    text-align: left;
    padding: 18px 16px;
  }

  .process-step__icon-wrap {
    grid-row: 1 / span 2;
    margin: 0;
    align-self: center;
  }

  .process-step__title {
    align-self: end;
    margin-bottom: 4px;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }
}


.service-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-type-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.service-type-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.service-type-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 900px) {
  .service-category-hero-grid {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .service-types-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .service-types-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Error pages (403 / 404) ---------- */

.error-page {
  min-height: calc(100vh - 320px);
  display: flex;
  align-items: center;
  padding: 64px 0 80px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.error-page__inner {
  max-width: 560px;
  text-align: center;
}

.error-page__code {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: clamp(72px, 18vw, 120px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--teal);
  opacity: 0.22;
}

.error-page h1 {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--text);
}

.error-page__text {
  margin: 0 auto 32px;
  max-width: 42ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-soft);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ---------- SEO headings ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-head h1,
.gallery .section-head h1 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
}

.services .section-head {
  margin-bottom: 28px;
}

.about-panel__content h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  margin-bottom: 14px;
}

.about-panel__content h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--text-soft);
}

.about-panel__content h3:first-of-type {
  margin-top: 0;
}

.catalog-section-title {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  margin-bottom: 0;
}

.catalog-page .product-body h3.product-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.footer-col .footer-col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.team-page-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.legal-page h2 + dl.requisites-list {
  margin-top: 16px;
}

@media (max-width: 1200px) {
  .catalog-grid--4col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .catalog-grid--4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .catalog-grid--4col {
    grid-template-columns: 1fr;
  }
}

/* Par mums first after hero */
.site-intro + .about-us {
  padding-top: 56px;
}

@media (max-width: 1200px) {
  .products-grid:not(.catalog-grid--4col) {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 960px) {
  .products-grid:not(.catalog-grid--4col) {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ---------- Custom video player ---------- */

.process-video {
  max-width: 860px;
  margin: 0 auto 36px;
}

.service-category-steps--video .service-video-block {
  width: 100%;
  max-width: none;
  margin: 0 0 36px;
}


.minto-yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.25rem 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.minto-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.minto-player {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  container-type: inline-size;
  container-name: minto-player;
  width: 100%;
  max-width: 100%;
}

.minto-player__video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.minto-player__big-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: rgba(8, 16, 24, 0.42);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.minto-player__big-play-icon {
  box-sizing: border-box;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 14cqi, 72px);
  height: clamp(44px, 14cqi, 72px);
  min-width: 44px;
  min-height: 44px;
  max-width: 72px;
  max-height: 72px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(224, 24, 72, 0.45);
  pointer-events: none;
}

.minto-player__big-play-icon svg {
  display: block;
  width: 42%;
  height: 42%;
  max-width: 28px;
  max-height: 28px;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  fill: currentColor;
}

/* Old chrome markup: bare svg child */
.minto-player__big-play > svg {
  box-sizing: border-box;
  flex: 0 0 auto;
  display: block;
  width: clamp(44px, 14cqi, 72px);
  height: clamp(44px, 14cqi, 72px);
  min-width: 44px;
  min-height: 44px;
  max-width: 72px;
  max-height: 72px;
  padding: clamp(11px, 3.5cqi, 18px);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(224, 24, 72, 0.45);
  pointer-events: none;
}

.minto-player__big-play:hover {
  background: rgba(8, 16, 24, 0.55);
}

.minto-player.is-playing .minto-player__big-play {
  opacity: 0;
  pointer-events: none;
}

.minto-player__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(8, 16, 24, 0.15), rgba(8, 16, 24, 0.92));
  border-top: 1px solid var(--line);
}

.minto-player__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.minto-player__btn svg {
  width: 20px;
  height: 20px;
}

.minto-player__btn > svg[hidden] {
  display: none;
}

.minto-player__btn:hover,
.minto-player__btn:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-light);
  outline: none;
}

.minto-player__volume {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.minto-player__volume-slider {
  width: 0;
  height: 4px;
  margin: 0;
  padding: 0;
  opacity: 0;
  appearance: none;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
  pointer-events: none;
  transition: width 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.minto-player__volume:hover .minto-player__volume-slider,
.minto-player__volume:focus-within .minto-player__volume-slider {
  width: 72px;
  margin-left: 6px;
  opacity: 1;
  pointer-events: auto;
}

.minto-player__volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--teal) 0%,
    var(--teal) var(--volume, 100%),
    rgba(255, 255, 255, 0.14) var(--volume, 100%),
    rgba(255, 255, 255, 0.14) 100%
  );
}

.minto-player__volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 8px rgba(0, 176, 160, 0.45);
}

.minto-player__volume-slider::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.minto-player__volume-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--teal);
}

.minto-player__volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--teal);
}

.minto-player__progress-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.minto-player__progress {
  width: 100%;
  height: 6px;
  margin: 0;
  appearance: none;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
}

.minto-player__progress::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress, 0%),
    rgba(255, 255, 255, 0.14) var(--progress, 0%),
    rgba(255, 255, 255, 0.14) 100%
  );
}

.minto-player__progress::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(224, 24, 72, 0.45);
}

.minto-player__progress::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.minto-player__progress::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.minto-player__progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
}

.minto-player__time {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .service-category-steps--video .service-video-block,
  .process-video {
    margin-bottom: 28px;
  }

  .minto-player {
    border-radius: var(--radius-sm);
  }

  .minto-player__big-play-icon,
  .minto-player__big-play > svg {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
  }

  .minto-player__big-play > svg {
    padding: 12px;
  }

  .minto-player__big-play-icon svg {
    width: 42%;
    height: 42%;
    max-width: 20px;
    max-height: 20px;
  }

  .minto-player__controls {
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 8px 10px;
  }

  .minto-player__btn {
    width: 40px;
    height: 40px;
  }

  .minto-player__progress-wrap {
    order: 3;
    flex: 1 1 100%;
  }

  .minto-player__time {
    margin-left: auto;
    font-size: 11px;
  }

  .minto-player__volume-slider {
    display: none;
  }
}

@container minto-player (max-width: 420px) {
  .minto-player__big-play-icon,
  .minto-player__big-play > svg {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    max-width: 46px;
    max-height: 46px;
  }

  .minto-player__big-play > svg {
    padding: 11px;
  }

  .minto-player__big-play-icon svg {
    max-width: 18px;
    max-height: 18px;
  }
}
/* Catalog product cards: single column + readable text on small screens */
@media (max-width: 600px) {
  .products-grid.catalog-grid--4col,
  .catalog-grid--4col {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .catalog-grid--4col .product-card,
  .catalog-grid--4col .product-card--featured {
    width: 100%;
    min-width: 0;
  }

  .catalog-grid--4col .product-title,
  .catalog-grid--4col .product-body h3 {
    font-size: 16px;
    line-height: 1.35;
  }

  .catalog-grid--4col .product-teaser,
  .catalog-grid--4col .product-body p {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
    font-size: 14px;
    line-height: 1.5;
  }

  .catalog-grid--4col .product-foot {
    flex-wrap: wrap;
    gap: 10px;
  }

  .catalog-grid--4col .link-more {
    white-space: normal;
    font-size: 12px;
  }
}

/* Contact form-only block (catalog hubs) */
.contact-form .form-field--name {
  max-width: none;
}

.contact-form .form-field--name input {
  width: 100%;
  max-width: none;
}

.contacts-grid--form-only {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.contacts-grid--form-only .contacts-form-col {
  max-width: none;
  width: 100%;
}

.contact-form-section-title {
  margin: 0 0 16px;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  color: var(--text, #1a1a1a);
}

.catalog-page + .contacts,
.service-category-page + .contacts,
main .contacts.contacts--catalog {
  margin-top: 48px;
  margin-bottom: 24px;
}

/* Mobile browsers do not reliably render fixed body backgrounds. Keep the
   damask visible behind translucent cards while cropping the watermark. */
@media (max-width: 600px) {
  body {
    background-attachment: scroll;
    background-position: center top;
    background-repeat: repeat-y;
    background-size: 300% auto;
  }
}

@media (max-width: 960px) {
  .hero1__layout {
    touch-action: pan-y;
    overscroll-behavior-x: contain;
  }
}
