.hero-wrapper {
  background-color: #f6f6f6;
  padding: 24px 0 40px 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  font-size: 14px;
}

.breadcrumbs .crumb {
  color: #676767;
  text-decoration: none;
}

.breadcrumbs .crumb:hover {
  color: #29231f;
}

.breadcrumbs .crumb.active {
  color: #29231f;
}

.crumb-arrow {
  width: 12px;
  height: 12px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#section-hero {
  padding: 0 20px;
}

#section-hero h1 {

  font-size: 36px;
  font-weight: 700;
  color: #29231f;
  text-transform: uppercase;
}

.hero-description {
  font-size: 16px;
  line-height: 1.5;
  color: #3f3f3f;
  max-width: 1360px;
}

#section-body {
    background-color: white;
  padding: 40px 20px 80px;
}

.body-grid {
  display: grid;
  grid-template-columns: 1fr 325px;
  gap: 40px;
}

.main-content-apl {

  display: flex;
  flex-direction: column;
  gap: 40px;
}

.content-block {
  width: 100%;
}

.image-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.text-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #3f3f3f;
  line-height: 1.5;
}

.text-block h2 {
  font-size: 20px;
  font-weight: 700;
  color: #29231f;
  margin-bottom: 8px;
}

.gallery-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.gallery-item {
  width: 95px;
  height: 120px;
  border: 1px solid #f6f6f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  flex-shrink: 0;
}

.gallery-item:first-child {
  border: 1.5px solid #5159fe;
}

.gallery-item.wide {
  flex-grow: 1;
  width: auto;
}

.gallery-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.links-block,
.materials-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag.red {
  background-color: #e51f2c;
  color: white;
}

.tag.red-light {
  background-color: rgba(229, 31, 44, 0.1);
  color: #e51f2c;
}

.tag.gray {
  background-color: #f0f0f0;
  color: #676767;
  border: 1px solid #e8e8e8;
}

.list-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-item {
  padding: 12px 20px 12px 8px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.4;
  color: #3f3f3f;
}

.green-bg .list-item {
  background-color: rgba(104, 187, 91, 0.16);
  border: 1px solid rgba(104, 187, 91, 0.16);
}

.red-bg .list-item {
  background-color: rgba(255, 78, 78, 0.12);
  border: 1px solid rgba(255, 78, 78, 0.12);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-title {
  font-size: 24px;
  font-weight: 700;
  color: #3f3f3f;
  margin-bottom: 20px;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card-apl-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card-apl-link:hover .product-card-apl {
  border-color: #5159fe;
  box-shadow: 0px 4px 16px 0px rgba(81, 89, 254, 0.1);
}

.product-card-apl {
  border: 1px solid #f6f6f6;
  border-radius: 16px;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-weight: 700;
  color: #29231f;
  font-size: 16px;
}

.card-subtitle {
  color: #5159fe;
  font-size: 12px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.card-tags,
.card-tags-multiline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag {
  background-color: #f6f6f6;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  color: #29231f;
}

.card-image {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 220px;
}

.card-image img {
    max-height: 230px;
    width: auto;
  }

/* Markdown Content Styles */
.markdown-content {
  color: #3f3f3f;
  line-height: 1.5;
  font-size: 16px;
}

.markdown-content p {
  margin: 0 0 16px 0;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-weight: 700;
  color: #29231f;
  margin-top: 24px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.markdown-content h1 {
  font-size: 32px;
}

.markdown-content h2 {
  font-size: 28px;
}

.markdown-content h3 {
  font-size: 24px;
}

.markdown-content h4 {
  font-size: 20px;
}

.markdown-content h5 {
  font-size: 18px;
}

.markdown-content h6 {
  font-size: 16px;
}

.markdown-content ul,
.markdown-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.markdown-content li {
  margin: 8px 0;
}

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ol {
  list-style-type: decimal;
}

.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

.markdown-content a {
  color: #5159fe;
  text-decoration: underline;
}

.markdown-content a:hover {
  color: #3d45d4;
}

.markdown-content strong {
  font-weight: 700;
  color: #29231f;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content code {
  background-color: #f6f6f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  color: #e51f2c;
}

.markdown-content pre {
  background-color: #f6f6f6;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
  color: #3f3f3f;
}

.markdown-content blockquote {
  border-left: 4px solid #5159fe;
  padding-left: 16px;
  margin: 16px 0;
  color: #676767;
  font-style: italic;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 24px 0;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.markdown-content th,
.markdown-content td {
  padding: 8px 12px;
  border: 1px solid #e8e8e8;
  text-align: left;
}

.markdown-content th {
  background-color: #f6f6f6;
  font-weight: 700;
  color: #29231f;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

/* Markdown списки внутри блоков плюсов и минусов */
.list-items.markdown-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-items.markdown-content li {
  padding: 12px 20px 12px 8px;
  border-radius: 12px;
  margin: 4px 0;
}

.green-bg.markdown-content li {
  background-color: rgba(104, 187, 91, 0.16);
  border: 1px solid rgba(104, 187, 91, 0.16);
}

.red-bg.markdown-content li {
  background-color: rgba(255, 78, 78, 0.12);
  border: 1px solid rgba(255, 78, 78, 0.12);
}

.list-items.markdown-content p {
  margin: 0;
}

.list-items.markdown-content p:not(:last-child) {
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .body-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }
}

