* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #d3cce3 0%, #e9e4f0 100%);
  min-height: 100vh;
  padding: 10px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Site Title в header */
/*.site-title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 10px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  display: block;
  transition: opacity 0.3s;
}*/

.site-title:hover {
  opacity: 0.9;
}

header {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)), 
              url('img/pagano-hero-header.webp');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.site-title {
  font-size: clamp(1rem, 6vw, 3.5rem);
  margin-bottom: 15px;
  font-weight: 900;
  color: #fff !important;
  text-decoration: none;
  display: block;
  transition: opacity 0.3s;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 3px 8px rgba(0,0,0,0.8);
}

header p {
  font-size: clamp(1rem, 3vw, 1.3rem);
  opacity: 0.95;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
  max-width: 600px;
}

@media (max-width: 768px) {
  header {
    padding: 40px 15px;
    min-height: 150px;
  }
}

header h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 10px;
}

header p {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  opacity: 0.9;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  background: #f8f9fa;
  border-bottom: 5px solid #e9ecef;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Основни стилове за таб бутоните */
.tab-button {
  flex: 1 1 auto;
  min-width: 150px;
  padding: 15px 10px;
  background: none;
  border: none;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  color: #666;
  position: relative;
}

/* Hover ефекти - само текст с градиент */
.tab-button:nth-child(1):hover {
  background: linear-gradient(135deg, #000000 0%, #0f9b0f 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tab-button:nth-child(2):hover {
  background: linear-gradient(135deg, #000000 0%, #757f9a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tab-button:nth-child(3):hover {
  background: linear-gradient(135deg, #000000 0%, #e73827 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Active състояния - текст с градиент + градиентна долна линия */
.tab-button:nth-child(1).active {
  background: linear-gradient(135deg, #000000 0%, #0f9b0f 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  border-bottom: 5px solid;
  border-image: linear-gradient(135deg, #000000 0%, #0f9b0f 100%) 1;
  margin-bottom: -3px;
}

.tab-button:nth-child(2).active {
  background: linear-gradient(135deg, #000000 0%, #757f9a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  border-bottom: 5px solid;
  border-image: linear-gradient(135deg, #000000 0%, #757f9a 100%) 1;
  margin-bottom: -3px;
}

.tab-button:nth-child(3).active {
  background: linear-gradient(135deg, #000000 0%, #e73827 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  border-bottom: 5px solid;
  border-image: linear-gradient(135deg, #000000 0%, #e73827 100%) 1;
  margin-bottom: -3px;
}

/* Hover за фона остава неутрален */
.tab-button:hover {
  background-color: #e9ecef;
}

/* Премахваме старото active поведение */
.tab-button.active {
  background-color: white;
}

.tab-content {
  display: none;
  padding: 20px 15px;
}

.tab-content.active {
  display: block;
}

.category {
  margin-bottom: 20px;
}

.category-header {
  background: linear-gradient(135deg, #000000 0%, #0f9b0f 100%);
  color: white;
  padding: 12px 15px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.category-header:hover {
  transform: translateX(5px);
}

.category-header.forbidden {
  background: linear-gradient(135deg, #000000 0%, #e73827 100%);
}

.category-header.gray-zone {
  background: linear-gradient(135deg, #000000 0%, #757f9a 100%);
}

.arrow {
  transition: transform 0.3s;
  font-size: 1.2em;
}

.arrow.open {
  transform: rotate(180deg);
}

.category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.category-content.open {
  max-height: 5000px;
}

.product-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  background: white;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.product-table th {
  background: #f8f9fa;
  padding: 12px 10px;
  text-align: left !important;
  font-weight: bold;
  color: #667eea;
  border-bottom: 2px solid #e9ecef;
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.product-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  text-align: left !important;
}

.product-table tr:hover {
  background: #f8f9fa;
}

.product-table tr:last-child td {
  border-bottom: none;
}

.product-table td:first-child {
  font-weight: bold;
}

.warning-note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.resources {
  background: #f8f9fa;
  padding: 20px 15px;
  margin-top: 20px;
  border-radius: 10px;
}

.resources h2 {
  color: #553800;
  margin-bottom: 15px;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.resource-link {
  display: block;
  padding: 12px;
  margin: 10px 0;
  background: white;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.resource-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.footer {
  background: linear-gradient(135deg, #1c5284 0%, #39e240 100%);
  color: white;
  text-align: center;
  padding: 5px;
  margin-top: 30px;
  font-size: 1rem;
  border-radius: 8px;
}

.footer p {
  margin: 0;
  font-weight: 500;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }

  .container {
    border-radius: 10px;
  }

  header {
    padding: 20px 15px;
  }

  .tab-button {
    padding: 12px 8px;
    min-width: 120px;
  }

  .category-header {
    padding: 10px 12px;
  }

  .product-table {
    font-size: 0.85rem;
  }

  .product-table th,
  .product-table td {
    padding: 8px 6px;
  }

  .footer {
    padding: 15px;
    font-size: 0.9rem;
  }

  /* Stack table on very small screens */
  @media (max-width: 480px) {
    .product-table thead {
      display: none;
    }

    .product-table tr {
      display: block;
      margin-bottom: 10px;
      border: 1px solid #e9ecef;
      border-radius: 8px;
    }

    .product-table td {
      display: block;
      text-align: left !important;
      padding: 8px 10px;
      border: none;
    }

    .product-table td:first-child {
      font-weight: bold;
      background: #f8f9fa;
      border-radius: 8px 8px 0 0;
      text-align: left !important;
    }

    .product-table td:before {
      content: attr(data-label);
      font-weight: bold;
      display: block; /* ПРОМЕНИ ОТ inline-block НА block */
      width: 100%;
      color: #667eea;
      text-align: left !important;
    }

    /* ДОБАВИ това за colspan заглавията */
    .product-table td[colspan] {
      text-align: left !important;
      padding-left: 10px !important;
    }

    .product-table td[colspan]:before {
      display: none; /* Махни data-label за заглавията */
    }
  }
}

.supplements {
  background: #f8f9fa;
  padding: 20px 15px;
  margin-top: 20px;
  border-radius: 10px;
}

.supplements h2 {
  color: #ff930f;
  margin-bottom: 15px;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.supplements-header {
  background: linear-gradient(135deg, #1e3c72 0%, #107fb3 100%) !important;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #1c5284 0%, #39e240 100%);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}

/* КАТАЛОГ */
.catalog {
  background: #f8f9fa;
  padding: 30px 20px;
  margin-top: 20px;
  border-radius: 10px;
}

.catalog h2 {
  color: #553800;
  margin-bottom: 25px;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  /* ПРОМЕНИ ОТ 768px НА 650px */
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
.catalog-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.catalog-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.catalog-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.catalog-card p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.catalog-arrow {
  color: #667eea;
  font-weight: 500;
  font-size: 0.9rem;
}

/* BREADCRUMBS */
.breadcrumbs {
  padding: 15px 20px;
  background: #f8f9fa;
  font-size: 0.9rem;
  border-bottom: 1px solid #e9ecef;
}

.breadcrumbs a {
  color: #667eea;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: #999;
  margin: 0 8px;
}

.breadcrumbs span:last-child {
  color: #333;
  font-weight: 500;
}

.archive-layout {
  padding: 0px;
  max-width: 100%;
  margin: 0 auto;
  margin-bottom: 40px;
}

/* PRODUCT DETAIL PAGE - компактен дизайн */
.product-detail {
  padding: 20px;
  max-width: 800px;
  margin: auto;
  margin-bottom: 40px;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 0px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  padding: 0 20px;
}

.product-icon-large {
  font-size: 3rem;
  flex-shrink: 0;
}

.product-detail h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
}

.product-section {
  margin: 20px 0;
  padding: 0px;
}

.product-section h2 {
  margin-top: 30px;
  margin-bottom: 20px;
}

.product-section h3 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-section p {
  margin: 10px 0;
  line-height: 1.6;
}

.product-section ul {
  margin-left: 20px;
  margin-top: 10px;
}

.product-section li {
  margin: 6px 0;
}

.archive-section {
  padding: 0 20px;
}

.back-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: #ffa800;
  box-shadow: 9px 10px 8px -14px #000;
  color: #000000;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
}

.back-button:hover {
  transform: translateX(-5px);
}

.archive-back-button {
  display: block;
  width: fit-content;
  margin: 30px auto 20px;
}

@media (max-width: 768px) {
  .product-detail {
    padding: 15px;
  }

  .product-header {
    gap: 0px;
  }

  .product-icon-large {
    font-size: 2.5rem;
  }

  .product-detail h2 {
    font-size: 1.5rem;
  }
}

.back-button {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 24px;
  background: #ffa800;
  box-shadow: 9px 10px 8px -13px #000;
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
}

.back-button:hover {
  transform: translateX(-5px);
}


@media (max-width: 768px) {
  .product-detail {
    padding: 20px 15px;
  }

  .product-icon-large {
    font-size: 3rem;
  }
}

.archive-back-button {
  margin-left: 20px;
}

@media (max-width: 768px) {
  .back-button,
  .archive-back-button {
    width: calc(100% - 40px);
    margin-left: 20px;
    margin-right: 20px;
    text-align: center;
  }
}

/* TABLE OF CONTENTS */
.table-of-contents {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
}

.table-of-contents h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.table-of-contents ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.table-of-contents li {
  margin: 8px 0;
}

.table-of-contents a {
  color: #667eea;
  text-decoration: none;
  padding: 5px 10px;
  display: block;
  border-radius: 5px;
  transition: all 0.2s;
}

.table-of-contents a:hover {
  background: #667eea;
  color: white;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Offset за header при anchor scroll */
section[id] {
  scroll-margin-top: 20px;
}

@media (max-width: 768px) {
  .table-of-contents {
    padding: 15px;
    margin: 15px;
  }
}

/* H1 вместо H2 */
.product-detail h1 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
}

/* TOC под заглавието */
.table-of-contents {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

/* Indent за H3 в TOC */
.table-of-contents ul ul {
  margin-left: 20px;
}

@media (max-width: 768px) {
  .product-detail h1 {
    font-size: 1.5rem;
  }
}

.table-of-contents {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  background: #fafafa;
}

.table-of-contents h3 {
  margin: 0 0 15px 0;
  text-align: center;
}

.toc-read-more,
.toc-hide {
  display: block;
  margin: 0 auto 15px auto;
  padding: 8px 20px;
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  color: #2c5f2d;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  width: auto;
}

.toc-hide {
  margin-top: 15px;
  margin-bottom: 0;
}

.toc-read-more:hover,
.toc-hide:hover {
  background: #e0e0e0;
  border-color: #b0b0b0;
  transform: translateY(-1px);
}

.toc-read-more:active,
.toc-hide:active {
  transform: translateY(0);
}

#toc-list {
  padding: 0;
  margin: 0;
}

/* FAQ СЕКЦИЯ */
/*.faq-section {
    background: #f8f9fa;
    padding: 30px 20px;
    margin: 30px 0;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}*/

.faq-section h2 {
  color: #333;
  margin-bottom: 25px;
  text-align: center;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  background: #f8f9fa;
  padding: 5px 10px;
  margin: 30px 0;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.faq-item {
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.faq-question {
  width: 100%;
  padding: 10px 10px;
  background: white;
  border: none;
  text-align: left;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 600;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
  font-family: inherit;
}

.faq-question:hover {
  background: #f8f9fa;
}

.faq-question.active {
  background: #ffa800;
  color: white;
}

.faq-arrow {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-left: 10px;
}

.faq-arrow.rotated {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #fafafa;
}

.faq-answer.open {
  max-height: 500px;
  padding: 20px;
}

.faq-answer p {
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Mobile оптимизация */
@media (max-width: 768px) {
  /*.faq-section {
        padding: 20px 15px;
        margin: 20px 0;
    }*/

  .faq-question {
    padding: 15px;
    font-size: 1rem;
  }

  .faq-answer.open {
    padding: 15px;
  }
}

/* БУТОН ЗА "Виж всички статии" */
.catalog-view-all-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #ffa800;
  color: #000000;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 9px 10px 8px -14px #000;
}

.catalog-view-all-btn:hover {
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .catalog-view-all-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* ОБНОВЕН КАТАЛОГ С ИМИДЖИ */
.catalog-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 0; /* Променено от 25px */
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* За да работи border-radius на image */
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* НОВА СЕКЦИЯ ЗА ИМИДЖ С OVERLAY */
.catalog-image {
  width: 100%;
  height: 100px; /* Увеличаваме малко за по-добро spacing */
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
  display: flex;
  align-items: center; /* Центрирано вертикално */
  justify-content: left; /* Центрирано хоризонтално */
}

.catalog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.catalog-card:hover .catalog-image img {
  transform: scale(1.05);
}

/* ТЪМЕН OVERLAY */
.catalog-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* Еднороден тъмен overlay */
  z-index: 1;
}

/* ЗАГЛАВИЕ ЦЕНТРИРАНО В СРЕДАТА НА ИМИДЖА */
.catalog-card h3 {
  font-size: 1.3rem;
  margin: 20px; /* Margin от всички страни */
  color: white;
  font-weight: 900; /* По-bold */
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  text-align: left;
  text-transform: uppercase; /* Главни букви */
  letter-spacing: 2px; /* Леко намалено за по-добра четливост */
  line-height: 1.2;
}

.catalog-card p {
  font-size: 0.95rem;
  color: #666;
  margin: 15px 0 15px;
  flex-grow: 1;
  padding: 0 20px; /* left right */
}

.catalog-arrow {
  color: #667eea;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0 20px 20px 20px; /* top right bottom left */
}

/* СКРИВАМЕ СТАРАТА ИКОНА */
.catalog-icon {
  display: none;
}

/* RESPONSIVE ПОВЕДЕНИЕ */
@media (max-width: 768px) {
  .catalog-image {
    height: 100px; /* По-малка височина на mobile */
  }

  .catalog-card h3 {
    padding: 0px 15px 0 15px;
    font-size: 1.1rem;
  }

  .catalog-card p {
    padding: 0 15px;
  }

  .catalog-arrow {
    padding: 0 15px 15px 15px;
  }
}

