.edc-page {
  --edc-blue: #052b72;
  --edc-blue-2: #09398d;
  --edc-line: #c8d3e7;
  --edc-text: #082a65;
  --edc-muted: #5f7196;
  --edc-page-max: var(--storefront-content-max, 1248px);
  min-height: 0;
  overflow: visible;
  color: var(--edc-text);
  background: transparent;
  font-family: var(--font-sans);
  padding: 18px 0 36px;
}

.edc-page.edc-page--white {
  background: transparent;
}

/* Outer soft field + white content surface (same idea as PVC .pvc-guide__surface) */
body.footer-entrance-doors-listing {
  background-color: #f3f8fe;
  background-image: linear-gradient(135deg, #fbfdff 0%, #edf5ff 48%, #f7fbff 100%);
}

.edc-page__surface {
  overflow: hidden;
  width: min(var(--edc-page-max), calc(100% - 32px));
  margin-inline: auto;
  border: 1px solid rgba(116, 156, 204, 0.28);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 73, 130, 0.08);
}

.edc-page.edc-page--white .edc-products-panel {
  background: #fff;
}

.edc-page.edc-page--white .product-image-grid {
  background-color: #fff;
  background-image: none;
}

.edc-page.edc-page--white .edc-photo {
  background: #fff;
}

.edc-page *,
.edc-page *::before,
.edc-page *::after {
  box-sizing: border-box;
}

.edc-page a {
  color: inherit;
  text-decoration: none;
}

.edc-page svg {
  stroke: currentColor;
}

.edc-main {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 40px) 28px;
}

/* Blueprint accents stay inside the surface (content only). */
.edc-main::before {
  position: absolute;
  bottom: 42px;
  left: 0;
  width: min(320px, 28vw);
  height: 280px;
  background: image-set(
      url("../../images/pages/entrance_doors_catalog/left-bottom-blueprint.webp") type("image/webp"),
      url("../../images/pages/entrance_doors_catalog/left-bottom-blueprint.png") type("image/png")
    ) left bottom / contain no-repeat;
  opacity: .4;
  pointer-events: none;
  content: "";
}

/* Desktop-only image listing hero — full width of surface, no crop. */
.edc-listing-hero {
  position: relative;
  width: calc(100% + 2 * clamp(16px, 3.5vw, 40px));
  margin: 0 calc(-1 * clamp(16px, 3.5vw, 40px)) 12px;
  overflow: hidden;
  border-radius: 0;
  background: #eef3fa;
}

.edc-listing-hero__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center top;
}

/*
 * Same title + description as mobile classic hero, overlaid on the PC image.
 * Left edge + gutter. No transform (keeps type sharp). +32px below mid.
 * RU/long copy: wider column only (see [data-lang="ru"]).
 */
.edc-listing-hero__copy {
  position: absolute;
  z-index: 2;
  /* center + 32px down without transform (transform blurs glyphs) */
  top: calc(50% + 32px);
  left: 0;
  transform: translateY(-50%);
  box-sizing: border-box;
  width: min(46%, 560px);
  max-width: calc(100% - 40px);
  padding: clamp(12px, 1.8vw, 22px) clamp(16px, 2.8vw, 40px) clamp(12px, 1.8vw, 22px) clamp(24px, 3.5vw, 48px);
  margin: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, 0));
  text-align: left;
  pointer-events: none;
  /* crisp type on photo */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* Prefer paint without fractional blur when browser supports it */
@supports (translate: 0) {
  .edc-listing-hero__copy {
    transform: none;
    translate: 0 -50%;
  }
}

/* Overlay type: brand sans + brand blues (not Georgia — soft on photo). */
.edc-listing-hero__copy h1 {
  margin: 0;
  max-width: none;
  color: #000;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 48px);
  font-weight: var(--fw-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-align: left;
  text-shadow: none;
}

.edc-listing-hero__copy h1::after {
  display: block;
  width: 32px;
  height: 4px;
  margin-top: 14px;
  border-radius: 1px;
  background: #0068b7;
  content: "";
}

.edc-listing-hero__copy p {
  margin: 12px 0 0;
  max-width: 46ch;
  color: #000;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  text-shadow: none;
}

/* RU: denser/wider glyphs — give more width only */
.edc-listing-hero__copy[data-lang="ru"] {
  width: min(50%, 600px);
}

.edc-listing-hero__copy[data-lang="ru"] h1 {
  font-size: clamp(36px, 4.5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.edc-listing-hero__copy[data-lang="ru"] p {
  max-width: 46ch;
  font-size: var(--text-body);
  line-height: 1.4;
}

.edc-listing-hero__copy[data-lang="lv"] h1 {
  font-size: clamp(36px, 4.5vw, 48px);
}

.edc-listing-hero__copy[data-lang="lv"] p {
  font-size: var(--text-body);
}

.edc-listing-hero--desktop-only {
  display: block;
}

.edc-hero--mobile-only {
  display: block;
}

/* ≥641px: image hero visible, classic text hero hidden (AGENTS dual-mode). */
@media (min-width: 641px) {
  .edc-page--listing-hero .edc-hero--mobile-only {
    display: none;
  }
}

/* ≤640px: keep classic hero; hide full-bleed image banner. */
@media (max-width: 640px) {
  .edc-listing-hero--desktop-only {
    display: none;
  }

  .edc-page--listing-hero .edc-hero--mobile-only {
    display: block;
  }
}

.edc-hero {
  position: relative;
  min-height: 235px;
  padding-top: 35px;
}

.edc-hero::after {
  position: absolute;
  top: 24px;
  right: 0;
  width: min(610px, 48vw);
  height: 218px;
  background: image-set(
      url("../../images/pages/entrance_doors_catalog/hero-blueprint.webp") type("image/webp"),
      url("../../images/pages/entrance_doors_catalog/hero-blueprint.png") type("image/png")
    ) right top / contain no-repeat;
  opacity: .9;
  pointer-events: none;
  content: "";
}

.edc-breadcrumbs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: #6b789a;
  font-size: var(--text-caption);
  font-weight: 700;
}

.edc-breadcrumbs a:hover {
  text-decoration: underline;
}

.edc-breadcrumbs b {
  color: #0d347a;
}

.edc-breadcrumbs span {
  color: #9ba8bf;
}

.edc-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 16px 0 0;
  color: #062763;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 48px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.035em;
}

.edc-hero h1::after {
  display: block;
  width: 27px;
  height: 2px;
  margin-top: 17px;
  background: #07327e;
  content: "";
}

.edc-hero p {
  position: relative;
  z-index: 1;
  max-width: 390px;
  margin: 16px 0 0;
  color: #123b83;
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.45;
}

.edc-catalog-layout {
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
}

.edc-products-panel {
  padding: 17px 22px 20px;
  border: 1px solid #cbd5e7;
  border-radius: 4px;
  background: rgba(255, 255, 255, .78);
}

.edc-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #cbd5e7;
}

.edc-view {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #0a337e;
  font-size: var(--text-small);
  font-weight: 700;
}

.edc-view > strong {
  display: grid;
  min-width: 42px;
  height: 31px;
  place-items: center;
  border: 1px solid #cbd5e7;
  border-radius: 3px;
  background: #fff;
  color: #073077;
  font-size: var(--text-caption);
}

.edc-sort {
  display: flex;
  gap: 10px;
  align-items: center;
}

.edc-sort__label {
  color: #5f7196;
  font-size: var(--text-small);
  font-weight: 700;
}

.edc-sort__select {
  height: 31px;
  padding: 0 8px;
  border: 1px solid #cbd5e7;
  border-radius: 3px;
  background: #fff;
  color: #073077;
  font-size: var(--text-caption);
}

.edc-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
  padding-top: 20px;
}

.edc-product-card {
  position: relative;
  min-width: 0;
  min-height: 286px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e7;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(11, 38, 80, .02);
  transition: transform .2s ease, box-shadow .2s ease;
}

.edc-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11, 38, 80, .12);
}

.edc-product-card__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  padding: 0 9px 11px;
}

.edc-photo {
  aspect-ratio: 3 / 4;
  margin: 0 -4px 11px;
  overflow: hidden;
  background: #eef2f7;
}

.edc-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.edc-favorite {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  color: #24488d;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 38, 80, .08);
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.edc-favorite:hover {
  color: #e11d48;
  background: #fff;
  transform: scale(1.05);
}

.edc-favorite.is-active {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.12);
}

.edc-favorite.is-active svg {
  fill: currentColor;
}

.edc-favorite:disabled {
  opacity: 0.6;
  cursor: wait;
}

.edc-product-card h2 {
  margin: 0 0 5px;
  overflow: hidden;
  color: #133a80;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: var(--fw-title);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edc-card-meta {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: flex-end;
  /* Price always at bottom of card (1-line vs 2-line titles). */
  margin-top: auto;
}

.edc-price {
  color: var(--edc-blue);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1;
}

.edc-price small {
  font-size: var(--text-small);
}

.edc-card-meta del {
  color: #7a88a4;
  font-size: var(--text-caption);
}

.edc-photo-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 13px;
  color: #7182a2;
  font-size: var(--text-caption);
  text-align: center;
}

.edc-photo-placeholder span,
.edc-empty__door > span {
  display: block;
  width: 54px;
  height: 84px;
  border: 2px solid rgba(7, 49, 123, .4);
  border-radius: 28px 28px 2px 2px;
  background: linear-gradient(90deg, transparent 48%, rgba(7, 49, 123, .2) 49% 51%, transparent 52%);
}

.edc-empty {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 20px;
  text-align: center;
}

.edc-empty__door {
  margin-bottom: 18px;
}

.edc-empty__label {
  margin: 0 0 8px;
  color: var(--edc-blue);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.edc-empty h2 {
  margin: 0;
  color: #092d70;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 500;
}

.edc-empty > p:not(.edc-empty__label) {
  max-width: 570px;
  margin: 16px 0 22px;
  color: var(--edc-muted);
  font-size: var(--text-small);
  line-height: 1.55;
}

.edc-empty > a {
  display: flex;
  width: min(100%, 260px);
  height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-radius: 3px;
  background: #07317b;
  box-shadow: 0 7px 15px rgba(5, 43, 114, .18);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 800;
}

.edc-benefits {
  width: 100%;
  min-height: 80px;
  border-top: 1px solid #d7dfed;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 -4px 12px rgba(4, 31, 79, .04);
}

.edc-benefits-inner {
  display: grid;
  width: min(100% - 86px, var(--storefront-content-max, 1248px));
  min-height: 80px;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  margin: 0 auto;
}

.edc-benefit {
  display: flex;
  min-height: 48px;
  gap: 17px;
  align-items: center;
  padding: 0 26px;
  border-right: 1px solid #cbd5e7;
  color: #0a337e;
  font-size: var(--text-caption);
  font-weight: 800;
  line-height: 1.35;
}

.edc-benefit:first-child {
  padding-left: 0;
}

.edc-benefit:last-child {
  padding-right: 0;
  border-right: 0;
}

.edc-benefit svg {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .edc-main {
    width: min(100% - 36px, 1040px);
  }

  .edc-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .edc-benefits-inner {
    width: min(100% - 34px, 1040px);
    grid-template-columns: repeat(3, 1fr);
    padding: 12px 0;
  }

  .edc-benefit {
    padding: 10px 18px;
    border-right: 0;
  }
}

@media (max-width: 768px) {
  .edc-main {
    width: calc(100% - 24px);
  }

  .edc-hero {
    min-height: 285px;
    padding-top: 24px;
  }

  .edc-hero::after {
    top: 126px;
    right: 0;
    width: min(420px, 92vw);
    height: 150px;
    background-size: contain;
    opacity: .38;
  }

  .edc-hero p {
    max-width: 330px;
  }

  .edc-products-panel {
    padding: 14px;
  }

  .edc-toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .edc-view {
    width: 100%;
    gap: 10px;
  }

  .edc-sort {
    width: 100%;
    justify-content: space-between;
  }

  .edc-sort__select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .edc-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .edc-benefits-inner {
    width: calc(100% - 24px);
    grid-template-columns: 1fr 1fr;
  }

  .edc-benefit {
    padding: 12px 6px;
  }
}

@media (max-width: 480px) {
  .edc-breadcrumbs {
    gap: 7px;
    font-size: var(--text-caption);
  }

  .edc-hero h1 {
    font-size: clamp(36px, 4.5vw, 48px);
  }

  .edc-products-grid {
    grid-template-columns: 1fr;
  }

  .edc-product-card {
    min-height: auto;
  }

  .edc-view {
    flex-wrap: wrap;
  }

  .edc-benefits-inner {
    grid-template-columns: 1fr;
  }

  .edc-benefit {
    border-bottom: 1px solid #d7dfed;
  }

  .edc-benefit:last-child {
    border-bottom: 0;
  }
}
