/* ── LEVEL 1: CATALOG LISTING PAGE ──────────────────────────── */

/* Category banners grid */
.catalog-cats { padding: 59px 0 0; }
.catalog-cats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Category banner card — desktop: image fills card, label overlay at bottom */
.catalog-cat-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 645 / 462;
  min-height: 280px;
  display: block;
}
.catalog-cat-card__link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
}
/* Photo fills card on desktop */
.catalog-cat-card__photo {
  position: absolute;
  inset: 0;
  background: #1a1a1a;
  transition: transform 0.4s ease;
}
.catalog-cat-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
/* Dark overlay */
.catalog-cat-card__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(47, 47, 47, 0.35);
  z-index: 1;
}
/* Label at bottom on desktop */
.catalog-cat-card__label {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: auto;
  display: inline-block;
  background: var(--color-accent, #7BE800);
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 50px;
  line-height: 1.2;
  z-index: 2;
}
.catalog-cat-card:hover .catalog-cat-card__photo img {
  transform: scale(1.04);
}

/* Search bar */
.catalog-search { padding: 78px 0 0; }
.catalog-search__form {
  max-width: 796px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #F0F0F0;
  border-radius: 50px;
  padding: 0 24px;
  height: 52px;
  gap: 12px;
}
.catalog-search__input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #1a1a1a;
  outline: none;
}
.catalog-search__input::placeholder { color: #999; }
.catalog-search__btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Items section */
.catalog-items { padding: 66px 0 22px; }
.catalog-items__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 24px;
  row-gap: 140px;
}
.catalog-items__row { display: contents; }

/* ── CATALOG ITEM CARD (horizontal: image left → content right) ── */
.catalog-item-card {
  display: flex;
  flex-direction: row;
  background: #D9D9D9;
  border-radius: 40px;
  overflow: hidden;
  padding: 30px;
  box-sizing: border-box;
  align-items: flex-start;
}
.catalog-item-card__img {
  flex: none;
  width: 241px;
  min-height: 240px;
  background: #ececec;
  border-radius: 0;
  position: static;
  align-self: stretch;
}
.catalog-item-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.catalog-item-card__img a {
  display: block;
  width: 100%;
  height: 100%;
}
.catalog-item-card__img .field,
.catalog-item-card__img .field__items,
.catalog-item-card__img .field__item,
.catalog-item-card__img .field__item a {
  display: block;
  width: 100%;
  height: 100%;
}
.catalog-item-card__body {
  flex: 1;
  padding: 0 28px 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
}
.catalog-item-card__article {
  display: none;
}
.catalog-item-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #000;
  line-height: normal;
  margin: 0 0 13px;
  text-align: left;
}
.catalog-item-card__title a {
  color: #000;
  text-decoration: none;
}
.catalog-item-card__title a:hover { color: var(--color-accent); }
.catalog-item-card__summary {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 200;
  color: #000;
  line-height: normal;
  margin: 0 0 auto;
}
.catalog-item-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  width: 201px;
  height: 45px;
  background: #75E513;
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 30px;
  align-self: flex-end;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.catalog-item-card__btn:hover { opacity: 0.85; }

/* ── LEVEL 2: CATEGORY PAGE HERO ────────────────────────────── */

/* Full-width photo banner; transparent header overlays top; title + back at bottom */
.cat-hero {
  position: relative;
  height: 550px;
  overflow: hidden;
}
.cat-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
}
.cat-hero__bg--dark { background-color: #2a2a2a; }
.cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 47, 47, 0.45);
}
.cat-hero__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  padding-top: 80px;
  padding-bottom: 100px;
  padding-left: 50px;
  padding-right: 50px;
}
.cat-hero__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 0 0 50px;
}
.cat-hero__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #75E513;
  color: #000;
  width: 252px;
  height: 45px;
  border-radius: 30px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.cat-hero__back svg { display: block; }
.cat-hero__back:hover { opacity: 0.85; }
.cat-hero__photo { display: none; }


/* ── LEVEL 3: PRODUCT DETAIL PAGE ───────────────────────────── */

.catalog-product { padding-bottom: 80px; }

.catalog-product__layout {
  display: grid;
  grid-template-columns: 524fr 793fr;
  gap: 44px;
  align-items: start;
  padding-top: 37px;
  padding-bottom: 48px;
}

/* Image column */
.catalog-product__img-col { position: sticky; top: 24px; align-self: start; }
.catalog-product__img { border-radius: 16px; overflow: hidden; }
.catalog-product__img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Info column */
.catalog-product__article {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 12px;
}
.catalog-product__info-col {
  padding-top: 23px;
}
.catalog-product__back {
  display: inline-flex;
  margin-bottom: 32px;
}
.catalog-product__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0 0 56px;
}
.catalog-product__desc-short {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: #1a1a1a;
  line-height: 1.6;
}
.catalog-product__desc-short .field { margin: 0; }

/* Back button reused for Level 3 nav area */
.catalog-product__nav .cat-hero__back {
  /* same pill style as Level 2 */
}

/* ── TABS ────────────────────────────────────────────────────── */
.catalog-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.catalog-tabs__tab {
  display: inline-block;
  padding: 10px 32px;
  border-radius: 50px;
  background: #D9D9D9;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.catalog-tabs__tab:hover { background: #c8c8c8; }
.catalog-tabs__tab--active {
  background: var(--color-accent, #7BE800);
  color: #000;
  font-weight: 700;
}

.catalog-tabs__panels { min-height: 120px; }
.catalog-tabs__panel { display: none; }
.catalog-tabs__panel--active { display: block; }

.catalog-product__body,
.catalog-product__specs {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #333;
  line-height: 1.7;
}
.catalog-product__specs pre {
  white-space: pre-wrap;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
}

/* Specs HTML table */
.catalog-product__specs .views-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #333;
}
.catalog-product__specs .views-table thead tr {
  border-bottom: 2px solid var(--color-accent, #7BE800);
  background: #f7f7f7;
}
.catalog-product__specs .views-table thead th {
  text-align: left;
  font-weight: 700;
  color: #1a1a1a;
  padding: 12px 16px;
}
.catalog-product__specs .views-table thead th:last-child {
  text-align: right;
}
.catalog-product__specs .views-table tbody td {
  padding: 10px 16px;
  vertical-align: top;
  border-bottom: 1px solid #e8e8e8;
  line-height: 1.5;
}
.catalog-product__specs .views-table tbody tr:nth-child(even) td {
  background: #f7f7f7;
}
.catalog-product__specs .views-table tbody td:first-child {
  color: #555;
  width: 60%;
}
.catalog-product__specs .views-table tbody td:last-child {
  font-weight: 600;
  color: #1a1a1a;
  text-align: right;
}

/* Docs tab */
.catalog-product__docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.catalog-product__docs-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #f7f7f7;
  border-radius: 12px;
  transition: background 0.2s;
}
.catalog-product__docs-item:hover { background: #eee; }
.catalog-product__docs-icon { flex-shrink: 0; }
.catalog-product__docs-item a {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
}
.catalog-product__docs-item a:hover { color: var(--color-accent, #7BE800); }

.catalog-product__empty {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #aaa;
}

/* ── RESPONSIVE (mobile / tablet) ───────────────────────────── */
@media (max-width: 900px) {
  /* Category cards: keep 2 cols but shrink label */
  .catalog-cat-card__label {
    font-size: 15px;
    padding: 8px 16px;
  }
  .catalog-cats__grid { gap: 16px; }

  /* Items grid: 1 column */
  .catalog-items__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Card: keep horizontal layout, shrink image */
  .catalog-item-card {
    padding: 20px;
  }
  .catalog-item-card__img {
    width: 180px;
    height: 236px;
  }
  .catalog-item-card__body {
    padding: 0 20px 20px 30px;
  }

  /* Category page hero: shorter */
  .cat-hero { height: 320px; }
  .cat-hero__title {
    font-size: 28px;
    line-height: 1.25;
  }

  /* Category page items grid: also 1 column */
  .cat-items__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  /* Product detail: single column */
  .catalog-product__layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 32px;
  }
  .catalog-product__img-col { position: static; }
  .catalog-product__title { font-size: 24px; }
  .catalog-product__desc-short { font-size: 16px; }

  /* Tabs: smaller */
  .catalog-tabs { gap: 8px; }
  .catalog-tabs__tab {
    font-size: 13px;
    padding: 8px 18px;
  }

  /* Category label even smaller */
  .catalog-cat-card__label { font-size: 12px; padding: 6px 12px; }
  .cat-hero { height: 240px; }
  .cat-hero__title { font-size: 22px; }
}
