/* =========================================================
   ALACENA — единый стиль для страниц каталога и карточек
   Подключается ко всем страницам. HTML править не нужно.
   ========================================================= */

/* ---------- Переменные ---------- */
:root {
  --accent:        #c8a06a;
  --accent-dark:   #a67c48;
  --accent-soft:   #f5f0e8;
  --text:          #2c2c2c;
  --muted:         #6b6b6b;
  --card-bg:       #ffffff;
  --card-border:   #f0ece4;
  --page-bg:       #fafafa;
  --gallery-ratio: 3 / 4;
}

/* =========================================================
   СБРОС И БАЗА
   ========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
  margin: 0;
  font-size: 16px;
}

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

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--text);
  margin: 0 0 1rem;
}
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin: 2rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .8rem; }

p { margin: 0 0 .9rem; }
ul { padding-left: 1.2rem; }
ul li { margin-bottom: .3rem; }

/* ---------- Контейнеры ---------- */
.inner-container,
.site-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   СКРЫВАЕМ НЕНУЖНЫЕ БЛОКИ ИЗ СТАРОЙ ВЁРСТКИ Alacena
   ========================================================= */

/* Левое меню */
.navigation.navs2,
.navs2 { display: none !important; }

/* Мобильное меню-бургер */
.wrapnew.navs1,
.navs1 { display: none !important; }

/* Бегущая строка */
marquee { display: none !important; }

/* Старые счётчики, лого-полоски внизу */
.footer-banner,
.footer-banner .pad8,
.footer-banner > div:first-child { display: none !important; }

/* Старый футер-таблицы — скрываем, показываем свой */
.footer > .table-3 { display: none; }

/* Скрываем старые хлебные крошки в шапке */
.path .linktoggler { display: none; }

/* Номobile-обёртка с логотипом Alacena */
.nomobile820 { display: none !important; }

/* Старая «лупа» из ДСП-разметки */
.lupa { display: none !important; }

/* Старые хлебные крошки Alacena */
.bread,
.bread.20after,
div.bread { display: none !important; }

/* =========================================================
   ШАПКА (своя, из нового HTML)
   ========================================================= */
.site-header {
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .site-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .9rem;
  padding-bottom: .9rem;
  gap: 12px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity .2s;
  line-height: 0;
  flex-shrink: 0;
}
.site-logo:hover { opacity: .85; }
.site-logo .logo-full {
  display: block;
  height: 48px;
  width: auto;
  max-width: 100%;
}
.site-logo .logo-mini {
  display: none;
  height: 40px;
  width: 40px;
  object-fit: contain;
}
@media (max-width: 768px) {
  .site-logo .logo-full { display: none; }
  .site-logo .logo-mini { display: block; }
}
@media (max-width: 480px) {
  .site-logo .logo-mini { height: 36px; width: 36px; }
}
.site-contacts { font-size: .9rem; text-align: right; }
.site-contacts i { color: var(--accent); }
.site-contacts a { text-decoration: none; }

/* =========================================================
   ПОДВАЛ (свой)
   ========================================================= */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 1.5rem;
  background: #2c2c2c;
  color: #ddd;
  font-size: .9rem;
}
.site-footer a {
  color: #ddd;
  text-decoration: none;
  transition: color .2s;
}
.site-footer a:hover { color: var(--accent); }
.site-footer .site-logo,
.site-footer .site-logo-text {
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }

/* Старый .footer из ДСП-вёрстки — прячем содержимое таблицы */
.footer { background: transparent; }

/* =========================================================
   ХЛЕБНЫЕ КРОШКИ (свои, .breadcrumbs)
   Старые .bread — скрыты выше
   ========================================================= */
.breadcrumbs {
  font-size: .9rem;
  color: var(--muted);
  margin: 1rem 0 1.5rem;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumbs a:hover { color: var(--accent); }

/* =========================================================
   ССЫЛКИ-АКЦЕНТЫ
   ========================================================= */
.linkor {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: color .2s, border-color .2s;
}
.linkor:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* =========================================================
   КАРТОЧКА ТОВАРА — универсально для старой и новой вёрстки
   .product-showcase (старая) = .product (новая)
   ========================================================= */
.product-showcase,
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 32px;
  margin: 0 0 3rem;
  align-items: start;
}
@media (max-width: 991.98px) {
  .product-showcase,
  .product { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================================
   ГАЛЕРЕЯ — единое окно для всех форматов
   .photo-grid (старая) = .gallery (новая)
   ========================================================= */
.photo-grid,
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  grid-column: 1;
}
@media (max-width: 576px) {
  .photo-grid,
  .gallery { grid-template-columns: 1fr; }
}

/* Ячейка .photo-item / .gallery > a — единое окно 3:4 */
.photo-item,
.gallery > a {
  position: relative;
  aspect-ratio: var(--gallery-ratio);
  overflow: hidden;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Старая разметка: <a class="photo-link"> внутри .photo-item */
.photo-item .photo-link,
.photo-item > a {
  display: block;
  position: absolute;
  inset: 0;
  padding: 6px;
  text-decoration: none;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='13' cy='13' r='8' fill='none' stroke='%23a67c48' stroke-width='2.5'/><line x1='19' y1='19' x2='27' y2='27' stroke='%23a67c48' stroke-width='2.5' stroke-linecap='round'/><line x1='10' y1='13' x2='16' y2='13' stroke='%23a67c48' stroke-width='2'/><line x1='13' y1='10' x2='13' y2='16' stroke='%23a67c48' stroke-width='2'/></svg>") 13 13, zoom-in;
}

/* Новая разметка: <a> сразу как ячейка */
.gallery > a {
  padding: 6px;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='13' cy='13' r='8' fill='none' stroke='%23a67c48' stroke-width='2.5'/><line x1='19' y1='19' x2='27' y2='27' stroke='%23a67c48' stroke-width='2.5' stroke-linecap='round'/><line x1='10' y1='13' x2='16' y2='13' stroke='%23a67c48' stroke-width='2'/><line x1='13' y1='10' x2='13' y2='16' stroke='%23a67c48' stroke-width='2'/></svg>") 13 13, zoom-in;
}

/* Картинка внутри .photo-item (старая разметка) — вписываем в окно */
.photo-item img {
  display: block;
  width: 100%;
  height: 100% !important;      /* сбиваем жёсткий height="305px" */
  object-fit: contain;
  background: #fff;
  margin: 0;
}

/* Рамка-подложка внутри ячейки */
.photo-item::before,
.gallery > a::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--card-border);
  pointer-events: none;
  transition: border-color .25s;
  z-index: 2;
}

/* Hover-эффекты */
.photo-item:hover,
.gallery > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.photo-item:hover::before,
.gallery > a:hover::before { border-color: var(--accent); }

/* Лупа при наведении */
.photo-item::after,
.gallery > a::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  z-index: 3;
}
.photo-item:hover::after,
.gallery > a:hover::after { opacity: 1; }

/* =========================================================
   ПРАВАЯ КОЛОНКА: .price-block (старая) = .product-info (новая)
   ========================================================= */
.price-block,
.product-info {
  grid-column: 2;
  position: sticky;
  top: 100px;
  align-self: start;
}
@media (max-width: 991.98px) {
  .price-block,
  .product-info { position: static; grid-column: auto; }
}

/* ---------- СКРЫВАЕМ ЦЕНУ И КНОПКУ .XLS ---------- */

/* Блок с ценой «8 350 руб. за 1 кв.м» */
.price-block .price-container,
.price-container { display: none !important; }

/* Кнопка «Заполнить бланк заказа .xls» (ведёт на dspkomplekt.ru) */
.price-block .availability .button,
.price-block .button[href*="dspkomplekt"],
.price-block a.button,
.price-block .button.path { display: none !important; }

/* --------------------------------------------------------- */

.product-title,
.price-block .product-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--accent-dark);
}
.product-sub,
.product-features,
.price-block .product-features {
  font-size: .95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Спецификации (новая разметка) */
.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  border: 1px solid var(--card-border);
  background: #fff;
}
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--card-border);
  font-size: .9rem;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list .label { color: var(--muted); }
.spec-list .value { font-weight: 600; text-align: right; }

/* =========================================================
   БЕЙДЖ «НА ЗАКАЗ»
   ========================================================= */
.price-block .availability,
.product-info .availability {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 1.2rem 0 1rem;
  padding: 0;
  background: transparent;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .3px;
  border-left: 3px solid var(--accent);
}
.stock-status::before {
  content: "\f058";                          /* fa-circle-check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: .95rem;
  color: var(--accent-dark);
}

/* =========================================================
   ИНФОРМАЦИЯ О ХАРАКТЕРИСТИКАХ (.price-meta)
   ========================================================= */
.price-block .price-meta,
.price-meta {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.55;
  padding: .9rem 1rem;
  background: #fff;
  border: 1px solid var(--card-border);
  margin: 1rem 0 0;
}

.price-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* =========================================================
   КНОПКИ
   ========================================================= */
.price-block .button,
.btn-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .8rem 1.2rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .2s;
  font-size: .9rem;
}
.price-block .button:hover,
.btn-order:hover { background: var(--accent-dark); }

/* =========================================================
   ИНФО-БЛОК
   ========================================================= */
.info-block h2 { margin-top: 2rem; }
.text h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin: 2rem 0 1rem;
  font-weight: 600;
  color: var(--text);
}

/* =========================================================
   ТАБЛИЦЫ
   ========================================================= */
.price-table,
.table_class3 {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  margin: 1rem 0;
}
.price-table td,
.table_class3 td {
  padding: .6rem .8rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.price-table tr:first-child td,
.table_class3 thead td {
  background: var(--accent-soft);
  font-weight: 600;
}
.price-table tr:last-child td,
.table_class3 tr:last-child td { border-bottom: none; }
.table_class3 img { display: block; width: 100%; height: auto; }

.table-responsive { overflow-x: auto; }

/* =========================================================
   ГЛОСС-ГРИД (степени глянца)
   ========================================================= */
.gloss-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 1rem 0 1.5rem;
}
@media (max-width: 576px) { .gloss-grid { grid-template-columns: 1fr; } }
.gloss-grid figure {
  margin: 0;
  background: #fff;
  padding: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  text-align: center;
}
.gloss-grid img { display: block; width: 100%; height: auto; }
.gloss-grid figcaption {
  font-size: .85rem;
  margin-top: .5rem;
  color: var(--muted);
}
.gloss-grid figcaption strong { color: var(--text); display: block; }

/* =========================================================
   КНОПКА "НАВЕРХ"
   ========================================================= */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.to-top:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 991.98px) { .to-top { display: none; } }

/* Старая ссылка #toTop — тоже прячем, если осталась */
#toTop.nomobile { display: none !important; }

/* =========================================================
   УТИЛИТЫ
   ========================================================= */
.mt-5 { margin-top: 3rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-2 { margin-top: .5rem !important; }
.text-muted { color: var(--muted) !important; }

/* Скрываем пустые br-разделители */
.product-showcase > br,
.product-showcase + br { display: none; }

/* Убираем синее выделение у картинок при клике */
img { -webkit-tap-highlight-color: transparent; }
div.bread,
div[class~="bread"],
body div.bread,
body > div > div.bread,
html body div.bread {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  border: none !important;
}
/* =========================================================
   ГАЛЕРЕЯ — старая разметка витрин ДСП Комплект
   .parent > .good.link.child = .photo-grid > .photo-item
   ========================================================= */
.parent {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 1rem 0 2rem;
}
@media (max-width: 991.98px) {
  .parent { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .parent { grid-template-columns: 1fr; }
}

.parent .good.link.child {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.parent .good.link.child > a {
  display: block;
  position: absolute;
  inset: 0;
  padding: 6px;
  text-decoration: none;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='13' cy='13' r='8' fill='none' stroke='%23a67c48' stroke-width='2.5'/><line x1='19' y1='19' x2='27' y2='27' stroke='%23a67c48' stroke-width='2.5' stroke-linecap='round'/><line x1='10' y1='13' x2='16' y2='13' stroke='%23a67c48' stroke-width='2'/><line x1='13' y1='10' x2='13' y2='16' stroke='%23a67c48' stroke-width='2'/></svg>") 13 13, zoom-in;
}

.parent .good.link.child img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: contain;
  background: #fff;
  margin: 0;
}

.parent .good.link.child::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--card-border);
  pointer-events: none;
  transition: border-color .25s;
  z-index: 2;
}

.parent .good.link.child:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.parent .good.link.child:hover::before { border-color: var(--accent); }

.parent .good.link.child::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  z-index: 3;
}
.parent .good.link.child:hover::after { opacity: 1; }

.parent > br { display: none !important; }
/* =========================================================
   ????????? ????? ? ???? ?? ??? ?????? ? ????? ??????????
   ??????? ???? 3:4, ?????, ????????, hover-???????.
   ========================================================= */
@media (max-width: 576px) {

  /* ?????? ??????? ? ???????????? ???? */
  .photo-grid,
  .gallery,
  .parent {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* ?????? ? ??? ????, ??? ?????, ??? ???? */
  .photo-item,
  .gallery > a,
  .parent .good.link.child {
    aspect-ratio: auto;
    height: auto;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    padding: 0;
    transform: none;
  }
  .photo-item:hover,
  .gallery > a:hover,
  .parent .good.link.child:hover {
    transform: none;
    box-shadow: none;
  }

  /* ??????? ?????-???????? */
  .photo-item::before,
  .gallery > a::before,
  .parent .good.link.child::before {
    display: none;
  }

  /* ??????? hover-???? ? ?? ???-?????? ??? ?? ????? */
  .photo-item::after,
  .gallery > a::after,
  .parent .good.link.child::after {
    display: none;
  }

  /* ?????? ?????? ?????? ? ?? absolute, ? ??????? ???? */
  .photo-item .photo-link,
  .photo-item > a,
  .parent .good.link.child > a {
    position: static;
    padding: 0;
    display: block;
  }

  /* ???????? ? ?? ??? ??????, ?????? ?? ?????????? */
  .photo-item img,
  .gallery > a img,
  .parent .good.link.child img {
    width: 100%;
    height: auto !important;      /* ??????? height="305px" */
    object-fit: initial;
    display: block;
    background: transparent;
  }

  /* ??????-??????? ???????? ?????? ? ?????? ??? ???????????? */
  .scroll-btn {
    display: none;
  }
  .works-scroller {
    gap: 8px;
  }
  .work-item {
    flex: 0 0 85vw;               /* ???????? ???????? ? ????? ?? ??? ?????? */
    aspect-ratio: auto;
    height: auto;
    border-radius: 0;
    background-size: contain;
    background-color: transparent;
  }
}
/* ===================== ?????? ?? ????? ===================== */
/* ?? ????????? ? ??????? ?????? (???????? ??? ??????) */
.site-header + .site-wrap,
.site-header + .inner-container {
  padding-top: 2.5rem;
}

/* ???? ?????? ???? ??????? ?????? ? ?????? ??????,
   ?????? ??? ?????? ???? ????????? ??????? margin */
.site-header + .site-wrap:has(.breadcrumbs),
.site-header + .inner-container:has(.breadcrumbs),
.site-header + .site-wrap:has(.bread),
.site-header + .inner-container:has(.bread) {
  padding-top: 1rem;
}

@media (max-width: 768px) {
  .site-header + .site-wrap,
  .site-header + .inner-container {
    padding-top: 1.5rem;
  }
  .site-header + .site-wrap:has(.breadcrumbs),
  .site-header + .inner-container:has(.breadcrumbs),
  .site-header + .site-wrap:has(.bread),
  .site-header + .inner-container:has(.bread) {
    padding-top: .5rem;
  }
}
/* =========================================================
   ??????? ????????? ????????
   ========================================================= */
.photo-item img,
.gallery img,
.fasad-card img,
.parent .good img {
  opacity: 0;
  transition: opacity .35s ease;
}

.photo-item img.is-loaded,
.gallery img.is-loaded,
.fasad-card img.is-loaded,
.parent .good img.is-loaded {
  opacity: 1;
}


/* =========================================================
   ?????????: ???? JS ?? ????????, ???????? ???????? ????? 3 ???
   ========================================================= */
@keyframes forceShow {
  to { opacity: 1; }
}

.photo-item img,
.gallery img,
.fasad-card img,
.parent .good img {
  animation: forceShow 0s 3s forwards;
}