/* ======= Общие стили для таблиц ======= */
table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.5em;
}

table td, table th {
  border: 1px solid #ccc;
  padding: 8px 12px;
  vertical-align: top;
}

/* ======= Зебра для таблиц без изображений =======
Применяется через JS, но здесь можно задать стили по умолчанию на случай без JS */
table tr:nth-child(even):not(.no-stripe) {
  background-color: #dcdcdc;
}

table tr:nth-child(odd):not(.no-stripe) {
  background-color: #ffffff;
}

/* ======= Стили для таблиц с изображениями (определяется по applyImageTableStyles()) ======= */
table.simple-img-table {
  border: none;
  width: auto;
  margin: 1em auto;
  background-color: transparent;
}

table.simple-img-table td {
  border: none;
  padding: 0.25em 0.5em;
  vertical-align: middle;
}

/* ======= Стили для div, заменяющих <img> (img-bg-replacement) ======= */
.img-bg-replacement {
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  user-select: none;
  pointer-events: none;
}

/* Адаптивность по желанию */
@media screen and (max-width: 768px) {
  table,
  table.simple-img-table {
    width: 100%;
  }

  .img-bg-replacement {
    width: 100% !important;
    height: auto !important;
  }
}
/* Подключение шрифтов */

@font-face {
    font-family: 'Museo Sans Black';
    src: url('/fonts/museo/museosanscyrl-900.woff2') format('woff2'),
         url('/fonts/museo/museosanscyrl-900.woff') format('woff'),
         url('/fonts/museo/museosanscyrl-900.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
 	font-display: swap;
}

/* Заголовки h2 */
h2 {
    font-family: "Museo Sans Black", sans-serif;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 3px solid orange;
    padding-bottom: 5px;
    margin-top: 5px; /* Добавьте эту строку */
}

/* Общий контейнер для скролла */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
}

/* Универсальные стили для ячеек обычных таблиц */
table:not(:has(td:first-child img)):not(:has(td:first-child .img-bg-replacement)) th,
table:not(:has(td:first-child img)):not(:has(td:first-child .img-bg-replacement)) td {
    padding: 10px 13px;
    text-align: left;
    word-wrap: break-word;
    color: #333;
    border: none !important;
    font-family: 'Museo Sans Cyrl', sans-serif;
    font-weight: normal;
}

th {
    background-color: #f7f7f7;
    font-weight: bold;
}

/* Таблицы, где в строке 2 изображения */
table:has(tr:first-child td img):has(tr:first-child td:nth-child(2) img):not(:has(tr td:nth-child(3))),
table:has(tr:first-child td .img-bg-replacement):has(tr:first-child td:nth-child(2) .img-bg-replacement):not(:has(tr td:nth-child(3))) {
    width: 100% !important;
    table-layout: fixed;
}

table:has(tr:first-child td img):has(tr:first-child td:nth-child(2) img):not(:has(tr td:nth-child(3))) td,
table:has(tr:first-child td .img-bg-replacement):has(tr:first-child td:nth-child(2) .img-bg-replacement):not(:has(tr td:nth-child(3))) td {
    width: 50% !important;
    text-align: center;
    vertical-align: middle;
    padding: 0;
}

table:has(tr:first-child td img):has(tr:first-child td:nth-child(2) img):not(:has(tr td:nth-child(3))) td img,
table:has(tr:first-child td .img-bg-replacement):has(tr:first-child td:nth-child(2) .img-bg-replacement):not(:has(tr td:nth-child(3))) td .img-bg-replacement {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Стили для таблиц с изображением в первом столбце и не более 3 столбцов */
table:has(td:first-child img):not(:has(tr td:nth-child(4))),
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) {
    display: block;
    width: 100%;
    margin-bottom: 30px;
    border-collapse: collapse;
    border: none !important;
}

table:has(td:first-child img):not(:has(tr td:nth-child(4))) td,
table:has(td:first-child img):not(:has(tr td:nth-child(4))) th,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) td,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) th {
    border: none !important;
    padding: 0;
}

table:has(td:first-child img):not(:has(tr td:nth-child(4))) tbody,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 20px;
}

@media screen and (max-width: 1024px) {
    table:has(td:first-child img):not(:has(tr td:nth-child(4))) tbody,
    table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) tbody {
        grid-template-columns: 1fr;
    }
}

table:has(td:first-child img):not(:has(tr td:nth-child(4))) tr,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) tr {
    display: flex;
    flex-direction: row;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none !important;
}

table:has(td:first-child img):not(:has(tr td:nth-child(4))) tr:nth-child(even),
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) tr:nth-child(even) {
    background-color: #f7f7f7;
}

table:has(td:first-child img):not(:has(tr td:nth-child(4))) tr:hover,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) tr:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Первый столбец с изображением */
table:has(td:first-child img):not(:has(tr td:nth-child(4))) td:first-child,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) td:first-child,
table.has-image-first-col td:first-child {
    flex: 0 0 135px;
    padding: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    width: 120px;
}

/* Изображения */
table:has(td:first-child img):not(:has(tr td:nth-child(4))) td:first-child img,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) td:first-child .img-bg-replacement,
table.has-image-first-col td:first-child img,
table.has-image-first-col td:first-child .img-bg-replacement {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Контент после изображения */
table:has(td:first-child img):not(:has(tr td:nth-child(4))) td:not(:first-child),
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) td:not(:first-child) {
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    width: 100%;
    font-family: 'Museo Sans Cyrl', sans-serif;
    font-weight: normal;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Заголовок описания */
table:has(td:first-child img):not(:has(tr td:nth-child(4))) td:not(:first-child) b,
table:has(td:first-child .img-bg-replacement):not(:has(tr td:nth-child(4))) td:not(:first-child) b {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 15px;
}

/* Убираем полосатость у таблиц с изображениями */
table.has-image-first-col tr {
    background-color: transparent !important;
}
table {
  font-family: "Museo Sans Cyrl", sans-serif;
}

ul.tabs li,
.box .journal-filter ul li,
#journal-filter-0,
.box-heading,
#adminset_show,
#content > h1,
.h2,
.mainproduct,
#relproduct,
#hitproduct,
.pagination a.selected:hover,
.pagination a.selected {
  background-color: #4a4f86;
}
.pagination a.selected:hover,
.pagination a.selected {
  border-color: #4a4f86;
}
#powered a:hover,
.box-product a,
.product_title a,
.product_title,
.comment_list h3 a,
#column-left a.post_title,
.titlecomp,
.cutmore,
#blogline .post_title {
  color: #d4711b;
}
.addcompare svg,
.towish svg {
  fill: #3838af;
}
.gocompare svg:hover,
.inwish svg:hover,
.addcompare svg:hover,
.towish svg:hover {
  fill: #da741b;
}
.gocompare svg,
.inwish svg {
  fill: #d4711b;
}
.qwbox span a:hover {
  background-color: #d4711b;
}
.connect div,
.connect .contact-methods a,
.breadcrumb,
#footer h3,
#footer .column a,
.custom-text {
  color: #f4f4f4;
}
#footer .column svg {
  fill: #f4f4f4;
}
#adminset_show span,
#super-menu > ul > li > a,
#column-right .box .box-heading,
#column-left .box .box-heading,
.connect .contact-profiles a {
  color: #ffffff;
}
.connect .contact-profiles div,
.breadcrumb,
.footerbody,
#footer,
.connect div span {
  background-color: #282b54;
}
.side-shade,
.side-shade2,
#column-left,
#column-right {
  background-color: #f4f4f4;
}
#column-right .box-content > ul > li > a:hover,
#column-right .box-category > ul > li > a:hover,
#column-left .box-content > ul > li > a:hover,
#column-left .box-category > ul > li > a:hover {
  background-color: #ffffff;
}
#column-right .box-content ul li,
#column-left .box-content ul li {
  color: #333745;
}
#container {
  background-color: #ffffff;
}
.buttonred {
  background-color: #44427d;
  border: 0px solid #44427d;
}
.buttonred:hover {
  background-color: #da741b;
  color:#ffffff;
}
.connect {
  background: #d26f1d;
}
#footer h3 {
  border-bottom: 1px solid #d26f1d;
}
.tiny_products .product {
  background: #f7f7f7;
  border: 2px solid #f7f7f7;
}
.tiny_products .product:hover {
  background: #ffc369;
  border: 2px solid #ffc369;
}
#powered {
  background-color: #f4f4f4;
}
#powered p {
  color: #333745;
}
body {
  color: #333333;
  background-color: #e6e4e4;
}
#carttitles td,
.cart-blue {
  background: #17266b !important;
}
header {
  background-color: #f4f4f4;
}
.menu,
.menu .dropdown-menu li:hover > a {
  background-color: #6066ab;
}
#super-menu > ul > li {
  border-left: 1px solid #150a4e;
}
#column-right .box-category > ul > li ul > li > a:hover,
#column-left .box-category > ul > li ul > li > a:hover,
.box .journal-filter ul li a:hover,
.box-product a:hover,
.product_title a:hover,
.product_title:hover,
.box-content ul li a.filter-active,
.box-category a span:hover,
.box-category > ul > li ul > li > a:hover,
#powered a,
a:hover,
.compare:hover,
.cutmore:hover,
.comment_list h3 a:hover,
#column-left a.post_title:hover {
  color: #3838af;
}
.breadcrumb a:hover,
#footer .column a:hover {
  color: #9c9db7;
}
.connect .contact-methods a:hover {
  color: #00eeff;
}
.connect .contact-profiles div:hover {
  background-color: #00eeff;
}
header .top-hdr {
  background-color: #3d4065;
}
.block-header__divider {background-color:transparent;}
.block-header__arrow {fill:#999;background-color:#ffffff;}
.block-header__arrow:hover {fill:#3d464d;background-color:#dadada;}

.cart-page h2 {
  color: white;
}
