/* Стили, перенесенные и адаптированные из оригинального кода */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Nunito Sans", sans-serif;
    background: #f0f1f3;
}

.configurator-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Верхняя шапка --- */
.site-header {
    width: 100%;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}
.header-left, .header-right {
    display: flex;
    align-items: center;
}
.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.header-left .logo img { height: 24px; margin-right: 15px; }
.header-center .logo img { height: 32px; }
.header-left .main-navigation a { margin: 0 10px; text-decoration: none; color: #333; font-weight: 600; text-transform: uppercase; font-size: 14px; }
.header-right > * { margin-left: 20px; color: #333; text-decoration: none; font-weight: 600; display: flex; align-items: center; }
.header-right .icon img { height: 20px; }

/* --- Основная часть (3D-модель) --- */
.configurator-main {
    flex-grow: 1;
    padding-top: 60px; /* отступ под шапку */
    padding-bottom: 80px; /* отступ под нижнюю панель */
    position: relative;
}
#configurator-3d, #configurator-3d > div, #api-frame {
    width: 100% !important; height: 100% !important; max-width: none !important;
    padding: 0 !important; box-shadow: none !important; background: transparent !important;
}

/* --- Нижняя панель с иконками --- */
.configurator-footer {
    width: 100%;
    height: 80px;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}
.bottom-nav-icons { display: flex; gap: 20px; }
.bottom-nav-icons .icon-btn { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; }
.bottom-nav-icons .icon-btn:hover { opacity: 1; }
.bottom-nav-icons .icon-btn img { height: 40px; }

/* --- Сайдбар с опциями --- */
.options-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* Начинаем за пределами экрана */
    width: 380px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease-in-out;
    z-index: 1010;
    padding: 20px;
    padding-top: 60px; /* Оставляем место для кнопки закрытия */
    overflow-y: auto;
}

.options-sidebar.is-open {
    right: 0; /* Придвигаем на экран */
}

.options-sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #333;
}

.sidebar-panel {
    display: none; /* Все панели по умолчанию скрыты */
}

.sidebar-panel.is-active {
    display: block; /* Активная панель отображается */
}

.bottom-nav-icons .icon-btn.is-active {
    transform: scale(1.1);
    filter: brightness(1.1);
    border-bottom: 2px solid #007bff; /* Пример подсветки активной иконки */
}

.cart-input-row{
  display:flex;
  gap:12px;
}
.cart-input-row label{
  flex:1;
}

.colors__individual-colors .color-item,
.color-item{
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px;
}

.color-item .color-swatch{
    width: 36px;
    height: 36px;
    border-radius: 6px;
    box-shadow: 0 0 2px rgba(0,0,0,0.15);
}

#cart-clear-link{
  display:block;
  text-align:center;
  color:#666;
  text-decoration:underline;
}
#cart-clear-link:hover{color:#333;}

#install-option{display:inline-block!important;accent-color:#007bff;}

.cart-item{position:relative;padding-right:24px;}
.ci-remove{
  position:absolute;
  top:2px;right:2px;
  background:none;
  border:none;
  font-size:16px;
  color:#888;
  cursor:pointer;
  line-height:1;
}
.ci-remove:hover{color:#f33;}

#sidebar-overlay{
    position:fixed;
    inset:0;
    background:transparent;
    backdrop-filter:none;
    display:none;
    z-index:100;
    pointer-events:none;         /* overlay НЕ перехватывает клики */
}
#sidebar-overlay.active{display:block;}

/* === Glass nav v2 RESET + CodePen polish === */
#shop-glass-overlay{position:fixed;inset:0;display:flex;justify-content:flex-start;align-items:flex-start;padding:20px;background:rgba(20,20,20,.55);backdrop-filter:blur(8px);z-index:9999;}
#shop-glass-panel{width:90vw;height:90vh;max-width:none;margin-top:60px;border-radius:16px;padding:24px 20px 20px;overflow:hidden;display:flex;flex-direction:column;background:linear-gradient(180deg,rgba(0,186,255,.45) 0%,rgba(0,155,255,.35) 50%,rgba(0,120,255,.45) 100%);border:1px solid rgba(255,255,255,.30);box-shadow:0 8px 32px rgba(0,0,0,.35);backdrop-filter:blur(24px) saturate(200%);} 
.shop-cols{flex:1 1 auto;display:flex;gap:16px;height:100%;}
.shop-cols .col{flex:1 1 0;overflow-y:auto;border-right:1px solid rgba(255,255,255,.15);} 
.shop-cols .col:last-child{border-right:none;}
.shop-cols .col:first-child{flex:0 0 30%;}
.shop-brands{background:rgba(255,255,255,.10);border-radius:14px;padding:4px 4px 8px;box-shadow:inset 0 0 6px rgba(255,255,255,.12);} 
.brand-item,.model-item,.gen-item{padding:10px 14px;border-radius:12px;margin-bottom:12px;cursor:pointer;color:#fff;font-weight:600;background:none;border:none;box-shadow:none;display:flex;align-items:center;gap:14px;transition:all .25s ease;-webkit-backdrop-filter:blur(12px) saturate(180%);backdrop-filter:blur(12px) saturate(180%);}
.brand-item::before,.model-item::before,.gen-item::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(135deg,rgba(255,255,255,.35) 0%,rgba(255,255,255,.05) 100%);opacity:.0;transition:opacity .3s ease;}
.brand-item:hover::before,.model-item:hover::before,.gen-item:hover::before{opacity:.6;}
.brand-item:hover,.model-item:hover,.gen-item:hover{background:rgba(255,255,255,.18);box-shadow:0 2px 6px rgba(0,0,0,.25);transform:translateY(-2px) scale(1.01);}
.model-item img{width:80px;height:auto;border-radius:6px;}
.gen-item{flex-direction:column;padding:0;overflow:hidden;}
.gen-item img{width:100%;height:auto;display:block;border-radius:6px 6px 0 0;}
.gen-item{position:relative;}
.gen-item span{position:absolute;bottom:8px;left:8px;right:8px;background:rgba(0,0,0,.5);color:#fff;font-size:14px;font-weight:600;padding:4px 6px;border-radius:4px;text-shadow:0 1px 2px rgba(0,0,0,.6);}
.shop-cols .col::-webkit-scrollbar{width:6px;height:6px;}
.shop-cols .col::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:3px;}
@media(max-width:767px){#shop-glass-panel{width:100%;height:100%;border-radius:0;padding:14px;} .shop-cols{flex-direction:column;} .shop-cols .col{border-right:none;border-bottom:1px solid rgba(255,255,255,.15);} .shop-cols .col:last-child{border-bottom:none;} .model-item img{width:60px;} .gen-item img{border-radius:4px 4px 0 0;} .brand-item,.model-item,.gen-item{font-size:14px;padding:8px 12px;}}
.brand-item img.brand-logo{width:48px;height:48px;object-fit:contain;border-radius:50%;}
.brand-item span{flex:1;}
.brand-item.active{background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%);box-shadow:0 6px 18px rgba(0,0,0,.4);}

/* --- поисковый input --- */
.shop-search{width:100%;max-width:100%;padding:8px 12px;margin-bottom:14px;border-radius:10px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.12);color:#fff;font-size:15px;font-weight:600;outline:none;-webkit-backdrop-filter:blur(10px) saturate(160%);backdrop-filter:blur(10px) saturate(160%);box-shadow:inset 0 0 4px rgba(255,255,255,.25);box-sizing:border-box;}
.shop-search::placeholder{color:#e6e6e6;opacity:.75;}
.shop-search:focus{border-color:rgba(255,255,255,.7);box-shadow:0 0 0 1px rgba(255,255,255,.6),inset 0 0 6px rgba(255,255,255,.4);}

/* --- специальные элементы Новые / Популярные --- */
.special-item{gap:10px;}
.special-item .special-icon{width:20px;height:20px;object-fit:contain;flex:0 0 20px;}
.special-item span{flex:1;}
.special-item.active{box-shadow:inset 0 0 0 2px rgba(255,255,255,.8),0 10px 24px rgba(0,0,0,.45);}

/* --- Disable legacy dropdown from Tilda --- */
/* Удалено скрытие меню Tilda, чтобы восстановить отображение dropdown и третьего уровня */

/* --- плавный градиент и тонкие границы для карточек ---*/
/* применяем градиент только к активным элементам; обычные остаются прозрачнее */
.brand-item,.model-item,.gen-item{border:1px solid transparent;background:transparent;box-shadow:none;}
.brand-item:hover,.model-item:hover,.gen-item:hover{background:rgba(255,255,255,.18);box-shadow:0 2px 6px rgba(0,0,0,.25);}
.brand-item.active{background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%) !important;box-shadow:0 6px 18px rgba(0,0,0,.4) !important;}

/* --- футер меню --- */
.shop-footer{display:flex;flex-wrap:wrap;gap:20px;justify-content:center;align-items:center;border-top:1px solid rgba(255,255,255,.15);margin-top:12px;padding-top:12px;font-size:14px;font-weight:600;color:#fff;}
.shop-footer .sf-link{color:#fff;text-decoration:none;opacity:.8;transition:opacity .2s;}
.shop-footer .sf-link:hover{opacity:1;}

/* — избавляемся от фона у неактивных брендов — */
.shop-brands .brand-item:not(.active):not(.special-item){
    background:none !important;          /* без цвета */
    border:none !important;              /* без рамки */
    box-shadow:none !important;          /* без тени */
}
.shop-brands .brand-item:not(.active):not(.special-item)::before,
.shop-brands .brand-item:not(.active):not(.special-item)::after{
    content:none !important;
    display:none !important;
    background:none !important;
}

/* --- принудительно убираем градиент-подложку у неактивных брендов --- */
.shop-brands .brand-item:not(.active):not(.special-item)::before,
.shop-brands .brand-item:not(.active):not(.special-item)::after{
    content:none !important;
    display:none !important;
    background:none !important;
}

/* ----- Окончательный сброс для неактивных брендов ----- */
.shop-brands .brand-item:not(.active):not(.special-item),
.shop-brands .brand-item:not(.active):not(.special-item):hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
/* убираем градиент-оверлей */
.shop-brands .brand-item:not(.active):not(.special-item)::before {
    content: none !important;
    display: none !important;
}

/* === FINAL override: чистые бренды === */
.shop-brands .brand-item:not(.active):not(.special-item){background:none!important;border:none!important;box-shadow:none!important;}
.shop-brands .brand-item:not(.active):not(.special-item)::before{display:none!important;}
.shop-brands .brand-item:not(.active):not(.special-item):hover{background:none!important;transform:none!important;}

/* --- absolute reset non-special brands --- */
.shop-brands .brand-item,
.shop-brands .brand-item:hover{
    background-color:transparent !important;
    backdrop-filter:none !important;
}

/* --- Model & Generation default transparent --- */
.shop-models .model-item,
.shop-gens .gen-item{
    background:none!important;
    border:none!important;
    box-shadow:none!important;
}
.shop-models .model-item:hover,
.shop-gens .gen-item:hover{
    background:rgba(255,255,255,.1)!important;
}

/* ensure active brand highlighted */
.shop-brands .brand-item.active{background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%) !important;box-shadow:0 6px 18px rgba(0,0,0,.4)!important;}

/* remove background/overlay for models & generations */
.shop-models .model-item::before,
.shop-gens .gen-item::before{display:none!important;}
.shop-models .model-item:hover,
.shop-gens .gen-item:hover{background:none!important;box-shadow:none!important;transform:none!important;}

.shop-brands .brand-item:not(.active):not(.special-item){background:none!important;border:none!important;box-shadow:none!important;}
.shop-models .model-item,
.shop-gens .gen-item{background:none!important;border:none!important;box-shadow:none!important;}

/* --- Final override for model & gen --- */
.shop-models .model-item,
.shop-gens .gen-item{
  backdrop-filter:none!important;
}
.shop-models .model-item::before,
.shop-gens .gen-item::before{
  content:none!important;
  background:none!important;
}

/* highlight active model/gen */
.shop-models .model-item.active,
.shop-gens .gen-item.active{
  background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

/* карточка модели и поколения по умолчанию – полупрозрачная, но не «пустая» */
.shop-models .model-item,
.shop-gens   .gen-item{
  background:rgba(255,255,255,.08);      /* лёгкая заливка */
  border-radius:12px;
  padding:10px 14px;
  backdrop-filter:blur(12px) saturate(160%);
  transition:all .25s;
}

/* подчёркиваем выбранную */
.shop-models .model-item.active,
.shop-gens   .gen-item.active{
  background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

/* ховер – лёгкое подсвет-движение */
.shop-models .model-item:hover,
.shop-gens   .gen-item:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 8px rgba(0,0,0,.25);
}

/* базовый вид models / gens */
.shop-models .model-item,
.shop-gens .gen-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.06);       /* лёгкая заливка, чтобы картинка/текст читались */
  transition:background .25s;
}

/* картинка модели */
.shop-models .model-item img{
  width:80px;
  height:auto;
  border-radius:6px;
}

/* карточка поколения – вертикальная */
.shop-gens .gen-item{
  flex-direction:column;
  padding:0;
  overflow:hidden;
}

.shop-gens .gen-item img{width:100%;display:block;border-radius:6px 6px 0 0;}
.shop-gens .gen-item span{
  display:block;
  padding:6px 8px;
  font-size:14px;
}

/* подсветка active */
.shop-models .model-item.active,
.shop-gens .gen-item.active{
  background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

/* === RESTORE MODEL & GEN CARDS === */
.shop-models .model-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  transition:background .25s;
}
.shop-models .model-item img{
  width:80px;height:auto;border-radius:6px;
}
.shop-gens .gen-item{
  flex-direction:column;
  padding:0;
  border-radius:12px;
  overflow:hidden;
  background:rgba(255,255,255,.06);
  transition:background .25s;
}
.shop-gens .gen-item img{
  width:100%;display:block;border-radius:6px 6px 0 0;
}
.shop-gens .gen-item span{
  display:block;padding:6px 8px;font-size:14px;text-align:center;
}
.shop-models .model-item.active,
.shop-gens .gen-item.active{
  background:linear-gradient(180deg,rgba(0,155,255,.42) 0%,rgba(0,120,255,.38) 100%) !important;
  box-shadow:0 4px 12px rgba(0,0,0,.35) !important;
}
.shop-models .model-item:hover:not(.active),
.shop-gens .gen-item:hover:not(.active){
  background:rgba(255,255,255,.12);
}

/* === NAVIGATION WITH LOGOS (v2024-11-25) === */
.main-navigation {display:flex;align-items:center;gap:24px;}
.main-navigation li {list-style:none;position:relative;display:flex;align-items:center;}
.main-navigation li a{display:flex;align-items:center;gap:8px;padding:6px 10px;font-size:14px;font-weight:600;color:#333;text-decoration:none;transition:color .2s,background-color .2s;border-radius:6px;}
.main-navigation li a:hover{background:rgba(0,0,0,.06);color:#000;}
/* логотипы (WP-плагин Menu Image выводит <img> внутри <a>) */
.main-navigation li a img{width:22px;height:auto;object-fit:contain;flex:0 0 22px;}
/* Стрелочка для подменю */
.main-navigation li.menu-item-has-children>a:after{content:"▾";font-size:10px;margin-left:4px;transition:transform .2s;}
.main-navigation li.menu-item-has-children:hover>a:after{transform:rotate(180deg);} 
/* Выпадающее подменю */
.main-navigation ul.sub-menu{position:absolute;left:0;top:calc(100% + 4px);display:none;flex-direction:column;min-width:220px;background:#fff;border-radius:8px;padding:8px 0;box-shadow:0 4px 16px rgba(0,0,0,.12);z-index:200;}
.main-navigation li:hover>ul.sub-menu{display:flex;}
.main-navigation ul.sub-menu li{display:block;}
.main-navigation ul.sub-menu li a{padding:6px 16px;font-size:13px;font-weight:500;}
.main-navigation ul.sub-menu li a:hover{background:rgba(0,0,0,.05);} 
/* Третий уровень – смещаем вправо */
.main-navigation ul.sub-menu ul.sub-menu{left:100%;top:0;}
/* Адаптив: мобильное меню – вертикальный список */
@media(max-width:991px){.main-navigation{flex-direction:column;gap:0;}
  .main-navigation li{width:100%;}
  .main-navigation li a{justify-content:flex-start;width:100%;padding:12px 18px;font-size:16px;}
  .main-navigation ul.sub-menu{position:static;display:none;box-shadow:none;background:none;padding:0;margin:0 0 0 18px;}
  .main-navigation li.open>ul.sub-menu{display:block;}
}
/* Класс .open будет добавляться JS-скриптом для аккордеона на мобильных */ 