/* ======= Общие стили для таблиц ======= */
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 Cyrl';
    src: url('/fonts/museo/museosanscyrl-regular.woff2') format('woff2'),
         url('/fonts/museo/museosanscyrl-regular.woff') format('woff'),
         url('/fonts/museo/museosanscyrl-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@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;
}

/* Заголовки h2 */
h2 {
    font-family: "Museo Sans Black", sans-serif;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 3px solid red;
    padding-bottom: 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,
#adminset_show,
.h2,
.box-heading,
#relproduct,
.pagination a.selected:hover,
.pagination a.selected {
background-color: #5d5c5c;
}
.mainproduct, #hitproduct, #relproduct,.mainproduct.blue, .attention.blue{background-color: #5d5c5c;}
.pagination a.selected:hover,
.pagination a.selected {
border-color: #eb5858;
}
a,
.breadcrumb,
.product_title,
.titlecomp,
.cutmore,
#blogline .post_title,
.connect .contact-methods a {
color: #626161;
}
.addcompare svg,
.towish svg {
fill: #ea2e49;
}
.gocompare svg:hover,
.inwish svg:hover,
.addcompare svg:hover,
.towish svg:hover {
fill: #505050;
}
.gocompare svg,
.inwish svg {
fill: #717171;
}
.qwbox span a:hover {
background-color: #a19b9b;
}
#footer .column svg {
fill: #717171;
}
.box-heading,
#adminset_show span,
#super-menu > ul > li > a,
.connect .contact-profiles a {
color: #ffffff;
}
.footerbody,#footer {
background-color: #f2f2f2;
}
.connect .contact-profiles div, .connect div span {
background-color: #5d5c5c;
}
.breadcrumb,
.side-shade,
.side-shade2,
#column-left,
#column-right {
background-color: #ffffff;
}
#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;
overflow:hidden;
}
.buttonred {
background-color: #eb5858;
border: 0px solid #eb5858;
}
.buttonred:hover {
background-color: #505050;
color:#ffffff;
}
.connect {
background: #ffffff;
border: 1px solid #d4d4d4;
}
.tiny_products .product {
box-shadow: 0 15px 10px -14px #9d9cab;
}
.tiny_products.owl-carousel .product {border: 2px solid transparent;box-shadow:none;background:#ffffff;}
.tiny_products .product:hover {border: 1px solid #d5d5d5;}
.tiny_products.owl-carousel .product:hover {
background:#ffffff;
border: 2px dashed #aaacac;
box-shadow: none;
}
.browsedview .product, .parentscat .product, .wishlistview .product {
background: #e4e4e4;
padding: 0px 0 6px 0px;
}
.browsedview .product:hover, .parentscat .product:hover, .wishlistview .product:hover {
background: #e3e3f3;
}
#container #blogline{border: 0px solid #dadada;box-shadow:none;background-color:transparent;padding: 8px 0px 0px 0px;}
#container .main-text{border: 0px solid #dadada;box-shadow:none;padding:5px 5px 0 5px;}
#powered p {
color: #333745;
}
body {
color: #333333;
background-color: #ffffff;
}
#carttitles td,
.cart-blue {
background: #5f6874 !important;
}
.tiny_products .product .image,header {
background-color: #ffffff;
}
.menu,
.menu .dropdown-menu li:hover > a {
background-color: #f4f4f4;
}
#super-menu > ul > li {
border-left: 1px solid #333745;
}
.product_title:hover,
.box-content ul li a.filter-active,
.box-category a span:hover,
a:hover,
.compare:hover,
.cutmore:hover,
.connect div {
color: #ea2e49;
}
#content > h1, #footer .foot_title {color:#333333;}
.connect .contact-profiles div:hover {
background-color: #ea2e49;
}
header .top-hdr {
background-color: #3b3a3a;
}
.block-header__divider {background-color:transparent;}
.block-header__arrow {fill:#999;background-color:#ffffff;}
.block-header__arrow:hover {fill:#3d464d;background-color:#dadada;}
/* additional */
#column-left + #content {padding: 20px 10px 15px 30px;}
#footer .column a{font-weight:700;}
#powered div {border-top:1px solid #dcdbdb;}
#footer h3{border-bottom:none;padding-bottom:0;}
#footer .column ul{margin-top:3px}
#container {-webkit-box-shadow:none;box-shadow:none;}
.side-shade, .side-shade2, #column-left{outline:none;}
.box-heading {padding: 6px 0 6px 10px;border-radius:5px;height:auto;line-height:normal;}
#content > h1 {font-size:22px;margin: -23px -10px 5px -15px;}
.product-filter {box-shadow:none;border:1px solid #d5d5d5;}
.box-content {margin: 5px 0;}
.mainproduct .bloglink {color:#add8f0;}
.mainview .blogline{background-color:#f7f7f7;border:1px solid #d2d2d2;border-top:0;}
.bloglink:hover{color:#d2cece;}
.blogposts .blogitem_wrapper:nth-child(odd), .blogposts:nth-child(odd) .blogitem_wrapper {background-color: #f5f5f5;}
ul.super-menu > li > a, .cart, .dropdown-menu li:hover a{color:#333333;}
.dropdown-menu li:hover > a svg{fill:#333333;}
.topinfowrapper svg, .cart svg{fill:#717171;}
.topinfowrapper svg:hover {fill:#a5a1a1;}
.menu-icon span{background-color:#717171;}
.menu {
-webkit-box-shadow: 0 0px 2px rgba(62, 61, 61, 0.50);
box-shadow: 0 0px 2px rgba(62, 61, 61, 0.50);
}
.searchchoose,#search .button_search,#search .input_search,.listsearch{border: 1px solid #d3cece;}
#search .button_search{background-color:#ffffff;border-right:0;}
.searchchoose{background-color:#e9e9e9;line-height:40px;border-left:0;}
.listsearch li {padding-left:6px;}
.wishlistview .product {margin-right:10px;}
#last_products li > .image{border:0;}
.mainview .category_item{border: 1px solid #f2f2f2;}
#welcome svg{fill:#f4f4f4;}
#welcome svg:hover{fill:#d0d1ce;}