/*
 * Тематичні добірки (ТЗ розділ 8).
 *
 * Підключається з plugins/zen-heart-core/includes/class-collections.php
 * (умови: сторінка добірки, головна, категорія товару). Залежить від
 * chaynyi-butik-theme (boutique.css): використовує змінні :root
 * (--cb-paper, --cb-brass, --cb-burgundy, --cb-serif, --cb-sans...).
 * Музейна палітра: папір #f4f0e9, бордо #92151b, латунь #b18a4b.
 */

/* ------------------------------------------------------------------
 * 1. Блок «Тематичні добірки» на головній.
 * ---------------------------------------------------------------- */

.zh-home-collections {
  background: var(--cb-paper, #f4f0e9);
}

.zh-home-collections .cb-section__head h2 {
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
}

.zh-home-collections__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.zh-col-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e2dbd0;
  background: var(--cb-white, #fffdf9);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.zh-col-card:hover {
  border-color: var(--cb-brass, #b18a4b);
  box-shadow: 0 18px 40px -32px rgba(23, 19, 15, 0.45);
}

.zh-col-card__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(177, 138, 75, 0.06), rgba(177, 138, 75, 0)),
    var(--cb-paper-bright, #fbf9f5);
}

.zh-col-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.zh-col-card:hover .zh-col-card__visual img {
  transform: scale(1.04);
}

.zh-col-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 26px 28px 28px;
}

.zh-col-card__plaque {
  color: var(--cb-brass, #b18a4b);
  font-family: var(--cb-sans, Inter, Arial, sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.zh-col-card__title {
  margin: 0;
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
}

.zh-col-card__title a {
  color: var(--cb-ink, #17130f);
  text-decoration: none;
}

.zh-col-card__title a:hover {
  color: var(--cb-burgundy, #92151b);
}

.zh-col-card__excerpt {
  margin: 0;
  color: var(--cb-muted, #716960);
  font-size: 14px;
  line-height: 1.5;
}

.zh-col-card__link {
  margin-top: auto;
  font-size: 13px;
}

/* ------------------------------------------------------------------
 * 2. Смуга «Добірки розділу» на сторінках категорій.
 * ---------------------------------------------------------------- */

.zh-cat-collections {
  margin: 26px 0 30px;
}

.zh-cat-collections__heading {
  margin: 0 0 12px;
  color: var(--cb-brass, #b18a4b);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.zh-cat-collections__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.zh-cat-collections__item {
  display: flex;
  flex: 0 0 250px;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 15px;
  border: 1px solid #e2dbd0;
  border-left: 2px solid var(--cb-brass, #b18a4b);
  background: var(--cb-paper-bright, #fbf9f5);
  transition: border-color 180ms ease, background 180ms ease;
}

.zh-cat-collections__item:hover {
  border-color: var(--cb-burgundy, #92151b);
  border-left-color: var(--cb-burgundy, #92151b);
  background: var(--cb-white, #fffdf9);
}

.zh-cat-collections__item strong {
  color: var(--cb-ink, #17130f);
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
}

.zh-cat-collections__item:hover strong {
  color: var(--cb-burgundy, #92151b);
}

.zh-cat-collections__item span {
  color: var(--cb-muted, #716960);
  font-size: 12px;
  line-height: 1.45;
}

/* ------------------------------------------------------------------
 * 3. Сторінка добірки (single-zht_collection).
 * ---------------------------------------------------------------- */

.zh-col-single {
  background: var(--cb-paper, #f4f0e9);
}

.zh-col-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 380px;
  padding: clamp(64px, 8vw, 120px) max(var(--cb-gutter, 60px), calc((100vw - var(--cb-container, 1320px)) / 2));
  overflow: hidden;
  background: var(--cb-paper, #f4f0e9);
}

.zh-col-hero.no-cover {
  background:
    linear-gradient(180deg, rgba(177, 138, 75, 0.08), rgba(177, 138, 75, 0) 60%),
    var(--cb-paper, #f4f0e9);
}

.zh-col-hero__cover {
  position: absolute;
  inset: 0;
}

.zh-col-hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.zh-col-hero.has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 19, 15, 0.05), rgba(23, 19, 15, 0.62));
}

.zh-col-hero__copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.zh-col-hero.no-cover .zh-col-hero__copy {
  padding: clamp(24px, 4vw, 56px) 0;
}

.zh-col-hero__eyebrow {
  margin: 0 0 14px;
  color: var(--cb-brass, #b18a4b);
  font-family: var(--cb-sans, Inter, Arial, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.zh-col-hero__title {
  margin: 0;
  color: var(--cb-ink, #17130f);
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.02;
}

.zh-col-hero.has-cover .zh-col-hero__title,
.zh-col-hero.has-cover .zh-col-hero__excerpt {
  color: var(--cb-white, #fffdf9);
}

.zh-col-hero__excerpt {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--cb-muted, #716960);
  font-size: 17px;
  line-height: 1.55;
}

.zh-col-content {
  padding: clamp(48px, 6vw, 88px) max(var(--cb-gutter, 60px), calc((100vw - var(--cb-container, 1320px)) / 2)) 0;
}

.zh-col-content__inner {
  max-width: 780px;
  color: var(--cb-ink-soft, #2a241e);
  font-size: 16px;
  line-height: 1.65;
}

.zh-col-content__inner > *:first-child {
  margin-top: 0;
}

.zh-col-content__inner > *:last-child {
  margin-bottom: 0;
}

.zh-col-content__inner h2,
.zh-col-content__inner h3 {
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-weight: 500;
  line-height: 1.1;
}

.zh-col-content__inner a {
  color: var(--cb-burgundy, #92151b);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.zh-col-products {
  padding: clamp(48px, 6vw, 88px) max(var(--cb-gutter, 60px), calc((100vw - var(--cb-container, 1320px)) / 2)) var(--cb-section-space, 120px);
}

.zh-col-products__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  border-top: 1px solid #ddd4c6;
  padding-top: 30px;
}

.zh-col-products__head h2 {
  margin: 0;
  color: var(--cb-ink, #17130f);
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(30px, 2.6vw, 42px);
  font-weight: 500;
  line-height: 1.05;
}

.zh-col-products__empty {
  margin: 0;
  color: var(--cb-muted, #716960);
  font-size: 15px;
  font-style: italic;
}

/* Сітка товарів — спрощені картки каталогу (cb-shop-product). */

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

.zh-col-product {
  position: relative;
  min-width: 0;
  border: 1px solid #e8e2d8;
  background: var(--cb-white, #fffdf9);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.zh-col-product:hover {
  border-color: var(--cb-brass, #b18a4b);
  box-shadow: 0 18px 40px -32px rgba(23, 19, 15, 0.45);
}

.zh-col-product__select {
  display: grid;
  grid-template-rows: 18px 180px minmax(110px, auto);
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 14px 16px 16px;
  color: var(--cb-ink, #17130f);
  text-decoration: none;
}

.zh-col-product__number {
  color: #96908a;
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.zh-col-product__image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cb-paper-bright, #fbf9f5);
}

.zh-col-product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
  transform: scale(1);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.zh-col-product:hover .zh-col-product__image img {
  transform: scale(1.04);
}

.zh-col-product__copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
}

.zh-col-product__copy strong {
  color: var(--cb-ink, #17130f);
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.12;
}

.zh-col-product:hover .zh-col-product__copy strong {
  color: var(--cb-burgundy, #92151b);
}

.zh-col-product__stock {
  margin-top: 6px;
  color: #6f7a5c;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zh-col-product__stock.is-out {
  color: var(--cb-burgundy, #92151b);
  opacity: 0.75;
}

.zh-col-product__bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 10px;
}

.zh-col-product__bottom b {
  color: var(--cb-ink, #17130f);
  font-family: var(--cb-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.zh-col-product__bottom small {
  color: var(--cb-brass, #b18a4b);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------
 * 4. Адаптив.
 * ---------------------------------------------------------------- */

@media (max-width: 1100px) {
  .zh-home-collections__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .zh-col-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .zh-col-hero {
    min-height: 300px;
  }

  .zh-home-collections__grid,
  .zh-col-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .zh-col-card__visual {
    aspect-ratio: 16 / 10;
  }

  .zh-col-card__body {
    padding: 20px 20px 22px;
  }

  .zh-col-card__title {
    font-size: 26px;
  }

  .zh-cat-collections__item {
    flex-basis: 210px;
  }

  .zh-col-product__select {
    grid-template-rows: 16px 150px minmax(100px, auto);
    padding: 12px 14px 14px;
  }
}

/* Контентний блок сторінки «Посуд» (the_content сторінки, ТЗ 4.3). */
.cb-ware-page-content {
  margin-top: 14px;
  color: var(--cb-ink, #17130f);
  font-family: var(--cb-sans, Inter, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.6;
}
