:root {
    --wc-black: #15171a;
    --wc-dark: #1d2024;
    --wc-white: #ffffff;

    --wc-text: #20242a;
    --wc-muted: #69717c;

    --wc-blue: #2563eb;
    --wc-blue-dark: #1d4ed8;
    --wc-blue-light: #eff6ff;

    --wc-border: #e5e7eb;
    --wc-light: #f8fafc;
}


/*
|--------------------------------------------------------------------------
| Base
|--------------------------------------------------------------------------
*/

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--wc-text);
    background: var(--wc-white);
    font-family: "Roboto Slab", Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--wc-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.site-header .navbar {
    min-height: 82px;
}

.brand-name {
    display: inline-flex;
    align-items: center;
    color: var(--wc-white);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-text {
    color: var(--wc-white);
}

.brand-text span {
    color: #8eb8ff;
}

.brand-logo {
    display: block;
    max-width: 180px;
    max-height: 52px;
    width: auto;
}

.navbar-nav {
    gap: 4px;
}

.nav-link {
    padding: 9px 15px !important;
    border-radius: 99px;
    color: #c3c9d1 !important;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.18s ease, background 0.18s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
    color: #ffffff !important;
    background: var(--wc-blue);
}

/* Компактная иконка-кнопка (корзина) */
.nav-link--icon {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #cdd2d9 !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    transition: all 0.18s ease;
}

.nav-link--icon:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.shop-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--wc-blue);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.navbar-toggler {
    padding: 8px;
    color: var(--wc-white);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 1.15rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}


/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.btn {
    padding: 11px 20px;
    border-radius: 7px;
    font-weight: 700;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-primary {
    color: var(--wc-white);
    background: var(--wc-blue);
    border-color: var(--wc-blue);
}

.btn-primary:hover {
    color: var(--wc-white);
    background: var(--wc-blue-dark);
    border-color: var(--wc-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.btn-dark {
    color: var(--wc-white);
    background: var(--wc-black);
    border-color: var(--wc-black);
}

.btn-dark:hover {
    color: var(--wc-white);
    background: #292d32;
    border-color: #292d32;
    transform: translateY(-1px);
}


/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.site-footer {
    padding: 75px 0 25px;
    color: #b5bbc3;
    background: var(--wc-dark);
}

.footer-brand {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--wc-white);
    font-size: 1.55rem;
    font-weight: 800;
}

.footer-brand span {
    color: #8eb8ff;
}

.footer-description {
    max-width: 420px;
    margin: 0;
    line-height: 1.7;
}

.footer-title {
    margin-bottom: 20px;
    color: var(--wc-white);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-links {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #8eb8ff;
}

.footer-divider {
    margin: 50px 0 25px;
    border-color: #343941;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #747c87;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: #9aa0ab;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--wc-white);
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-inn {
    color: #9aa0ab;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-legal-sep {
    color: #4a525c;
}


/*
|--------------------------------------------------------------------------
| Legal pages (соглашение, политика)
|--------------------------------------------------------------------------
*/

.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 0 40px;
    line-height: 1.75;
    color: #3a4150;
}

.legal-page h2 {
    margin: 32px 0 12px;
    color: var(--wc-black);
    font-size: 1.3rem;
    font-weight: 800;
}

.legal-page p {
    margin: 0 0 14px;
}

.legal-date {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--wc-border);
    color: #747c87;
    font-size: 0.9rem;
}


/*
|--------------------------------------------------------------------------
| User menu (авторизация в шапке)
|--------------------------------------------------------------------------
*/

.user-menu {
    position: relative;
    margin-left: 12px;
}

.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #343941;
    border-radius: 8px;
    background: transparent;
    color: #cdd2d9;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.user-menu__trigger:hover {
    border-color: var(--wc-blue);
    color: #8eb8ff;
}

.user-menu__icon {
    color: #8eb8ff;
}

.user-menu__name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__caret {
    font-size: 0.7rem;
    color: #8a919c;
    transition: transform 0.2s ease;
}

.user-menu.is-open .user-menu__caret {
    transform: rotate(180deg);
}

.user-menu__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    padding: 8px;
    background: var(--wc-white);
    border: 1px solid var(--wc-border);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1000;
}

.user-menu.is-open .user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu__head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--wc-border);
    margin-bottom: 6px;
}

.user-menu__head-name {
    font-weight: 700;
    color: var(--wc-black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__head-email {
    font-size: 0.82rem;
    color: #747c87;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--wc-text);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-menu__link i {
    width: 18px;
    text-align: center;
    color: var(--wc-blue);
}

.user-menu__link:hover {
    background: var(--wc-blue-light);
    color: var(--wc-blue);
}

.user-menu__link--danger {
    color: #d64545;
}

.user-menu__link--danger i {
    color: #d64545;
}

.user-menu__link--danger:hover {
    background: #fdecec;
    color: #c33c3c;
}

.user-menu__sep {
    height: 1px;
    background: var(--wc-border);
    margin: 6px 4px;
}

/* Гость: компактная иконка профиля */
.user-menu--guest {
    display: inline-flex;
    align-items: center;
}

.user-menu__guest-link {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #cdd2d9;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.18s ease;
}

.user-menu__guest-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.user-menu__guest-sep {
    color: #5a626c;
}

/* Убираем отступ на мобильных */
@media (max-width: 991.98px) {
    .user-menu {
        margin-left: 0;
        margin-top: 8px;
    }
    .user-menu--guest {
        margin-left: 8px;
    }
    .user-menu__dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        margin-top: 6px;
        opacity: 1;
        visibility: visible;
    }
}


/*
|--------------------------------------------------------------------------
| Global Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {

    .navbar-nav {
        padding: 20px 0;
    }

    .navbar-collapse .btn {
        margin-left: 0 !important;
    }

}

@media (max-width: 575.98px) {

    .site-header .navbar {
        min-height: 70px;
    }

    .footer-bottom {
        flex-direction: column;
    }

}