/* Homepage, inner pages, sidebar, and shared page chrome. */

/* Page title: comb cell, serif, hairline. */
.title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  color: var(--color-text);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  text-align: left;
}

.title::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 16px;
  margin-top: 0.4em;
  background: var(--wax);
  clip-path: var(--hex);
}

.title::after {
  content: "";
  flex: 1 1 24px;
  height: 1px;
  margin-top: 0.58em;
  background: var(--line);
}

.index-content {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

.index-content p,
.seo__text,
.info__content {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
}

.seo {
  margin-top: 12px;
}

.seo__text {
  margin: 0 0 24px;
  padding: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.seo__text h2,
.seo__text h3,
.index-content h2,
.index-content h3 {
  margin: 0 0 12px;
  color: var(--color-text);
  line-height: 1.3;
}

.seo__text img,
.index-content .content img,
.index-content .content__item img {
  max-width: 100%;
  height: auto;
}

/* Category list repeated the header catalog. Keep videos and rated goods. */
.sidebar {
  display: none;
}

.menu-sidebar {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.menu-sidebar__link {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.35;
}

.menu-sidebar__item:last-child .menu-sidebar__link {
  border-bottom: 0;
}

.menu-sidebar__link:hover,
.menu-sidebar__link--active {
  background: var(--color-wash);
  color: var(--color-accent);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--color-text);
  font-size: 22px;
  line-height: 1.15;
  text-align: left;
}

.sidebar-title::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 14px;
  background: var(--wax);
  clip-path: var(--hex);
}

.sidebar-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.sidebar-rated {
  margin: 0 0 28px;
  padding: 0;
  background: none;
  border: 0;
}

/* YouTube hqdefault has black bars: crop the thumbnail to 16:9. */
.sidebar-rated.video-block .img-block {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.sidebar-rated.video-block .img-block > img:not(.img-play) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Master-class pages: a grid of framed video thumbnails. */
.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 0 0 32px;
}

.video-list > h2 {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 32px);
}

.video-list .video-block {
  min-width: 0;
}

.video-list .img-block {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink);
  border-radius: var(--radius-card);
  background: var(--ink);
  box-shadow: 6px 6px 0 var(--paper-deep);
  line-height: 0;
}

.video-list .img-block > img:not(.img-play) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s;
}

.video-list .img-play,
.sidebar-rated.video-block .img-play {
  width: 56px;
  transition: transform 0.25s var(--ease);
}

.video-list .video-link:hover .img-block > img:not(.img-play) {
  transform: scale(1.04);
  opacity: 0.9;
}

.video-list .video-link:hover .img-play,
.sidebar-rated.video-block .video-link:hover .img-play {
  transform: translate(-50%, -50%) scale(1.1);
}

.sidebar-rated__item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-white);
  text-align: left;
  transition: border-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.sidebar-rated__item:hover,
.sidebar-rated__item:focus-within {
  border-color: var(--wax);
  box-shadow: var(--shadow-soft);
  transform: translateX(3px);
}

.rated__img {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0;
  object-fit: cover;
  mix-blend-mode: multiply;
  background: var(--paper-deep);
  border-radius: 2px;
}

.rated__name a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

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

.rated__prices {
  margin-top: 4px;
}

.prices-rated__new {
  color: var(--color-accent);
  font-size: 20px;
  line-height: 1;
}

.modal-content {
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  background: var(--color-white);
  box-shadow: 8px 8px 0 rgba(42, 29, 18, 0.28);
}

.modal-header,
.modal-body,
.modal-footer {
  border-color: var(--color-line);
}

@media (max-width: 991px) {
  .index-content.index-content {
    margin-top: 16px;
  }
}

@media (max-width: 575px) {
  .title::after {
    display: none;
  }
}

@media (max-width: 767px) {
  .seo__text,
  .sidebar-rated {
    padding: 16px;
  }

  .index-content .row {
    margin-left: 0;
    margin-right: 0;
  }

  .index-content .content__item {
    flex-direction: column;
  }

  .index-content .content__item img {
    margin: 0 0 12px;
  }
}

/* ------------------------------------------------------------------
   CMS prose: inner pages and any editor-written block.
------------------------------------------------------------------ */
.page-prose,
.index-content .content,
.seo__text {
  color: #3a2d20;
  font-size: 17px;
  line-height: 1.7;
}

.page-prose a,
.index-content .content a,
.seo__text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-prose a:hover,
.index-content .content a:hover,
.seo__text a:hover {
  color: var(--color-text);
}

.page-prose p,
.page-prose ul,
.page-prose ol,
.page-prose dl,
.page-prose address,
.page-prose figure,
.index-content .content p,
.index-content .content ul,
.index-content .content ol,
.index-content .content dl,
.index-content .content address,
.index-content .content blockquote,
.seo__text p,
.seo__text ul,
.seo__text ol,
.seo__text dl,
.seo__text address,
.seo__text blockquote {
  margin: 0 0 1em;
  text-indent: 0;
}

.page-prose h1,
.page-prose h2,
.page-prose h3,
.page-prose h4,
.page-prose h5,
.page-prose h6,
.index-content .content h1,
.index-content .content h2,
.index-content .content h3,
.index-content .content h4,
.index-content .content h5,
.index-content .content h6,
.seo__text h1,
.seo__text h2,
.seo__text h3,
.seo__text h4,
.seo__text h5,
.seo__text h6 {
  margin: 1.8em 0 0.5em;
  color: var(--color-text);
  line-height: 1.2;
  text-transform: none;
}

.page-prose :is(h1, h2, h3, h4, h5, h6):first-child,
.index-content .content :is(h1, h2, h3, h4, h5, h6):first-child,
.seo__text :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-top: 0;
}

.page-prose h1,
.index-content .content h1,
.seo__text h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.page-prose h2,
.index-content .content h2,
.seo__text h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.page-prose h3,
.index-content .content h3,
.seo__text h3 {
  font-size: 1.5rem;
}

.page-prose h4,
.index-content .content h4,
.seo__text h4 {
  font-size: 1.25rem;
}

.page-prose h5,
.page-prose h6,
.index-content .content h5,
.index-content .content h6,
.seo__text h5,
.seo__text h6 {
  font-size: 1.05rem;
}

/* Amber tick above second-level headings. */
.page-prose h2::before,
.index-content .content h2::before,
.seo__text h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 12px;
  background: var(--wax);
}

.page-prose ul,
.page-prose ol,
.index-content .content ul,
.index-content .content ol,
.seo__text ul,
.seo__text ol {
  padding-left: 1.4em;
}

.page-prose ul,
.index-content .content ul,
.seo__text ul {
  list-style: disc;
}

.page-prose ol,
.index-content .content ol,
.seo__text ol {
  list-style: decimal;
}

.page-prose li::marker,
.index-content .content li::marker,
.seo__text li::marker {
  color: var(--wax);
}

.page-prose li > ul,
.page-prose li > ol,
.index-content .content li > ul,
.index-content .content li > ol,
.seo__text li > ul,
.seo__text li > ol {
  margin: 0;
}

.page-prose blockquote,
.index-content .content blockquote,
.seo__text blockquote {
  padding-left: 18px;
  border-left: 3px solid var(--wax);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.5;
}

.page-prose address,
.index-content .content address,
.seo__text address {
  font-style: normal;
}

.page-prose hr,
.index-content .content hr,
.seo__text hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--color-line);
}

.page-prose b,
.page-prose strong,
.index-content .content b,
.index-content .content strong,
.seo__text b,
.seo__text strong {
  font-weight: 700;
}

/* ------------------------------------------------------------------
   Contacts. Same facts, two cards. No invented form or map.
------------------------------------------------------------------ */
.index-content .row:has(.contacts) > .col-lg-3 {
  display: none;
}

.index-content .row:has(.contacts) > .col-lg-9 {
  flex: 0 0 100%;
  max-width: 100%;
}

.index-content .contacts {
  margin: 4px 0 40px;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

.index-content .contacts__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.index-content .contacts__card {
  min-width: 0;
  padding: 24px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.index-content .contacts__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  margin: 0 0 16px;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

.index-content .contacts__card .contacts__item:last-child {
  margin-bottom: 0;
}

.index-content .contacts__item > i {
  display: inline-flex;
  flex: 0 0 var(--tap);
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin: 0;
  border-radius: var(--radius-card);
  background: var(--color-wash);
  color: var(--color-accent);
  font-size: 18px;
}

.index-content .contacts__item span,
.index-content .contacts__item a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin: 0;
  color: var(--color-text);
  font-size: 16px;
  font-weight: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.index-content .contacts__item a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.index-content .contacts__item:has(.contacts__name) {
  padding-left: calc(var(--tap) + 12px);
}

.index-content .contacts__name {
  font-weight: 500;
}

.index-content .contacts__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.index-content .contacts__channels a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-card);
  background: var(--color-wash);
  color: var(--color-accent);
  font-size: 20px;
  text-decoration: none;
}

.index-content .contacts__channels a:hover {
  background: var(--color-brand);
  color: var(--color-on-brand);
  text-decoration: none;
}

.index-content .contacts__channels i {
  margin: 0;
  font-size: 20px;
}

@media (max-width: 720px) {
  .index-content .contacts__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-content .contacts__card {
    padding: 16px;
  }
}

/* ------------------------------------------------------------------
   Other shop pages keep the catalog menu hidden, use the full
   container, and place videos / best sellers underneath.
   The homepage (`.shop-home`) is excluded: its left column is the
   original video + rated-products column.
------------------------------------------------------------------ */
@media (min-width: 992px) {
  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) > .col-lg-9,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) > .col-lg-9 {
    flex: 0 0 100%;
    max-width: 100%;
    order: 1;
  }

  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) > .col-lg-3,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) > .col-lg-3 {
    display: grid;
    flex: 0 0 100%;
    max-width: 100%;
    order: 2;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 8px;
  }

  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) .sidebar-rated,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) .sidebar-rated {
    display: block;
    margin: 0;
  }

  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) aside.sidebar-rated:not(.video-block),
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) aside.sidebar-rated:not(.video-block) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) aside.sidebar-rated:not(.video-block) .sidebar-title,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) aside.sidebar-rated:not(.video-block) .sidebar-title {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) .sidebar-rated__item,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) .sidebar-rated__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 12px;
    overflow: hidden;
    text-align: center;
  }

  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) .rated__img,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) .rated__img {
    width: 100px;
    height: 100px;
    margin-bottom: 8px;
  }
}

@media (max-width: 991px) {
  .index-content:not(.shop-home) .row:has(> .col-lg-9 .group-products) > .col-lg-3,
  .index-content:not(.shop-home) .row:has(> .col-lg-9 > .card) > .col-lg-3 {
    display: none;
  }
}

/* Homepage styles live in home.css. */

/* Contacts channel glyphs use official brand colors on the light card. */
.index-content .contacts__channels .fa-viber {
  color: #7360f2;
}

.index-content .contacts__channels .fa-whatsapp {
  color: #25d366;
}

.index-content .contacts__channels .fa-telegram,
.index-content .contacts__channels .fa-telegram-plane {
  color: #2aabee;
}

.index-content .contacts__channels .fa-facebook,
.index-content .contacts__channels .fa-facebook-f {
  color: #1877f2;
}

.index-content .contacts__channels .fa-instagram {
  color: #e4405f;
}

.index-content .contacts__channels a:hover {
  background: var(--color-wash);
}
