.catalog-top-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 10px auto 10px;
  flex-wrap: wrap;
}
.catalog-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #8a9096, #6d7378);
  color: #fff;
  text-decoration: none;
  padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 20px);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}
.catalog-btn i {
  color: #FFD700;
  font-size: clamp(14px, 2vw, 22px);
}
.catalog-btn:hover {
  background: linear-gradient(145deg, #e0c04f, #c8a717);
  color: white;
}
.catalog-btn:hover i { color: black; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0 auto;
}
.product-card-catalog {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 260px;
  box-sizing: border-box;
  padding: 15px;
  background: #f8f8f8;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card-catalog:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.product-card-catalog img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  border-radius: 5px;
  margin-bottom: 10px;
  background: white;
}
.price {
  font-size: 0.9rem;
  margin: 0;
  color: #333;
}
.card-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.products-grid .product-card-catalog a {
  text-decoration: none;
  color: #6d7378;
  transition: color 0.2s ease;
  font-size: 0.95rem;
  display: block;
  margin: 5px 0;
}
.products-grid .product-card-catalog a h3 {
  margin: 2px 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.products-grid .product-card-catalog a:hover h3 { color: #e6c200; }
.subcategories-section {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 30px;
  margin-bottom: 15px;
}
.subcategories-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 0;
  list-style: none;
  margin: 0;
}
.subcategories-list li a {
  display: inline-block;
  padding: 6px 12px;
  background: #f0f0f0;
  color: #333;
  border-radius: 20px;
  border: 1px solid #ccc;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.subcategories-list li a:hover {
  background: #e0c04f;
  color: black;
  border-color: #c8a717;
}
.subcategories-list::-webkit-scrollbar { height: 4px; }
.subcategories-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}
.subcategories-list::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 2px;
}
.subcategories-list {
  scrollbar-width: thin;
  scrollbar-color: #ccc rgba(0,0,0,0.1);
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  border: none;
  border-radius: 50%;
  color: #ffd700;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.carousel-btn:hover { color: #6d7378; }
.carousel-btn.left { left: 0; }
.carousel-btn.right { right: 0; }
.breadcrumbs {
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin: 10px 0;
  display: flex;
  justify-content: flex-start;
  width: 100%;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.breadcrumb-item a {
  color: #707070;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.breadcrumb-item a:hover { color: black; }
.breadcrumb-item .separator {
  margin: 0 10px;
  color: #ffd700;
}
.breadcrumb-item.current {
  font-weight: 500;
  color: #4a4a4a;
}
.search-section { text-align: center; margin-bottom: 60px; }
.search-title {
  display: block;
  width: fit-content;
  margin: 20px auto 25px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #333;
  border-bottom: 2px solid #e6c200;
  padding-bottom: 5px;
}
.no-results {
  font-weight: 700;
  font-size: clamp(1rem, 3vw, 1.25rem);
  padding: 20px 25px;
  display: inline-block;
  margin: 40px auto;
  max-width: 90%;
  box-sizing: border-box;
}
.list-pages {
  text-align: center;
  margin-top: clamp(10px, 6vw, 20px);
  margin-right: clamp(10px, 5vw, 20px);
  margin-bottom: 0;
  margin-left: clamp(10px, 5vw, 20px);
}
.list-pages ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  gap: clamp(4px, 1.5vw, 12px);
}
.list-pages ul li { display: inline-block; }
.list-pages a,
.list-pages input.page-input {
  display: inline-block;
  min-width: clamp(22px, 5vw, 32px);
  padding: clamp(3px, 1vw, 6px) clamp(4px, 1.5vw, 10px);
  text-align: center;
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-weight: 500;
  color: #bfa500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}
.list-pages input.page-input:focus {
  outline: none;
  box-shadow: 0 0 3px 1px gray;
  border-radius: 4px;
}
.list-pages a:hover,
.list-pages input.page-input:hover {
  color: black;
  transform: translateY(-1px);
}
.list-pages .page-num-selected a,
.list-pages .page-num-selected input.page-input {
  color: #fff;
  background: #bfa500;
  border-radius: 4px;
  min-width: clamp(22px, 5vw, 32px);
  padding: clamp(3px, 1vw, 6px) clamp(4px, 1.5vw, 10px);
  cursor: default;
}
.page-input::-webkit-inner-spin-button,
.page-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#sortForm {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(8px, 2vw, 14px);
  margin: 10px 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#sortForm::-webkit-scrollbar { display: none; }
#sortForm label {
  font-weight: 500;
  color: #707070;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
    white-space: nowrap;
}
#sortForm select {
   padding: clamp(4px, 0.8vw, 6px) clamp(8px, 1.5vw, 10px);
  border-radius: 8px;
  border: 1px solid #bfa46f;
  background-color: #f7f7f7;
  color: #333;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  transition: all 0.2s ease;
  cursor: pointer;
  appearance: none;
  white-space: nowrap;
  width: auto;
  min-width: 120px;
  max-width: 200px;
}
#sortForm select:hover {
  background-color: #ececec;
  border-color: #a88e58;
}
#sortForm select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(191, 164, 111, 0.4);
}
.product-card-single {
  max-width: 400px;
  margin: 25px auto;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-card-content {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}
.product-image-container { flex: 1 1 45%; }
.product-image-container img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  border-radius: 8px;
}
.product-info {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.description {
  text-align: justify;
  hyphens: auto;
  margin-bottom: 14px;
}
.product-info h3 {
  font-size: 1.4rem;
  color: #6d7378;
  margin-bottom: 14px;
}
.product-info p {
  font-size: 0.95rem;
  color: #333;
  margin: 8px 0 14px;
}
.product_exit {
    display: inline-block;
    padding: 8px 12px;
    background: #6d7378;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}
.product_exit:hover { background: #8a9096; }
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  display: inline-block;
  background-color: #fff;
  padding: 10px;
  border-radius: 12px;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
}
.lightbox .close {
  position: absolute;
  top: -0px;
  right: 10px;
  color: black;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox .close:hover { color: #FFD700; }

@media (min-width: 1921px) {
  .catalog-card { flex: 0 0 20%; }
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
  }
  .product-card-catalog {
    flex: 0 0 260px;
    max-width: 280px;
  }
}
@media (min-width: 1440px) and (max-width: 1920px) {
  .catalog-card { flex: 0 0 25%; }
  .product-card-catalog { flex: 0 0 240px; }
  .products-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  .product-card-catalog { max-width: 260px; }
}
@media (min-width: 1200px) and (max-width: 1439px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
  .product-card-catalog { max-width: 260px; }
}
@media (min-width: 831px) and (max-width: 1199px) {
  .catalog-card { flex: 0 0 30%; }
  .product-card-catalog { flex: 0 0 220px; }
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .product-card-catalog { max-width: 240px; }
}
@media (min-width: 631px) and (max-width: 830px) {
  .catalog-card { flex: 0 0 40%; }
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .product-card-catalog { flex: unset;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box; }
  .lightbox {
    align-items: flex-start;
    padding-top: 100px;
  }
  .lightbox img {
    max-height: 80vh;
    max-width: 90vw;
  }
}
@media (min-width: 461px) and (max-width: 630px) {
  .catalog-card { flex: 0 0 45%; }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card-catalog { flex: unset;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box; }
  .product-carousel { gap: 12px; }
  .lightbox {
    align-items: flex-start;
    padding-top: 100px;
  }
  .lightbox img {
    max-height: 80vh;
    max-width: 90vw;
  }
}
@media (max-width: 460px) {
   .products-grid .product-card-catalog {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .catalog-card { flex: 0 0 90%; }
  .products-grid { grid-template-columns: 1fr; gap: 10px; }
  .lightbox {
    align-items: flex-start;
    padding-top: 100px;
  }
  .lightbox img {
    max-height: 80vh;
    max-width: 90vw;
  }
}
@media (max-width: 1350px) {
  .breadcrumbs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    mask-image: linear-gradient(to right, black 95%, transparent 100%);
  }
.breadcrumbs::-webkit-scrollbar { height: 0px; }
.breadcrumbs::-webkit-scrollbar-track,
.breadcrumbs::-webkit-scrollbar-thumb { background: transparent; }
  .breadcrumbs ol {
    display: inline-flex;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    white-space: nowrap;
  }
  .breadcrumb-item { flex: 0 0 auto; }
}
@media (max-width: 600px) {
  .product-card-content { flex-direction: column; }
  .product-image-container img { max-height: 280px; }
  .list-pages { margin-bottom: 60px; }
  .catalog-top-buttons {
    gap: 12px;
    justify-content: center;
  }
  .product_exit { margin-bottom: 60px; }
  .step_list { margin-bottom: 60px; }
}