.main-content { background-color: #fff; }
.shipping-method .panel-body, .shipping-method .panel.panel-default { display: block; }
#revcheckout .ship_metod .panel-default>.panel-heading { display: block; }
#revcheckout .ship_metod .panel { margin-top: 0; }
.vertical-sreview .caption, .vertical-sreview .caption .description { background-color: #fff; }
#blog_mod .blog-list .opisb h4 a { color: #333; font-weight: bold; }
#blog_mod .blog-list .opisb h4 a:hover { color: #E3632D; }
/* Поиск под логотипом (in_top = Нет) */
#top2 .logoblock { display: flex; flex-direction: column; justify-content: center; }
#top2 .search-underlogo { padding-top: 6px; position: relative; z-index: 500; }
#top2 .search-underlogo .input-group { margin-bottom: 0; }
/* Выпадающее окно поиска — снять обрезание overflow:hidden от slideshow */
#top2 { overflow: visible !important; }
/* Личный кабинет и корзина — прижать вправо когда поиска нет в #top (in_top=Нет) */
#top.in-top-search .top-links.pull-right { margin-left: auto !important; }
/* Кнопки #top pull-right: flex вместо inline-block, чтобы <sup> не сдвигал baseline */
#top .top-links.pull-right ul.list-inline { display: flex !important; align-items: center; }
/* Выпадающий список поиска — ширина 2x */
#top2 .search-underlogo ul.dropdown-menu { width: 200%; min-width: 200%; }
/* Без слайдшоу: растянуть bigsearch до правого края, центровать вертикально */
@media (min-width: 992px) {
  #top2 .row:has(.bigsearch) { display: flex; align-items: center; }
  #top2 .bigsearch { flex: 1; width: auto !important; }
  /* Поле поиска: высота и закругление как у кнопки "в корзину" */
  #top2 .bigsearch .search .input-lg {
    height: 42px !important;
    line-height: 42px !important;
    border-radius: 6px 0 0 6px !important;
  }
  #top2 .bigsearch .search .search-button.btn-lg {
    height: 42px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-radius: 0 6px 6px 0 !important;
  }
  /* Если поиск с выбором категории — закругление крайнего левого элемента */
  #top2 .bigsearch .search .change_category_button {
    height: 42px !important;
    border-radius: 6px 0 0 6px !important;
  }
}
/* Google Translate — высота 36px как у остальных элементов #top, ширина -25% */
#top #top-links { display: inline-block; vertical-align: middle; }
#google_translate_element { display: inline-block; vertical-align: middle; }
#google_translate_element .goog-te-gadget-simple {
  height: 36px !important;
  line-height: 36px !important;
  border: none !important;
  background: transparent !important;
  font-size: 14px !important;
  padding: 0 4px !important;
  vertical-align: middle !important;
}
#google_translate_element .goog-te-gadget-simple img {
  display: none !important;
}
#google_translate_element .goog-te-gadget-simple a,
#google_translate_element .goog-te-gadget-simple span {
  vertical-align: middle !important;
  color: #333 !important;
  font-size: 14px !important;
}
/* Google Translate — уже на ~14% на мобильных */
@media (max-width: 767px) {
  #google_translate_element .goog-te-gadget-simple {
    font-size: 12px !important;
    padding: 0 2px !important;
  }
  #google_translate_element .goog-te-gadget-simple a,
  #google_translate_element .goog-te-gadget-simple span {
    font-size: 12px !important;
  }
}
/* Перебить синий autofill-фон Chrome в попап-регистрации */
#popup-order-okno .payment-info > div input:-webkit-autofill,
#popup-order-okno .payment-info > div input:-webkit-autofill:hover,
#popup-order-okno .payment-info > div input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fcfcfc inset !important;
  box-shadow: 0 0 0 1000px #fcfcfc inset !important;
  -webkit-text-fill-color: inherit !important;
}
/* Селекты страны/региона — такая же ширина как инпуты */
#popup-order-okno .payment-info > div select {
  width: 75%;
  border: 1px solid #eee;
  padding: 5px 10px;
  background: #fcfcfc;
  border-radius: 2px;
  outline: none;
  font-size: 14px;
}
/* Чекбокс согласия в попап-регистрации — на всю ширину строки */
#popup-order-okno .payment-info > div.agree-row label {
  width: 100% !important;
  float: none !important;
  text-align: left !important;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
#popup-order-okno .payment-info > div.agree-row label input[type="checkbox"] {
  width: auto !important;
  flex: 0 0 auto;
  margin-top: 3px;
}
/* 768-991px: логотип 25% + слайдшоу справа (flex), скрыть левый столбец */
@media (min-width: 768px) and (max-width: 991px) {
  #top2 .row { display: flex !important; align-items: stretch; }
  #top2 .logoblock { flex: 0 0 25% !important; max-width: 25% !important; }
  #column-left { display: none !important; }
  #content { width: 100% !important; }
}

/* < 760px: лого влево, корзина и поиск как на широком экране */
@media (max-width: 767px) {
  .aboutstore2 { display: none !important; }
  #top .mobile_info { display: none !important; }
  /* Flex-строка для #top2: лого автоширина влево, поиск на следующей строке */
  #top2 .row { display: flex !important; flex-wrap: wrap !important; align-items: center !important; }
  #top2 .logoblock { flex: 0 0 auto !important; width: auto !important; max-width: 100% !important; }
  /* Поиск: показать, растянуть на оставшееся место справа от лого */
  #top2 .bigsearch { display: block !important; flex: 1 1 auto !important; width: auto !important; max-width: none !important; min-width: 0 !important; order: 0 !important; padding: 0 0 0 10px !important; }
  /* Корзина: показать в #top на своём месте (flex-строка #top уже есть) */
  #top .cart-in-top { display: block !important; }

  /* Кнопка-гамбургер для pull-left ссылок */
  #top .mob-toplnks-toggle {
    display: flex !important;
    align-items: center;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    padding: 0 10px 0 0;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
  }

  /* Pull-left: скрыт по умолчанию, раскрывается как dropdown */
  #top .top-links.pull-left {
    display: block !important;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-top: 1px solid #eee;
    z-index: 1001;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
    padding: 0;
    float: none !important;
  }
  #top .top-links.pull-left.mob-toplnks-open {
    max-height: 400px;
    padding: 6px 0;
  }

  /* Ссылки внутри dropdown — вертикально */
  #top .top-links.pull-left > a {
    display: block !important; float: none !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #f5f5f5;
    color: #333 !important;
  }
  #top .top-links.pull-left > a:last-of-type { border-bottom: none; }
  #top .top-links.pull-left .ul_dop_menu { margin: 0 !important; padding: 0 !important; }
  #top .top-links.pull-left .ul_dop_menu > li { display: block !important; float: none !important; }
  #top .top-links.pull-left .ul_dop_menu > li > a {
    display: block !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #f5f5f5;
    color: #333 !important;
  }
  /* Подменю — раскрывается статично */
  #top .top-links.pull-left .dropdown-menu {
    position: static !important; float: none !important;
    box-shadow: none !important; border: none !important;
    background: #f9f9f9 !important;
    display: none; padding: 0 !important;
  }
  #top .top-links.pull-left .dropdown.open .dropdown-menu { display: block !important; }
  #top .top-links.pull-left .dropdown-menu > li > a {
    padding: 8px 28px !important; color: #555 !important;
  }
}

/* === Task 1: Стикеры видны на hover (stylesheet.css скрывает их через opacity:0) === */
.product-thumb:hover .stiker_panel {
  opacity: 1 !important;
  z-index: 4 !important;
}

/* === Task 3: Новый шаблон цены / кнопки / таймера === */

/* product_buttons: flex-колонка */
.product-grid .product-thumb .product_buttons,
.product-layout.product-list .product-thumb .product_buttons,
.product-layout.item .product-thumb .product_buttons {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  float: none !important;
  clear: both;
}

/* Блок цены: серый фон, flex-строка */
.product-grid .product-thumb .product_buttons .price,
.product-layout.product-list .product-thumb .product_buttons .price,
.product-layout.item .product-thumb .product_buttons .price {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: 8px;
  background: #f5f5f5 !important;
  border-radius: 4px 4px 0 0;
  padding: 6px 10px !important;
  margin: 0 !important;
  float: none !important;
}

/* Две цены: обе прижаты вправо, между ними gap */
.product-grid .product-thumb .product_buttons .price:has(.price-old),
.product-layout.product-list .product-thumb .product_buttons .price:has(.price-old),
.product-layout.item .product-thumb .product_buttons .price:has(.price-old) {
  justify-content: flex-end;
}

/* Старая цена — в строку (inline style display:block → override) */
.product-grid .product-thumb .product_buttons .price .price-old,
.product-layout.product-list .product-thumb .product_buttons .price .price-old,
.product-layout.item .product-thumb .product_buttons .price .price-old {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 14px !important;
  color: #555 !important;
  text-decoration: line-through !important;
  font-weight: normal !important;
  background: none !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* Акционная цена — правый край */
.product-grid .product-thumb .product_buttons .price .price-new,
.product-layout.product-list .product-thumb .product_buttons .price .price-new,
.product-layout.item .product-thumb .product_buttons .price .price-new {
  display: inline-flex !important;
  align-items: center !important;
}

/* Скрыть price-tax */
.product-grid .product-thumb .product_buttons .price .price-tax,
.product-layout.product-list .product-thumb .product_buttons .price .price-tax,
.product-layout.item .product-thumb .product_buttons .price .price-tax {
  display: none !important;
}

/* Обёртка кнопки корзины — убрать float, растянуть на всю ширину */
.product-grid .product-thumb .product_buttons .cart,
.product-grid .product-thumb .product_buttons .predzakaz_cart,
.product-layout.product-list .product-thumb .product_buttons .cart,
.product-layout.product-list .product-thumb .product_buttons .predzakaz_cart,
.product-layout.item .product-thumb .product_buttons .cart,
.product-layout.item .product-thumb .product_buttons .predzakaz_cart {
  float: none !important;
  width: 100% !important;
}
.product-grid .product-thumb .product_buttons .cart a,
.product-grid .product-thumb .product_buttons .predzakaz_cart a,
.product-layout.product-list .product-thumb .product_buttons .cart a,
.product-layout.product-list .product-thumb .product_buttons .predzakaz_cart a,
.product-layout.item .product-thumb .product_buttons .cart a,
.product-layout.item .product-thumb .product_buttons .predzakaz_cart a {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}
/* Иконка-кнопка: растянуть на всю ширину, стиль не трогаем */
.product-grid .product-thumb .product_buttons .cart i.fa-border,
.product-grid .product-thumb .product_buttons .predzakaz_cart i.fa-border,
.product-layout.product-list .product-thumb .product_buttons .cart i.fa-border,
.product-layout.product-list .product-thumb .product_buttons .predzakaz_cart i.fa-border,
.product-layout.item .product-thumb .product_buttons .cart i.fa-border,
.product-layout.item .product-thumb .product_buttons .predzakaz_cart i.fa-border {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

/* === Task 4: Таймер — только на hover === */

/* По умолчанию таймер скрыт */
.product-grid .product-thumb .time_special,
.product-layout.product-list .product-thumb .time_special,
.product-layout.item .product-thumb .time_special {
  display: none !important;
  padding-top: 4px;
}
.product-grid .product-thumb .time_special_placeholder,
.product-layout.product-list .product-thumb .time_special_placeholder,
.product-layout.item .product-thumb .time_special_placeholder {
  display: none !important;
}

/* На hover — сбросить JS-фиксацию высоты и показать таймер */
@media (min-width: 992px) {
  .product-grid .product-thumb:hover .product_buttons,
  .product-layout.item .product-thumb:hover .product_buttons {
    height: auto !important;
  }
  .product-grid .product-thumb:hover .price,
  .product-layout.item .product-thumb:hover .price {
    height: auto !important;
  }
  /* Таймер: flex по центру, поверх нижней части фото — категории, поиск, производитель */
  .product-grid .product-thumb .caption,
  .product-layout.item .product-thumb .caption {
    position: relative;
  }
  .product-grid .product-thumb:hover .time_special,
  .product-layout.item .product-thumb:hover .time_special {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 4px !important;
    position: absolute !important;
    bottom: 100%;
    left: 0;
    right: 0;
    z-index: 6;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 0;
    overflow: visible !important;
  }
}

/* === Таймер — стиль боксов (Image #9): категории, поиск, производитель, модули === */
.product-grid .product-thumb .time_special .box-time-date,
.product-layout.item .product-thumb .time_special .box-time-date {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  min-height: 40px !important;
  margin: 0 !important;
  border-radius: 7px !important;
  border: 1.5px solid #bbb !important;
  background: #f0f0f0 !important;
  font-size: 7px !important;
  color: #555 !important;
  font-weight: 600 !important;
  padding: 3px 2px !important;
  line-height: 1.3 !important;
}
.product-grid .product-thumb .time_special .box-time-date span,
.product-layout.item .product-thumb .time_special .box-time-date span {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #222 !important;
  margin: 0 !important;
  line-height: 1.1 !important;
}

/* === Таймер на странице товара === */
div[itemprop="offers"] .time_special {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  overflow: visible !important;
  padding: 8px 0 4px !important;
  clear: both;
  width: 100%;
}
div[itemprop="offers"] .time_special .box-time-date {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  min-height: 40px !important;
  margin: 0 !important;
  border-radius: 7px !important;
  border: 1.5px solid #bbb !important;
  background: #f0f0f0 !important;
  font-size: 7px !important;
  color: #555 !important;
  font-weight: 600 !important;
  padding: 3px 2px !important;
  line-height: 1.3 !important;
}
div[itemprop="offers"] .time_special .box-time-date span {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #222 !important;
  margin: 0 !important;
  line-height: 1.1 !important;
}
div[itemprop="offers"] .time_special .box-time-date.timer-urgent {
  border-color: #B91C1C !important;
  color: #B91C1C !important;
}
div[itemprop="offers"] .time_special .box-time-date.timer-urgent span {
  color: #B91C1C !important;
}

/* === Task 5: Красный таймер когда < 24ч === */
.product-grid .product-thumb .time_special .box-time-date.timer-urgent,
.product-layout.item .product-thumb .time_special .box-time-date.timer-urgent {
  border-color: #B91C1C !important;
  color: #B91C1C !important;
}
.product-grid .product-thumb .time_special .box-time-date.timer-urgent span,
.product-layout.item .product-thumb .time_special .box-time-date.timer-urgent span {
  color: #B91C1C !important;
}

/* Статус наличия для товаров с ценой 0 */
.product_buttons .price-zero-stock {
  clear: both;
  display: block;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  color: #B91C1C;
  text-align: right;
  margin: 0;
  white-space: nowrap;
}

/* Вкладки товара (.mb20 — обёртка) — stylesheet_change.css скрывает через display:none когда pr_tabs=0, но setting уже включён */
.mb20 { display: block !important; }

/* Font Awesome icon code overrides — moved here from admin user-styles to prevent addslashes corruption */
.fa-heart:before { content: "\f08a"; }
.fa-user:before { content: "\f2c0"; }
.fa-legal:before, .fa-gavel:before { content: "\f1d9"; }

/* 1 товар в строке на экранах до 400px */
@media (max-width: 400px) {
    .product-layout.product-grid {
        width: 100% !important;
    }
}

/* Ссылки в карточке товара */
.dotted-line_right a,
#tab-description a { color: #C56A2D; text-decoration: underline; }
.dotted-line_right a:hover,
#tab-description a:hover { color: #B91C1C; text-decoration: underline; }

/* Слайдшоу: ссылка охватывает изображение целиком */
#revslideshow .item a:has(> img.img-responsive),
#revslideshow .carousel-item a:has(> img.img-responsive) {
    display: block;
    line-height: 0;
}
