/* =========================================
   1. МОНИТОР (ФОН)
   Делаем весь экран бирюзовым, как рабочий стол
   ========================================= */
body.win95-theme {
    background-color: #008080 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-font-smoothing: none !important;
}

/* =========================================
   2. ГЛАВНОЕ ОКНО ПРОГРАММЫ
   Серый контейнер по центру
   ========================================= */
body.win95-theme .win95-main-window {
    position: relative !important;
    max-width: 1400px !important;
    width: 96% !important;
    margin: 40px auto 20px auto !important;
    background-color: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    box-shadow: 2px 2px 0px #000 !important;
    padding: 30px 4px 4px 4px !important;
    color: #000000 !important;
    font-family: 'MS Sans Serif', 'Tahoma', Arial, sans-serif !important;
}

body.win95-theme .win95-main-window * {
    border-radius: 0 !important;
}

/* =========================================
   3. ИСКУССТВЕННЫЙ СИНИЙ ЗАГОЛОВОК ОКНА
   ========================================= */
body.win95-theme .win95-main-window::before {
    content: 'SPECLED Explorer - Catalog';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 22px;
    background-color: #000080 !important;
    background-image: none !important;
    color: #ffffff !important;
    font-weight: bold;
    font-size: 13px;
    line-height: 22px;
    padding-left: 6px;
    letter-spacing: 1px;
}

body.win95-theme .win95-main-window::after {
    content: '_ ◻ ✕';
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #c0c0c0;
    color: #000000;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 4px;
    padding: 1px 6px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    line-height: 14px;
    cursor: default;
}

/* =========================================
   4. ХЕДЕР И НАВИГАЦИЯ (Серая Панель Инструментов)
   ========================================= */
body.win95-theme .site-header {
    position: static !important;
    background-color: #c0c0c0 !important;
    padding: 5px !important;
    margin: 0 !important;
    border-top: 2px solid #dfdfdf !important;
    border-bottom: 2px solid #808080 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}

body.win95-theme .site-header *,
body.win95-theme .nav-link {
    color: #000000 !important;
}

/* Главное меню */
body.win95-theme .site-header .navbar-nav .nav-item .nav-link {
    background-color: #c0c0c0 !important;
    font-weight: bold !important;
    padding: 4px 8px !important;
    margin: 2px 4px !important;
    font-size: 14px !important;
    border: 2px solid !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    transition: none !important;
}

body.win95-theme .site-header .navbar-nav .nav-item .nav-link:hover {
    border-color: #ffffff #808080 #808080 #ffffff !important;
}

body.win95-theme .site-header .navbar-nav .nav-item .nav-link:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
    padding: 5px 9px 3px 11px !important;
    /* Вдавливание текста */
}

body.win95-theme .site-header .navbar-nav .nav-item .nav-link.active {
    color: #0000FF !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
}

/* Панель контактов */
body.win95-theme .contact-toolbar {
    background-color: #c0c0c0 !important;
    border-top: 2px solid #ffffff !important;
    border-bottom: 2px solid #808080 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.win95-theme .contact-toolbar .win95-inset-field {
    background-color: #ffffff !important;
    border: 2px solid !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    line-height: 1;
}

body.win95-theme .contact-toolbar a:hover {
    text-decoration: none !important;
}

/* Полная зачистка иконок хедера */
body.win95-theme header .header-icon-btn,
body.win95-theme header .header-icon-btn:hover,
body.win95-theme header .header-icon-btn:focus,
body.win95-theme header .header-icon-btn:active,
body.win95-theme header .header-icon-btn.active,
body.win95-theme header a#themeToggleBtn,
body.win95-theme header a#themeToggleBtn:hover,
body.win95-theme header a#themeToggleBtn:active,
body.win95-theme header a#themeToggleBtn.active {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #000000 !important;
    outline: none !important;
}

body.win95-theme header .header-icon-btn i,
body.win95-theme header a#themeToggleBtn i {
    color: #000000 !important;
}

body.win95-theme header .header-icon-btn::before,
body.win95-theme header .header-icon-btn::after,
body.win95-theme header a#themeToggleBtn::before,
body.win95-theme header a#themeToggleBtn::after {
    display: none !important;
}

body.win95-theme #themeToggleBtn.active {
    background: #000080 !important;
    color: #fff !important;
}

body.win95-theme #themeToggleBtn.active i {
    color: #fff !important;
}

/* Счетчик корзины */
body.win95-theme #cartBtnGlobal .cart-badge,
body.win95-theme .header-icon-btn .cart-badge {
    background: #000080 !important;
    box-shadow: none !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: bold !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin-left: 5px !important;
}

/* Переключатели валют/языков */
body.win95-theme .switcher-btn.active {
    color: #0000FF !important;
    background-color: #c0c0c0 !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    box-shadow: none !important;
    outline: none !important;
}

body.win95-theme .switcher-btn.active:hover,
body.win95-theme .switcher-btn.active:focus {
    color: #0000FF !important;
    background-color: #c0c0c0 !important;
}

/* Поиск */
body.win95-theme .search-input-group {
    background: #fff !important;
    border: 2px solid !important;
    border-color: #808080 #dfdfdf #dfdfdf #808080 !important;
}

/* =========================================
   5. ОСНОВНОЙ КОНТЕНТ И КАРТОЧКИ
   ========================================= */
body.win95-theme #main-content {
    background-color: #c0c0c0 !important;
}

/* Вдавленные области */
body.win95-theme .win95-window-inset,
body.win95-theme .win95-inset-field,
body.win95-theme .cat-card-img-box {
    background-color: #ffffff !important;
    border: 2px solid !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    padding: 2px !important;
}

/* Выпуклые области (Карточки) */
body.win95-theme .product-card,
body.win95-theme .cat-card,
body.win95-theme .card {
    background-color: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #808080 !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 4px !important;
    color: #000000 !important;
}

body.win95-theme .cart-drawer {
    background-color: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #808080 !important;
    box-shadow: none !important;
    padding: 4px !important;
    color: #000000 !important;
}

/* Детали карточек товаров */
body.win95-theme .product-card:active {
    border-color: #000000 #dfdfdf #dfdfdf #000000 !important;
}

body.win95-theme .product-card .card-img-wrapper {
    border-radius: 0 !important;
}

body.win95-theme .product-card .card-img-wrapper::before {
    content: "Product_Viewer.exe";
    display: flex;
    align-items: center;
    background: #000080;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-bottom: 2px solid #dfdfdf;
    letter-spacing: 0.5px;
}

body.win95-theme .product-img,
body.win95-theme .product-card:hover .product-img {
    transition: none !important;
    transform: none !important;
}

body.win95-theme .price {
    color: #000080 !important;
    font-weight: bold !important;
}

body.win95-theme .product-card .badge,
body.win95-theme .win95-main-window .badge {
    white-space: normal !important;
    max-width: 100% !important;
    display: block !important;
    word-wrap: break-word !important;
    text-align: center !important;
    margin-bottom: 8px !important;
}

/* Детали карточек категорий */
body.win95-theme .cat-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    text-align: center !important;
    text-decoration: none !important;
}

body.win95-theme .cat-card-body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex-grow: 1 !important;
    padding: 4px 0 !important;
    background: transparent !important;
}

body.win95-theme .cat-name {
    font-family: "MS Sans Serif", Tahoma, Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: bold !important;
    color: #000000 !important;
    text-transform: none !important;
}

body.win95-theme .cat-card.active {
    background-color: #c0c0c0 !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
}

body.win95-theme .cat-card.active .cat-name {
    color: #000000 !important;
}

/* Системные кнопки */
body.win95-theme .btn,
body.win95-theme .switcher-btn,
body.win95-theme .btn-primary,
body.win95-theme .btn-accent {
    background-color: #c0c0c0 !important;
    color: #000000 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-weight: bold !important;
    font-family: "MS Sans Serif", Arial, sans-serif !important;
}

body.win95-theme .btn:active,
body.win95-theme .switcher-btn:active,
body.win95-theme .btn-primary:active,
body.win95-theme .btn-accent:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
    /* Убраны переопределения padding, чтобы кнопки (особенно Оформить заказ с py-3) не меняли физический размер при клике */
}

/* =========================================
   6. ФУТЕР (Нижний подвал)
   ========================================= */
body.win95-theme .site-footer {
    position: relative !important;
    background-color: #1a1e21 !important;
    max-width: 1400px !important;
    width: 96% !important;
    margin: 0 auto 40px auto !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

/* ФИКС: Принудительный белый цвет для текста, заголовков и ссылок в подвале */
body.win95-theme .site-footer * {
    font-family: inherit;
}

body.win95-theme .site-footer h6,
body.win95-theme .site-footer p,
body.win95-theme .site-footer address,
body.win95-theme .site-footer span,
body.win95-theme .site-footer a {
    color: #ffffff !important;
}

/* Смягчаем второстепенный текст, чтобы не бил по глазам */
body.win95-theme .site-footer p.small,
body.win95-theme .site-footer address.small {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.win95-theme .site-footer a:hover {
    color: #0000FF !important;
}

/* Классический ретро-ховер для ссылок */

body.win95-theme .cart-drawer,
body.win95-theme .cart-overlay {
    z-index: 99999 !important;
}

body.win95-theme .btn-close {
    filter: invert(0) !important;
    opacity: 1 !important;
}

/* =========================================
   7. ЗАМЕНА СОВРЕМЕННЫХ ИКОНОК НА WIN95 PIXEL-ART
   ========================================= */
body.win95-theme .contact-left-column .bg-primary.bg-opacity-10 {
    background-color: #ffffff !important;
    border: 2px solid !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    flex-shrink: 0;
    position: relative;
}

body.win95-theme .contact-left-column .bg-primary i,
body.win95-theme .contact-left-column .bg-primary svg {
    display: none !important;
}

body.win95-theme .contact-left-column .bg-primary::before {
    content: "";
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    display: block !important;
}

body.win95-theme .contact-left-column div:has(.bi-geo-alt)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23c0c0c0' d='M16 4l12 10v14H4V14L16 4z'/%3E%3Cpath fill='%23808080' d='M16 4l12 10h-3v12H7V14H4L16 4z'/%3E%3Cpath fill='%23ffffff' d='M16 6l9 8h-2v10H9V14H7l9-8z'/%3E%3Cpath fill='%23000080' d='M14 18h4v6h-4z'/%3E%3Cpath fill='%23ff0000' d='M21 8h3v4h-3z'/%3E%3Cpath d='M16 4l12 10v14H4V14L16 4z' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") !important;
}

body.win95-theme .contact-left-column div:has(.bi-telephone)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23ffff00' stroke='%23000' stroke-width='2' d='M6 12 c0-4 4-7 10-7 s10 3 10 7 v2 c0 2-2 3-4 3 s-4-1-4-3 v-1 c-4 0-4 0-4 0 v1 c0 2-2 3-4 3 s-4-1-4-3 v-2 z'/%3E%3Cpath fill='%23000' d='M11 11h10v1H11z' opacity='0.2'/%3E%3C/svg%3E") !important;
}

body.win95-theme .contact-left-column div:has([class*="bi-envelope"])::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='4' y='8' width='24' height='16' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M4 8l12 10L28 8' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") !important;
}

body.win95-theme .contact-left-column div:has([class*="bi-clock"])::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='12' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M16 8v8h6' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") !important;
}