:root {
    --accent: #0071e3;
    --bg: #f5f5f7;
    --border-color: #d2d2d7;
    --text-main: #1d1d1f;
    --text-gray: #86868b;
}


.nexbit-logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    /* Используем системные шрифты как у Apple */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1;
}

.nexbit-logo .nex-text {
    font-size: 28px;
    font-weight: 850;
    /* Очень жирный */
    color: #1d1d1f;
    /* Глубокий черный */
    letter-spacing: -1.2px;
}

.nexbit-logo .bit-text {
    font-size: 28px;
    font-weight: 850;
    color: #0071e3;
    /* Твой фирменный синий */
    letter-spacing: -1.2px;
}

/* На мобилках сделаем чуть компактнее */
@media (max-width: 768px) {

    .nexbit-logo .nex-text,
    .nexbit-logo .bit-text {
        font-size: 22px;
        letter-spacing: -0.8px;
    }
}


/* Глобальный сброс для корректного расчета размеров с border */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ХЕДЕР */
.glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 10px !important;
}

.city-select {
    border: none;
    background: none;
    font-weight: 700;
    color: var(--accent);
    outline: none;
    font-size: 14px;
}

.search-bar {
    flex: 1;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    font-size: 15px;
    background: #fff;
    outline: none;
}

.filter-toggle-btn {
    width: 48px;
    height: 48px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: var(--accent);
}

.filter-toggle-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ФИЛЬТРЫ */
.super-filter-row {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding: 5px 0 12px;
    scrollbar-width: none;
    align-items: center;
}

.super-filter-row::-webkit-scrollbar {
    display: none;
}

.price-pill {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #1d1d1f;
    border-radius: 12px;
    padding: 0 10px;
    height: 40px;
    flex-shrink: 0;
}

.price-pill input {
    border: none;
    outline: none;
    width: 50px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    background: transparent;
}

.sort-pill-group {
    display: flex;
    background: #e8e8ed;
    padding: 3px;
    border-radius: 12px;
    height: 40px;
    align-items: center;
    flex-shrink: 0;
}

.sort-btn {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9px;
    transition: 0.2s;
}

.sort-btn.active {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sort-btn span {
    font-size: 16px;
    font-weight: 800;
}

.reset-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ff3b30;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

/* КАТЕГОРИИ (Обновлено: ультра-тонкие границы) */
.cat-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 5px 0 10px;
    scrollbar-width: none;
}

.cat-scroll::-webkit-scrollbar {
    display: none;
}

.cat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
    cursor: pointer;
}

.cat-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    /* Ультра-тонкая граница, почти невидимая, но дающая объем */
    /* border: 1px solid rgba(0,0,0,0.06);  */
    border: 1px solid var(--border-color) !important;
    transition: all 0.2s ease;
}

.cat-box.active .cat-icon {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent) !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.cat-text {
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    text-align: center;
    color: var(--text-gray);
}

/* КАРТОЧКИ ТОВАРОВ (Обновлено: исправлен расчет ширины) */
.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    height: 100%;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fbfbfd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

/* ——— ДЕСКТОПНЫЕ СТИЛИ ——— */
@media (min-width: 992px) {
    .cat-box:hover .cat-icon {
        border-color: var(--accent) !important;
        /* При наведении подсвечиваем синим */
        transform: translateY(-2px);
    }

    /* Контейнер чуть шире, чтобы все влезло */
    .container {
        max-width: 1240px !important;
    }

    /* Растянутые фильтры на десктопе */
    .price-pill {
        min-width: 300px !important;
        height: 48px !important;
        padding: 0 20px !important;
        border-radius: 14px !important;
    }

    .price-pill input {
        width: 100px !important;
        font-size: 16px !important;
    }

    .sort-pill-group,
    .reset-btn {
        height: 48px !important;
    }

    .sort-btn {
        padding: 8px 20px !important;
        font-size: 15px !important;
    }

    /* Hero-баннер */
    .hero-desktop {
        background: #fff;
        padding: 80px 0 40px;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .hero-title {
        font-size: 56px;
        font-weight: 800;
        letter-spacing: -2.5px;
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 20px;
        color: var(--text-gray);
        font-weight: 500;
        max-width: 700px;
        margin: 0 auto;
    }

    /* Категории на десктопе */
    .cat-icon {
        width: 60px;
        height: 60px;
        font-size: 26px;
        border-radius: 18px;
    }

    .cat-icon:hover {
        border-color: rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }

    /* Сетка товаров (ИСПРАВЛЕНО: Уменьшен gap и border, чтобы товары влезали) */
    #products-grid {
        gap: 16px !important;
        /* Чуть меньше gap для десктопа */
    }

    .product-card {
        /* Тонкая граница, не ломающая Bootstrap сетку */
        border: 1px solid #eaeaea !important;
        border-radius: 24px;
        box-shadow: none !important;
    }

    .product-card:hover {
        transform: translateY(-5px);
        border-color: var(--accent) !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05) !important;
    }

    .product-card .fw-bold {
        font-size: 17px !important;
        color: var(--accent);
    }

    .product-card .text-truncate {
        font-size: 13px !important;
        font-weight: 500;
    }

    /* Гарантируем 4 товара в ряд на LG */
    .col-lg-3 {
        width: calc(25% - 12px) !important;
    }

    /* Точный расчет с учетом gap */
}

/* ФУТЕР */
.apple-footer {
    background: #f5f5f7;
    padding: 60px 0 40px;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    color: #424245;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
    color: var(--text-main);
}

.footer-copy {
    color: var(--text-gray);
    font-size: 12px;
    margin-top: 30px;
}

.footer-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 25px 0;
}

/* product.php страница просмотра товара */
:root {
    --bg: #ffffff;
    --secondary-bg: #f5f5f7;
    --accent: #0071e3;
    --text: #1d1d1f;
    --gray: #86868b;
}

body {
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.gallery-container {
    background: var(--secondary-bg);
    border-radius: 32px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.main-img-wrapper {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    margin-bottom: 15px;
}

.main-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumb-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.thumb-item {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
    background: #fff;
    padding: 5px;
    flex-shrink: 0;
}

.thumb-item.active {
    border-color: var(--accent);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.price-tag {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
}

.qty-badge {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 12px;
}

.in-stock {
    background: #e3f9eb;
    color: #219653;
}

.out-stock {
    background: #fff1f0;
    color: #f5222d;
}

.btn-action {
    border-radius: 18px;
    padding: 18px;
    font-weight: 600;
    font-size: 17px;
    transition: 0.3s;
    border: none;
    width: 100%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-call {
    background: var(--accent);
    color: white;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: white;
}

.info-card {
    background: var(--secondary-bg);
    border-radius: 24px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.shop-row {
    background: #fff;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #e5e5e7;
    margin-bottom: 10px;
    transition: 0.2s;
}

.shop-row:hover {
    border-color: var(--accent);
}

.other-card {
    background: #fff;
    border: 1px solid #e5e5e7;
    border-radius: 24px;
    padding: 20px;
    transition: 0.3s;
    position: relative;
}

.other-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.verified-badge {
    margin-left: 2px;
    flex-shrink: 0;
}