/* ===== custom_modern.css — современное освежение темы Sun System Center =====
   Подключается ПОСЛЕ stylesheet.css в header.twig, ничего в оригинале не меняет.
   Палитра взята из реального логотипа: синий #00395E -> #2475EA, акцент #E69222 -> #F6DF3B */

/* Базовый шрифт — было 12px (нечитаемо мелко), стало комфортное 15px */
body {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}
h1, h2, h3, h4, h5, h6 {
  color: #17212b;
}

/* Верхняя плашка — светлее и чище */
#top {
background: linear-gradient(90deg, #00395E 0%, #145e8c 100%);
border-bottom: 3px solid #F6DF3B;
padding: 12px 0;
font-weight: 300;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#top a, #top .btn-link, #top .list-inline-item {
color: #ffffff;
}
#top a:hover, #top .btn-link:hover {
color: #ffffff;
text-decoration: underline;
}
#top .dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
#top .dropdown-menu a, #top .dropdown-item {
  color: #17212b !important;
}
#top .dropdown-menu a:hover, #top .dropdown-item:hover {
  background-color: #f0f4f8;
  color: #00395E !important;
}
#top i.fa-solid {
color: #ffffff;
}

/* Логотип на мобильном не должен "распирать" шапку */
#logo img {
  max-width: 100%;
}

/* ===== Главное меню — плоский современный стиль вместо градиента 2013 года ===== */
#menu, #menu.navbar {
  background: #00395E !important;
  background-image: none !important;
  border: none !important;
  border-radius: 10px;
}
#menu .navbar-nav > li > a {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
}
#menu .navbar-nav > li > a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}
#menu .dropdown-inner a:hover,
#menu .see-all:hover,
#menu .see-all:focus {
  background: #2475EA !important;
  background-image: none !important;
  color: #fff !important;
}

/* Кнопка мобильного меню — крупнее, с подписью, хорошо видна */
#menu .navbar-toggler {
  background: #2475EA !important;
  background-image: none !important;
  border: none !important;
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
@media (max-width: 991.98px) {
  #menu .navbar-toggler {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
}
#menu .navbar-toggler i {
  font-size: 1.2em;
  color: #fff;
}
#menu .navbar-toggler .menu-label {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== Кнопки — плоский стиль, без старых градиентов и теней ===== */
.btn-primary {
  background: #2475EA !important;
  background-image: none !important;
  border-color: #2475EA !important;
  text-shadow: none;
  border-radius: 6px;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: #1a5fc4 !important;
  border-color: #1a5fc4 !important;
}
.btn-warning {
  background: #F6DF3B !important;
  background-image: none !important;
  border-color: #F6DF3B !important;
  color: #3a2f00 !important;
  text-shadow: none;
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
  background: #eccd1a !important;
  border-color: #eccd1a !important;
}

/* ===== Карточки товаров — скруглённые, лёгкая тень вместо плоской рамки ===== */
.product-thumb {
  border: 1px solid #eef1f4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 30, 60, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-thumb:hover {
  box-shadow: 0 8px 20px rgba(15, 30, 60, 0.12);
  transform: translateY(-2px);
}
.product-thumb .button-group {
  background-color: #fafbfc;
}

/* ===== Футер — тёмно-синий в тон бренду вместо серого ===== */
footer {
  background-color: #0c2438;
  border-top: none;
}
footer h5 {
  color: #fff;
}
footer a {
  color: #b9c8d6;
}
footer a:hover {
  color: #fff;
}

/* Цена — акцентный синий вместо тускло-серого */
.price-new {
  color: #2475EA;
}

/* ===== Мобильная адаптация ===== */
@media (max-width: 767px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 24px;
  }
  #menu .navbar-toggler {
    width: 100%;
    justify-content: center;
  }
  .product-thumb {
    margin-bottom: 12px;
  }
}

/* Store name, search and cart in header - modern look */
#logo h1 {
  margin: 0;
}
#logo h1 a {
  color: #00395E;
  font-weight: 800;
  letter-spacing: -0.5px;
}
#search .form-control-lg {
  border: 2px solid #e3e8ee;
  border-radius: 8px 0 0 8px;
  height: 48px;
  font-size: 14px;
}
#search .form-control-lg:focus {
  border-color: #2475EA;
  box-shadow: none;
}
#search .btn-lg {
  border-radius: 0 8px 8px 0;
  background: #2475EA !important;
  background-image: none !important;
  border-color: #2475EA !important;
}
#search .btn-lg:hover {
  background: #1a5fc4 !important;
}
#header-cart .btn {
  background: #2475EA !important;
  background-image: none !important;
  border-radius: 8px;
  border: none !important;
  font-weight: 700;
  padding: 12px 20px;
}
#header-cart .btn:hover {
  background: #1a5fc4 !important;
}

/* === fixbrandcolors: глобальные брендовые цвета вместо bootstrap-синего === */
:root {
  --bs-primary: #00395E;
  --bs-primary-rgb: 0, 57, 94;
  --bs-link-color: #00395E;
  --bs-link-color-rgb: 0, 57, 94;
  --bs-link-hover-color: #2475EA;
  --bs-link-hover-color-rgb: 36, 117, 234;
}
a {
  color: #00395E;
}
a:hover {
  color: #2475EA;
}
.nav-tabs .nav-link {
  color: #00395E;
}
.nav-tabs .nav-link:hover {
  color: #2475EA;
}
.nav-tabs .nav-link.active {
  color: #17212b;
  font-weight: 600;
}
.list-group-item.active,
.list-group-item-action.active,
#column-left .list-group-item.active {
  background-color: #00395E !important;
  border-color: #00395E !important;
  color: #fff !important;
}
.breadcrumb-item a {
  color: #00395E;
}
.breadcrumb-item a:hover {
  color: #2475EA;
}
.breadcrumb-item.active {
  color: #6b7a89;
}

/* === fixbrandutilities: bootstrap-утилиты primary/*, зашитые hex-цветом === */
.bg-primary {
  background-color: #2475EA !important;
}
.text-primary {
  color: #00395E !important;
}
.border-primary {
  border-color: #00395E !important;
}
.btn-outline-primary {
  color: #00395E !important;
  border-color: #00395E !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: #00395E !important;
  border-color: #00395E !important;
  color: #fff !important;
}

/* === fixpagination: брендовые цвета постраничной навигации === */
.pagination .page-link {
  color: #00395E;
}
.pagination .page-link:hover,
.pagination .page-link:focus {
  color: #2475EA;
  background-color: #f0f4f8;
}
.pagination .page-item.active .page-link {
  background-color: #00395E !important;
  border-color: #00395E !important;
  color: #fff !important;
}
.pagination .page-item.disabled .page-link {
  color: #a9b6c3;
}

/* === fixalertclose: возвращает кликабельность уведомлениям в #alert === */
#alert.toast-container .alert {
  pointer-events: auto;
}


/* === fixalertcolor: уведомление "добавлено в корзину" в брендовых цветах вместо стандартного зелёного Bootstrap === */
.alert-success {
	background-color: #00395E;
	border-color: #00395E;
	color: #ffffff;
	border-left: 4px solid #F6DF3B;
}
.alert-success .btn-close {
	filter: invert(1) grayscale(100%) brightness(2);
}
.alert-success a,
.alert-success .alert-link {
	color: #ffffff !important;
	text-decoration: underline;
}


/* === fixagreecheckbox: увеличенный и заметный чекбокс согласия с условиями на странице оформления заказа === */
#input-agree {
	width: 1.4em;
	height: 1.4em;
	margin-left: 10px;
	cursor: pointer;
	border: 2px solid #00395E;
	box-shadow: 0 0 0 3px rgba(36, 117, 234, 0.25);
	vertical-align: middle;
}
#input-agree:checked {
	background-color: #2475EA;
	border-color: #2475EA;
}
#input-agree:focus {
	border-color: #2475EA;
	box-shadow: 0 0 0 3px rgba(36, 117, 234, 0.4);
}


/* === ngc-longnames: длинные названия товаров переносятся и не растягивают страницу === */
.breadcrumb { flex-wrap: wrap; }
.breadcrumb > li.breadcrumb-item { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
#content, #product-info, .product-thumb, .product-thumb h4, .product-thumb .description { min-width: 0; }
h1, h2, h3, h4, .product-thumb h4 a, .product-thumb .description { overflow-wrap: anywhere; word-break: break-word; }


/* ngc-mobile */
img, video, iframe { max-width: 100%; height: auto; }
#header-cart .dropdown-menu, #cart .dropdown-menu { max-width: calc(100vw - 16px) !important; min-width: 0 !important; width: min(420px, calc(100vw - 16px)) !important; box-sizing: border-box; }
#header-cart .dropdown-menu table, #cart .dropdown-menu table { width: 100%; table-layout: auto; }
#header-cart .dropdown-menu td, #cart .dropdown-menu td { overflow-wrap: break-word; white-space: normal; }
#header-cart .dropdown-menu p.text-end, #cart .dropdown-menu p.text-end { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 767px) { #content .table-responsive > .table { min-width: 560px; } #content .table td, #content .table th { word-break: normal; overflow-wrap: normal; } }

/* ngc-cookie */
#cookie a, .cookie a, [id*="cookie"] a, [class*="cookie"] a { color: #ffd54f !important; font-weight: 600; text-decoration: underline; }
#cookie a:hover, .cookie a:hover, [id*="cookie"] a:hover, [class*="cookie"] a:hover { color: #fff !important; }


/* NGC mobile fixes 20261020 */
#alert.toast-container{max-width:min(92vw,380px);z-index:2000;pointer-events:none}
#alert .alert,#alert .toast{pointer-events:auto;font-size:.9rem;padding:.6rem .9rem;margin-bottom:.5rem;animation:ngcAlertHide .3s ease-in 2s forwards}
#alert .alert a{word-break:break-word}
@keyframes ngcAlertHide{to{opacity:0;visibility:hidden;transform:translateX(120%);pointer-events:none}}
@media (max-width:767px){
  #checkout-confirm{overflow-x:auto}
  #checkout-confirm .table{font-size:.85rem;table-layout:auto;width:100%}
  #checkout-confirm .table td,#checkout-confirm .table th{padding:.4rem .5rem;word-break:break-word;overflow-wrap:anywhere}
}

/* NGC mobile fixes 20261020 v2 */
#alert .alert{width:auto!important;max-width:100%!important;min-width:0!important}
#alert .alert:not(:first-child){display:none!important}
@media (max-width:767px){
  #alert.toast-container{left:auto;right:0;max-width:92vw}
  #checkout-confirm .table-responsive{overflow-x:visible}
  #checkout-confirm .table{table-layout:fixed!important;width:100%!important;min-width:0!important}
  #checkout-confirm .table td,#checkout-confirm .table th{white-space:normal!important}
}

/* NGC mobile cart 20261020 */
@media (max-width:767px){
  #shopping-cart .table-responsive{overflow-x:visible}
  #shopping-cart table{font-size:.85rem;width:100%}
  #shopping-cart thead td:nth-child(3),#shopping-cart tbody td:nth-child(3),
  #shopping-cart thead td:nth-child(5),#shopping-cart tbody td:nth-child(5){display:none}
  #shopping-cart tbody td:nth-child(1) img{max-width:48px;height:auto}
  #shopping-cart td{padding:.35rem;overflow-wrap:anywhere;word-break:break-word}
  #shopping-cart .input-group{flex-wrap:nowrap;max-width:118px}
  #shopping-cart .input-group input{width:42px;min-width:0;padding:.25rem}
  #shopping-cart .input-group .btn{padding:.25rem .45rem}
}

/* NGC home featured grid 20261021 */
#common-home #content > .row:has(.product-thumb){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0}
#common-home #content > .row:has(.product-thumb) > .col{width:auto;max-width:none;padding:0}
#common-home .product-thumb{height:100%;display:flex;flex-direction:column}
#common-home .product-thumb .image img{max-height:150px;width:auto;margin:0 auto;display:block;object-fit:contain}
#common-home .product-thumb .description > p{display:none}
#common-home .product-thumb .description h4{font-size:.95rem;line-height:1.3;margin:.5rem 0}
#common-home .product-thumb .description h4 a{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#common-home .product-thumb .content{display:flex;flex-direction:column;flex:1}
#common-home .product-thumb .button-group{margin-top:auto}
@media (max-width:991px){#common-home #content > .row:has(.product-thumb){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:767px){#common-home #content > .row:has(.product-thumb){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}

/* NGC 2026-10-23: одинаковая высота карточек товаров (главная, категории, поиск) */
.row > [class*="col"] > div:has(> .product-thumb){height:100%;}
.product-thumb{display:flex;flex-direction:column;height:100%;}
.product-thumb .image{flex:0 0 auto;}
.product-thumb .image img{width:100%;aspect-ratio:1/1;object-fit:contain;background:#fff;}
.product-thumb .content{flex:1 1 auto;display:flex;flex-direction:column;}
.product-thumb .description{flex:1 1 auto;display:flex;flex-direction:column;}
.product-thumb .description h4{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3em;min-height:3.9em;}
.product-thumb .description > p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.product-thumb .description .price{margin-top:auto;}
.product-thumb .button-group{margin-top:auto;}

/* NGC 2026-11-11: формы личного кабинета на узком экране - подпись над полем, без переноса звёздочки */
@media (max-width: 1399.98px) {
  [id^="account-"] .row.mb-3 > .col-sm-2.col-form-label { flex: 0 0 100%; max-width: 100%; width: 100%; text-align: left !important; padding-bottom: 4px; white-space: nowrap; }
  [id^="account-"] .row.mb-3 > .col-sm-10 { flex: 0 0 100%; max-width: 100%; width: 100%; }
}

/* NGC-COOKIE-MODAL-FIX 2026-11-13: баннер cookie не перекрывает текст в модальном окне (условия/политика) */
body.modal-open #cookie { display: none !important; }
.modal-dialog-scrollable .modal-body, .modal .modal-body { padding-bottom: 32px; }
@media (max-width: 767px) {
  #cookie { height: auto !important; max-height: 45vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
}


/* NGC-CARD-ALIGN: одинаковые карточки товаров во всех списках (20261114) */
.row > .col:has(> form > .product-thumb) { display: flex; }
.row > .col > form:has(> .product-thumb) { display: flex; width: 100%; }
.product-thumb { width: 100%; height: auto; align-self: stretch; display: flex; flex-direction: column; }
.product-thumb .image { aspect-ratio: 1 / 1; max-height: 280px; display: flex; align-items: center; justify-content: center; padding: 10px; box-sizing: border-box; flex: 0 0 auto; }
.product-thumb .image a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.product-thumb .image img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0 auto; }
.product-thumb .content { flex: 1 1 auto; display: flex; flex-direction: column; }
.product-thumb .description { flex: 1 1 auto; display: flex; flex-direction: column; }
.product-thumb .description h4 { line-height: 1.3; min-height: calc(3 * 1.3em); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-thumb .description > p { min-height: 72px; }
.product-thumb .description .price { margin-top: auto; }
.product-thumb .button-group { margin-top: auto; flex: 0 0 auto; }
