/* =========================================================
   CATALOG REDESIGN — STAGE 1
   Новый каркас страницы по утвержденному макету.
   ========================================================= */
.catalog-redesign-stage1 {
  margin: 0;
  color: #34271f;
  background: rgb(250, 246, 242);
  font-family: Montserrat, Arial, sans-serif;
}
.catalog-redesign-stage1 *,
.catalog-redesign-stage1 *::before,
.catalog-redesign-stage1 *::after { box-sizing: border-box; }

.catalog-r-shell {
  width: min(94vw, 1420px);
  margin-inline: auto;
}
.catalog-r-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 84px;
  background: rgba(255, 252, 248, .97);
  border-bottom: 1px solid rgba(91, 63, 41, .08);
}
.catalog-r-header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 210px 1fr 170px;
  align-items: center;
  gap: 28px;
}
.catalog-r-brand {
  display: flex;
  align-items: center;
  height: 64px;
}
.catalog-r-brand img {
  width: 155px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}
.catalog-r-nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(28px, 3vw, 54px);
  font-size: 14px;
}
.catalog-r-nav a {
  display: flex;
  align-items: center;
  min-height: 84px;
  position: relative;
}
.catalog-r-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 1px;
  background: #5b3f29;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.catalog-r-nav a:hover::after,
.catalog-r-nav a.active::after { transform: scaleX(1); }
.catalog-r-socials {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}
.catalog-r-socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #6f5948;
  border-radius: 50%;
  font-size: 19px;
}
.catalog-r-menu-toggle { display: none; }

.catalog-r-hero {
  aspect-ratio: 1748 / 453;
  background:
    linear-gradient(90deg, rgba(250,246,242,.98) 0%, rgba(250,246,242,.95) 33%, rgba(250,246,242,.52) 52%, rgba(250,246,242,0) 70%),
    url("assets/catalog/catalog_hero_final_1748x453.png") center/cover no-repeat;
}
.catalog-r-hero-inner {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
}
.catalog-r-hero-copy {
  width: min(48%, 610px);
  padding-left: clamp(24px, 4vw, 72px);
}
.catalog-r-hero h1 {
  margin: 0 0 24px;
  color: #4a3324;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(58px, 5.7vw, 94px);
  font-weight: 600;
  line-height: .91;
  letter-spacing: -.025em;
}
.catalog-r-hero p {
  margin: 0;
  font-size: clamp(16px, 1.24vw, 21px);
  line-height: 1.55;
  color: #4f433a;
}

.catalog-r-main { padding: 30px 0 28px; }
.catalog-r-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.catalog-redesign-stage1 .catalog-filter {
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid #eadfd5;
  border-radius: 32px;
  background: rgba(255,255,255,.62);
  color: #4a372a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s ease;
}
.catalog-redesign-stage1 .catalog-filter:hover {
  transform: translateY(-1px);
  border-color: #b89a7d;
}
.catalog-redesign-stage1 .catalog-filter.active {
  color: #fff;
  border-color: #5b3f29;
  background: #5b3f29;
  box-shadow: 0 8px 20px rgba(91,63,41,.16);
}
.catalog-r-filter-icon { font-size: 23px; line-height: 1; }

.catalog-r-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 24px;
}
.catalog-r-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #eadfd5;
  border-radius: 14px;
  background: rgba(255,255,255,.56);
  box-shadow: 0 8px 24px rgba(73,51,34,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.catalog-r-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(73,51,34,.09);
}
.catalog-r-card.is-hidden { display: none; }
.catalog-r-image {
  width: 100%;
  aspect-ratio: 1.22 / 1;
  overflow: hidden;
}
.catalog-r-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-r-card-icon {
  position: absolute;
  left: 30px;
  top: calc((100% - 215px) * .82);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid rgb(250,246,242);
  border-radius: 50%;
  background: #5b3f29;
  color: white;
  font-size: 25px;
  z-index: 2;
}
.catalog-r-card-body {
  min-height: 215px;
  padding: 42px 30px 27px;
}
.catalog-r-card-body h2 {
  margin: 0 0 13px;
  text-align: left;
  color: #4a3324;
  font-size: clamp(24px, 1.65vw, 31px);
  line-height: 1.1;
}
.catalog-r-card-body h2 span { font-family: inherit; }
.catalog-r-card-body p {
  min-height: 68px;
  margin: 0 0 18px;
  color: #5f544b;
  font-size: 14px;
  line-height: 1.55;
}
.catalog-r-more {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  border: 1px solid #bda58f;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
}
.catalog-r-more span { font-size: 20px; }

.catalog-r-custom {
  min-height: 185px;
  margin-top: 28px;
  padding: 28px clamp(32px, 5vw, 82px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  border: 1px solid #e5d8ca;
  border-radius: 14px;
  background-image: url("assets/catalog_custom_banner_clean_v40_1583x248_retina.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
.catalog-r-custom-copy {
  position: relative;
  left: 300px !important;
  transform: none !important;
}

.catalog-r-custom h2 {
  margin: 0 0 8px;
  text-align: left;
  color: #4a3324;
  font-size: clamp(31px, 2.4vw, 42px);
}
.catalog-r-custom p {
  margin: 0;
  color: #50443b;
  font-size: 16px;
  line-height: 1.45;
}
.catalog-r-custom-button {
  min-width: 270px;
  min-height: 62px;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border-radius: 32px;
  background: #5b3f29;
  color: white;
  font-size: 16px;
}
.catalog-r-custom-button span { font-size: 24px; }

.catalog-r-footer {
  min-height: 72px;
  background: linear-gradient(90deg, #3f2a1d, #5a3825);
  color: #fff8f0;
}
.catalog-r-footer-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: 180px 1fr auto 44px;
  gap: 28px;
  align-items: center;
}
.catalog-r-footer-brand {
  display: flex;
  flex-direction: column;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 25px;
  line-height: .85;
}
.catalog-r-footer-brand small {
  margin-top: 8px;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 7px;
  font-style: normal;
  letter-spacing: .18em;
}
.catalog-r-footer-copy { font-size: 12px; opacity: .82; }
.catalog-r-footer-nav {
  display: flex;
  gap: 42px;
  font-size: 12px;
}
.catalog-r-up {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  font-size: 20px;
}

@media (max-width: 1050px) {
  .catalog-r-header-inner { grid-template-columns: 180px 1fr auto; }
  .catalog-r-socials { display: none; }
  .catalog-r-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .catalog-r-filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .catalog-r-footer-inner { grid-template-columns: 160px 1fr 40px; }
  .catalog-r-footer-nav { display: none; }
}
@media (max-width: 760px) {
  .catalog-r-shell { width: min(92vw, 1420px); }
  .catalog-r-header { height: 72px; }
  .catalog-r-header-inner { grid-template-columns: 1fr auto; }
  .catalog-r-brand img { width: 138px; height: 52px; }
  .catalog-r-menu-toggle { display: block; }
  .catalog-r-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 4vw;
    right: 4vw;
    padding: 16px;
    flex-direction: column;
    gap: 0;
    background: #fffdfa;
    box-shadow: 0 15px 30px rgba(0,0,0,.12);
  }
  .catalog-r-nav.open { display: flex; }
  .catalog-r-nav a { min-height: 44px; }
  .catalog-r-nav a::after { display: none; }
  .catalog-r-hero {
    background:
      linear-gradient(180deg, rgba(250,246,242,.96), rgba(250,246,242,.58)),
      url("assets/catalog/catalog_hero_final_1748x453.png") center/cover no-repeat;
  }
  .catalog-r-hero-inner { min-height: 360px; height: auto; align-items: flex-end; }
  .catalog-r-hero-copy { width: 100%; padding: 32px 10px 42px; }
  .catalog-r-hero h1 { font-size: 54px; }
  .catalog-r-hero p { font-size: 14px; }
  .catalog-r-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .catalog-redesign-stage1 .catalog-filter { min-height: 50px; padding: 0 13px; font-size: 13px; }
  .catalog-r-grid { grid-template-columns: 1fr; }
  .catalog-r-card-icon { top: calc((100% - 210px) * .82); }
  .catalog-r-custom { grid-template-columns: 1fr; }
  .catalog-r-custom-button { min-width: 0; width: 100%; }
  .catalog-r-footer-inner { grid-template-columns: 1fr 40px; }
  .catalog-r-footer-copy { display: none; }
}

/* Header на странице каталога полностью наследуется из согласованной главной страницы. */
.catalog-redesign-stage1 .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* HERO HEIGHT FIX — 2026-07-28
   Reduce only the visible catalog hero height; keep the approved 1748×453 image unchanged. */
@media (min-width: 769px) {
  .catalog-r-hero {
    aspect-ratio: auto !important;
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
    background-size: cover !important;
    background-position: center center !important;
  }
  .catalog-r-hero-inner {
    height: 380px !important;
    min-height: 380px !important;
  }
}

/* =========================================================
   CATALOG PAGE — EXACT HOMEPAGE SIDE FIELDS
   Homepage rule copied exactly: width: min(96vw, 1600px).
   ========================================================= */
.catalog-redesign-stage1 .catalog-r-shell {
  width: min(96vw, 1600px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 900px) {
  .catalog-redesign-stage1 .catalog-r-shell {
    width: min(97vw, 1600px) !important;
  }
}

/* =========================================================
   CATALOG FIELDS — MATCH THE ACTIVE HOMEPAGE PAGE FIELDS
   Real homepage values: 66–78px desktop, 38px tablet, 24px narrow desktop.
   ========================================================= */
.catalog-redesign-stage1 .catalog-r-shell {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: clamp(66px, 4.5vw, 78px) !important;
  padding-right: clamp(66px, 4.5vw, 78px) !important;
  box-sizing: border-box !important;
}

@media (min-width: 941px) and (max-width: 1250px) {
  .catalog-redesign-stage1 .catalog-r-shell {
    padding-left: 38px !important;
    padding-right: 38px !important;
  }
}

@media (min-width: 769px) and (max-width: 940px) {
  .catalog-redesign-stage1 .catalog-r-shell {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media (max-width: 768px) {
  .catalog-redesign-stage1 .catalog-r-shell {
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* =========================================================
   CATALOG ALIGNMENT FIX — HERO COPY + PRODUCT GRID
   The hero text and cards had their own offsets/viewport widths,
   so they ignored the shared page fields.
   ========================================================= */
@media (min-width: 769px) {
  .catalog-redesign-stage1 .catalog-r-hero-copy {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .catalog-redesign-stage1 .catalog-grid.catalog-r-grid,
  .catalog-redesign-stage1 .catalog-r-grid {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* =========================================================
   CATALOG BUTTON SHAPE — MATCH HOMEPAGE
   Homepage buttons use a subtle 4px corner radius.
   ========================================================= */
.catalog-redesign-stage1 .catalog-filter,
.catalog-redesign-stage1 .catalog-r-more,
.catalog-redesign-stage1 .catalog-r-custom-button,
.catalog-redesign-stage1 .catalog-custom-button {
  border-radius: 4px !important;
}


/* =========================================================
   CATALOG BUTTON TYPOGRAPHY — MATCH HOMEPAGE
   Same text size and typography for every catalog button.
   Button dimensions and positions are unchanged.
   ========================================================= */
.catalog-redesign-stage1 .catalog-filter,
.catalog-redesign-stage1 .catalog-r-more,
.catalog-redesign-stage1 .catalog-r-custom-button,
.catalog-redesign-stage1 .catalog-custom-button {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
}

/* =========================================================
   FINAL CATALOG BUTTONS — EXACT HOMEPAGE MATCH
   ========================================================= */
.catalog-redesign-stage1 button.catalog-filter,
.catalog-redesign-stage1 a.catalog-r-more,
.catalog-redesign-stage1 a.catalog-r-custom-button,
.catalog-redesign-stage1 .catalog-custom-button {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

.catalog-redesign-stage1 button.catalog-filter.active,
.catalog-redesign-stage1 button.catalog-filter[aria-pressed="true"] {
  background: #4f5b32 !important;
  border-color: #4f5b32 !important;
  color: #fff !important;
  box-shadow: 0 7px 20px rgba(79, 91, 50, .18) !important;
}


/* Card image height reduction */
@media (min-width:769px){
.catalog-r-card-media,
.catalog-card-image,
.catalog-r-card img{
    height:320px !important;
    min-height:320px !important;
    max-height:320px !important;
    overflow:hidden!important;
}
.catalog-r-card-media img,
.catalog-card-image img,
.catalog-r-card img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
}
}

/* =========================================================
   FINAL CARD COMPACTNESS + HOMEPAGE HEADING TYPOGRAPHY
   ========================================================= */
.catalog-redesign-stage1 .catalog-r-grid {
  align-items: start !important;
}

.catalog-redesign-stage1 .catalog-r-card {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
}

.catalog-redesign-stage1 .catalog-r-card-body {
  min-height: 0 !important;
  height: auto !important;
  padding: 38px 30px 22px !important;
}

.catalog-redesign-stage1 .catalog-r-card-body h2 {
  margin: 0 0 9px !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(28px, 2.15vw, 38px) !important;
  font-weight: 600 !important;
  line-height: 1.08 !important;
  letter-spacing: normal !important;
}

.catalog-redesign-stage1 .catalog-r-card-body p {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 0 14px !important;
}

@media (max-width:768px) {
  .catalog-redesign-stage1 .catalog-r-card-body {
    padding: 36px 22px 20px !important;
  }

  .catalog-redesign-stage1 .catalog-r-card-body h2 {
    font-size: 30px !important;
  }
}

/* =========================================================
   CARD PHOTO → TITLE GAP FIX
   ========================================================= */
@media (min-width:769px) {
  .catalog-redesign-stage1 .catalog-r-card-icon {
    width: 46px !important;
    height: 46px !important;
    left: 24px !important;
    top: 297px !important;
    border-width: 2px !important;
    font-size: 20px !important;
  }

  .catalog-redesign-stage1 .catalog-r-card-body {
    padding: 15px 24px 20px !important;
  }

  .catalog-redesign-stage1 .catalog-r-card-body h2 {
    min-height: 46px !important;
    margin: 0 0 8px !important;
    padding-left: 58px !important;
    display: flex !important;
    align-items: center !important;
  }
}

@media (max-width:768px) {
  .catalog-redesign-stage1 .catalog-r-card-body {
    padding-top: 18px !important;
  }
}

/* =========================================================
   FINAL OVERRIDE — CARD TEXT DIRECTLY UNDER PHOTO
   ========================================================= */
@media (min-width:769px) {
  .catalog-redesign-stage1 .catalog-grid.catalog-r-grid {
    align-items: start !important;
    grid-auto-rows: auto !important;
  }

  .catalog-redesign-stage1 article.catalog-card.catalog-r-card {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-image {
    display: block !important;
    height: 320px !important;
    min-height: 320px !important;
    max-height: 320px !important;
    margin: 0 !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-icon {
    top: 296px !important;
    left: 24px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-body {
    display: block !important;
    position: relative !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 14px 24px 20px !important;
    justify-content: initial !important;
    align-content: initial !important;
    transform: none !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-body > h2 {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0 8px 0 !important;
    padding: 0 0 0 56px !important;
    line-height: 1.08 !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-body > p {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-body > .catalog-r-more {
    margin: 0 !important;
  }
}

/* =========================================================
   FINAL ALIGNMENT — ICON ON PHOTO, ALL TEXT ON ONE LEFT EDGE
   ========================================================= */
@media (min-width:769px) {
  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-icon {
    top: 266px !important;
    left: 24px !important;
    width: 44px !important;
    height: 44px !important;
    z-index: 3 !important;
  }

  .catalog-redesign-stage1 article.catalog-r-card > .catalog-r-card-body > h2 {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 760px) {
  .catalog-r-custom-copy {
    left: 0 !important;
    transform: none !important;
  }
}
