* {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--bg-body);
}

:root {
    --app-primary: #3b82f6;
    --app-primary-dark: #2563eb;
    --app-primary-light: #60a5fa;
    --app-accent: #ef4444;
    --app-success: #10b981;
    --app-warning: #f59e0b;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --border-light: #e2e8f0;
    --txt-main: #0f172a;
    --txt-sub: #64748b;
    --bg-secondary: #f8fafc;
    --txt-muted: #94a3b8;
    --app-primary-alpha: rgba(59, 130, 246, 0.12);
    --app-accent-alpha: rgba(239, 68, 68, 0.1);
    --app-success-alpha: rgba(16, 185, 129, 0.1);
    --shadow-app: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-deep: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    --scrollbar-thumb: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body.dark-theme {
    --bg-body: #020617;
    --bg-card: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.95);
    --border-light: #334155;
    --txt-main: #f8fafc;
    --txt-sub: #94a3b8;
    --app-primary: #60a5fa;
    --app-primary-dark: #3b82f6;
    --app-primary-light: #93c5fd;
    --bg-secondary: #0f172a;
    --txt-muted: #64748b;
    --app-primary-alpha: rgba(96, 165, 250, 0.15);
    --app-accent-alpha: rgba(239, 68, 68, 0.12);
    --app-success-alpha: rgba(16, 185, 129, 0.12);
    --shadow-app: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-deep: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.2);
    --scrollbar-thumb: #475569;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background: var(--bg-body);
    color: var(--txt-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 80px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 20px; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--txt-main); }
.text-muted { color: var(--txt-muted) !important; }

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .navbar .nav-icon.d-md-none {
        display: none !important;
    }

    .catalog-btn.d-none.d-md-flex {
        display: none !important;
    }

    .blog-btn.d-none.d-md-flex {
        display: none !important;
    }

    .navbar .nav-icon.customer-service {
        display: flex !important;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--txt-sub);
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    font-size: 0.7rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-item.active {
    color: var(--app-primary);
    background: var(--bg-body);
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.mobile-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.customer-service-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-deep);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 500px) {
    .customer-service-sidebar {
        width: 100%;
    }
}

.customer-service-sidebar.active {
    transform: translateX(0);
}

.customer-service-header {
    padding: 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.customer-service-title-group {
    display: flex;
    flex-direction: column;
}

.customer-service-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--txt-main);
}

.customer-service-subtitle {
    font-size: 0.9rem;
    color: var(--txt-sub);
    margin: 0.25rem 0 0 0;
}

.customer-service-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.customer-service-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.customer-service-back:hover {
    background: var(--bg-card);
    border-color: var(--app-primary);
}

.customer-service-section {
    margin-bottom: 2rem;
}

.customer-service-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--txt-main);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.customer-service-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 0.75rem;
}

.customer-service-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--app-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.customer-service-contact-info {
    flex: 1;
}

.customer-service-contact-label {
    font-size: 0.8rem;
    color: var(--txt-sub);
    margin-bottom: 0.25rem;
}

.customer-service-contact-value {
    font-weight: 600;
    color: var(--txt-main);
    font-size: 1rem;
}

.customer-service-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
    margin-bottom: 0.75rem;
    background: var(--app-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.customer-service-btn:hover {
    background: var(--app-primary-dark);
    transform: translateY(-2px);
    color: white;
}

.customer-service-btn.outline {
    background: transparent;
    border: 2px solid var(--border-light);
    color: var(--txt-main);
    box-shadow: none;
}

.customer-service-btn.outline:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.catalog-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.category-hierarchy {
    display: flex;
    flex-direction: column;
}

.category-level {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-hierarchy-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-hierarchy-item:hover {
    border-color: var(--app-primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-app);
    transform: translateX(4px);
}

.category-hierarchy-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.category-hierarchy-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.category-hierarchy-name {
    font-weight: 600;
    color: var(--txt-main);
}

.category-hierarchy-arrow {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-sub);
    transition: all 0.2s;
    cursor: pointer;
}

.category-hierarchy-item:hover .category-hierarchy-arrow {
    border-color: var(--app-primary);
    color: var(--app-primary);
    background: var(--bg-card);
}

.category-hierarchy-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.category-hierarchy-back:hover {
    background: var(--bg-card);
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.settings-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--txt-sub);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-option:hover {
    border-color: var(--app-primary);
    background: var(--bg-card);
}

.settings-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.settings-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-light);
    transition: .4s;
    border-radius: 34px;
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.settings-toggle input:checked + .settings-toggle-slider {
    background-color: var(--app-primary);
}

.settings-toggle input:checked + .settings-toggle-slider:before {
    transform: translateX(24px);
}

.settings-notification {
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--txt-sub);
}

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    color: var(--txt-main);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-deep);
    z-index: 10050;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 1px solid var(--border-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-notification.show { opacity: 1; transform: translateX(0); }
.toast-notification.success { border-left: 4px solid var(--app-success); }
.toast-notification.error { border-left: 4px solid var(--app-accent); }
.toast-notification.info { border-left: 4px solid var(--app-primary); }

.navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-text {
    font-weight: 800;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.catalog-btn {
    background: var(--txt-main);
    color: var(--bg-card);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-app);
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
    background: var(--app-primary);
    color: white;
}

.blog-btn {
    background: rgba(238, 130, 6, 0.795);
    color: var(--bg-card);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-app);
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
    background: var(--app-primary);
    color: white;
}

.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--txt-main);
    transition: all 0.2s ease;
    position: relative;
    margin-left: 0.5rem;
    border: 1px solid transparent;
}

.nav-icon:hover {
    background: var(--bg-body);
    border-color: var(--border-light);
    color: var(--app-primary);
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--app-accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    pointer-events: auto;
}

.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed;
    top: 0;
    width: 450px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-deep);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 500px) {
.sidebar { width: 100%; }
.nav-icon{
    width: 23px;
}

}

.sidebar-left { left: 0; transform: translateX(-100%); border-right: 1px solid var(--border-light); }
.sidebar-left.active { transform: translateX(0); }
.sidebar-right { right: 0; transform: translateX(100%); border-left: 1px solid var(--border-light); }
.sidebar-right.active { transform: translateX(0); }

.sidebar-header {
    padding: 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 20;
}

.sidebar-title-group { display: flex; flex-direction: column; }
.sidebar-title { font-size: 1.4rem; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 0.75rem; color: var(--txt-main); }
.sidebar-subtitle { font-size: 0.9rem; color: var(--txt-sub); margin: 0.25rem 0 0 0; }

.sidebar-close {
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--txt-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-close:hover { background: var(--app-accent); color: white; border-color: var(--app-accent); }

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-footer {
    padding: 1.5rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    z-index: 20;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-item:hover {
    border-color: var(--app-primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-app);
    transform: translateX(4px);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 14px;
    background: var(--bg-body);
    color: var(--txt-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--app-primary);
    background: var(--bg-card);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.search-result-item:hover {
    border-color: var(--app-primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-app);
    transform: translateX(4px);
}

.search-result-img {
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    color: var(--txt-main);
    text-decoration: none;
    transition: all 0.2s;
}

.account-menu-item:hover { background: var(--bg-card); border-color: var(--app-primary); transform: translateX(4px); }

.account-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid var(--border-light);
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 2rem 0;
}

.auth-icon-large { font-size: 4rem; color: var(--txt-sub); margin-bottom: 1rem; opacity: 0.5; }

.btn-auth-primary {
    background: var(--app-primary);
    color: white;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-auth-primary:hover { background: var(--app-primary-dark); transform: translateY(-2px); color: white; }

.btn-auth-outline {
    background: transparent;
    color: var(--txt-main);
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--border-light);
    transition: all 0.3s;
}

.btn-auth-outline:hover { border-color: var(--app-primary); color: var(--app-primary); }

.mini-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mini-cart-items::-webkit-scrollbar {
    display: none;
}

.mini-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    margin-bottom: 1rem;
    position: relative;
}

.mini-cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card);
}

.mini-cart-item-image img { width: 100%; height: 100%; object-fit: contain; }

.mini-cart-item-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }

.mini-cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--txt-main);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.mini-cart-quantity-controls {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--border-light);
    width: fit-content;
}

.mini-cart-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--txt-main);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-cart-qty-btn:hover { background: var(--border-light); }

.mini-cart-qty-input { width: 30px; text-align: center; border: none; background: transparent; font-weight: 600; color: var(--txt-main); padding: 0; }

.btn-action {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
    margin-bottom: 0.75rem;
}

.btn-primary-action { background: var(--app-primary); color: white; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25); }
.btn-primary-action:hover { background: var(--app-primary-dark); transform: translateY(-2px); color: white; }
.btn-outline-action { background: transparent; border: 2px solid var(--border-light); color: var(--txt-main); }
.btn-outline-action:hover { border-color: var(--app-primary); color: var(--app-primary); }

.footer { background: var(--bg-card); border-top: 1px solid var(--border-light); padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-title { color: var(--txt-main); font-weight: 700; margin-bottom: 1.5rem; font-size: 1.1rem; }
.footer-links a { color: var(--txt-sub); text-decoration: none; display: block; margin-bottom: 0.75rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--app-primary); }

.sidebar-content::-webkit-scrollbar {
    display: none;
}

.nova-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.nova-modal.show {
    opacity: 1;
}

.nova-modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: auto;
}



#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-body); 
  z-index: 99999; 
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--border-light);
  border-top: 5px solid var(--app-primary); 
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.sg-search-sidebar [x-cloak]{display:none!important}
.sg-search-sidebar .sidebar-content{padding:1.25rem 1.1rem;display:flex;flex-direction:column;gap:1.1rem;overflow-y:auto}
.sg-search-form{margin:0}
.sg-search-input-wrapper{position:relative;display:flex;align-items:center}
.sg-search-input-wrapper .sg-search-icon{position:absolute;left:1rem;color:var(--txt-muted);font-size:1rem;pointer-events:none}
.sg-search-input{width:100%;padding:.95rem 2.6rem .95rem 2.8rem;border:2px solid var(--border-light);border-radius:14px;font-size:.95rem;background:var(--bg-body);color:var(--txt-main);transition:all .2s ease;outline:none}
.sg-search-input:focus{border-color:var(--app-primary);box-shadow:0 0 0 4px rgba(59,130,246,.12);background:var(--bg-card)}
.sg-search-input::-webkit-search-cancel-button{display:none}
.sg-search-clear{position:absolute;right:.85rem;background:none;border:none;color:var(--txt-muted);cursor:pointer;padding:.25rem;font-size:1.05rem;transition:color .2s}
.sg-search-clear:hover{color:var(--app-accent)}
.sg-search-loading{display:flex;flex-direction:column;gap:.75rem}
.sg-search-skeleton{display:flex;gap:.85rem;padding:.75rem;background:var(--bg-card);border-radius:12px;align-items:center}
.sg-skeleton-img{width:56px;height:56px;border-radius:10px;background:linear-gradient(90deg,var(--border-light) 0%,rgba(255,255,255,.35) 50%,var(--border-light) 100%);background-size:200% 100%;animation:sgSkeleton 1.4s ease-in-out infinite}
.sg-skeleton-text{flex:1;display:flex;flex-direction:column;gap:.5rem}
.sg-skeleton-line{height:10px;border-radius:6px;background:linear-gradient(90deg,var(--border-light) 0%,rgba(255,255,255,.35) 50%,var(--border-light) 100%);background-size:200% 100%;animation:sgSkeleton 1.4s ease-in-out infinite;width:80%}
.sg-skeleton-line.sg-skeleton-sm{width:55%;height:8px}
@keyframes sgSkeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}
.sg-search-recent{display:flex;flex-direction:column;gap:.6rem}
.sg-search-recent-head{display:flex;align-items:center;justify-content:space-between;font-size:.85rem;font-weight:700;color:var(--txt-main)}
.sg-search-recent-head i{color:var(--app-primary);margin-right:.35rem}
.sg-search-clear-recent{background:none;border:none;color:var(--txt-muted);font-size:.78rem;cursor:pointer;padding:.15rem .3rem;font-weight:600;transition:color .2s}
.sg-search-clear-recent:hover{color:var(--app-accent)}
.sg-search-recent-list{display:flex;flex-wrap:wrap;gap:.45rem}
.sg-recent-chip{display:inline-flex;align-items:center;gap:.4rem;background:var(--bg-card);border:1px solid var(--border-light);border-radius:999px;padding:.4rem .85rem;font-size:.8rem;color:var(--txt-main);cursor:pointer;transition:all .2s ease}
.sg-recent-chip i{font-size:.7rem;color:var(--txt-muted)}
.sg-recent-chip:hover{border-color:var(--app-primary);color:var(--app-primary);transform:translateY(-1px)}
.sg-recent-chip:hover i{color:var(--app-primary)}
.sg-search-empty{text-align:center;padding:2.5rem 1rem;color:var(--txt-muted);display:flex;flex-direction:column;align-items:center;gap:.65rem}
.sg-search-empty-icon{width:74px;height:74px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,rgba(59,130,246,.12),rgba(139,92,246,.12));color:var(--app-primary);font-size:1.75rem;margin-bottom:.25rem}
.sg-search-empty-icon.sg-no-results{background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(245,158,11,.12));color:#dc2626}
.sg-search-empty h4{color:var(--txt-main);font-size:1.05rem;font-weight:700;margin:0}
.sg-search-empty p{margin:0;font-size:.88rem;line-height:1.5;max-width:320px}
.sg-search-tips{list-style:none;padding:0;margin:.5rem 0 .75rem;font-size:.82rem;text-align:left;color:var(--txt-sub)}
.sg-search-tips li{padding:.2rem 0 .2rem 1.2rem;position:relative}
.sg-search-tips li::before{content:"•";color:var(--app-primary);position:absolute;left:.4rem;font-weight:700}
.sg-search-tips-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1.1rem;background:var(--app-primary);color:#fff;border-radius:10px;text-decoration:none;font-weight:600;font-size:.85rem;transition:all .2s;margin-top:.25rem}
.sg-search-tips-btn:hover{background:var(--secondary-accent);transform:translateY(-1px)}
.sg-search-section-title{display:flex;align-items:center;justify-content:space-between;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--txt-muted);padding:0 .15rem .4rem;border-bottom:1px solid var(--border-light);margin-bottom:.55rem}
.sg-total-pill{background:rgba(59,130,246,.1);color:var(--app-primary);padding:.15rem .55rem;border-radius:999px;font-size:.7rem;font-weight:700;letter-spacing:0;text-transform:none}
.sg-search-categories{display:flex;flex-direction:column;gap:.4rem}
.sg-search-chips{display:flex;flex-wrap:wrap;gap:.4rem}
.sg-cat-chip{display:inline-flex;align-items:center;gap:.5rem;padding:.45rem .75rem;background:var(--bg-card);border:1px solid var(--border-light);border-radius:10px;color:var(--txt-main);font-size:.82rem;text-decoration:none;transition:all .2s}
.sg-cat-chip:hover{border-color:var(--app-primary);background:rgba(59,130,246,.06);color:var(--app-primary);transform:translateY(-1px)}
.sg-cat-count{background:rgba(59,130,246,.12);color:var(--app-primary);border-radius:999px;padding:.05rem .45rem;font-size:.7rem;font-weight:700}
.sg-search-results{display:flex;flex-direction:column;gap:.45rem}
.search-result-item{display:flex;gap:.85rem;align-items:stretch;padding:.7rem;border-radius:12px;background:var(--bg-card);border:1px solid transparent;text-decoration:none;color:inherit;transition:all .2s ease;cursor:pointer}
.search-result-item:hover,.search-result-item.is-active{background:var(--bg-body);border-color:var(--app-primary);transform:translateY(-1px);box-shadow:0 6px 18px rgba(59,130,246,.08)}
.search-result-img{position:relative;flex-shrink:0;width:62px;height:62px;border-radius:10px;overflow:hidden;background:var(--bg-body);border:1px solid var(--border-light)}
.search-result-img img{width:100%;height:100%;object-fit:contain;padding:4px}
.sg-result-badge{position:absolute;top:3px;left:3px;background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;font-size:.62rem;font-weight:800;padding:.1rem .35rem;border-radius:6px;letter-spacing:.02em}
.search-result-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem;padding:.1rem 0}
.search-result-name{font-weight:600;font-size:.9rem;line-height:1.3;color:var(--txt-main);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sg-search-mark{background:rgba(250,204,21,.45);color:inherit;padding:0 2px;border-radius:3px;font-weight:700}
.search-result-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;font-size:.75rem;color:var(--txt-muted)}
.sg-meta-brand{color:var(--app-primary);font-weight:600}
.sg-meta-sep{color:var(--border-light)}
.search-result-footer{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-top:auto}
.sg-price-current{font-weight:800;color:var(--txt-main);font-size:.92rem}
.sg-price-old{color:var(--txt-muted);text-decoration:line-through;font-size:.78rem}
.sg-stock-badge{font-size:.66rem;font-weight:700;padding:.12rem .45rem;border-radius:6px;letter-spacing:.02em}
.sg-stock-badge.in-stock{background:rgba(16,185,129,.12);color:#059669}
.sg-stock-badge.out-stock{background:rgba(100,116,139,.12);color:#64748b}
.sg-search-sidebar .sidebar-footer{padding:.85rem 1rem;border-top:1px solid var(--border-light);background:var(--bg-card)}
.sg-search-sidebar .sidebar-footer .btn-action{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:.55rem;padding:.85rem 1rem;background:linear-gradient(135deg,var(--app-primary),var(--secondary-accent));color:#fff;border-radius:12px;text-decoration:none;font-weight:700;font-size:.92rem;transition:all .25s}
.sg-search-sidebar .sidebar-footer .btn-action:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(59,130,246,.28)}
@media (max-width:480px){.sg-search-input{font-size:.88rem;padding:.85rem 2.4rem .85rem 2.6rem}.search-result-img{width:54px;height:54px}.search-result-name{font-size:.85rem}}

/* ---------------------------------------------------------------------------
   Быстрые ссылки (разделы сайта) — блок в подвале.
   Это обычные ссылки, видимые роботу: на их основе Яндекс формирует
   быстрые ссылки в поисковой выдаче.
   --------------------------------------------------------------------------- */
.sg-quick-links {
    margin-top: 1.5rem;
}

.sg-quick-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.sg-quick-links__link {
    color: var(--txt-sub, #6b7280);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.sg-quick-links__link:hover,
.sg-quick-links__link:focus-visible {
    color: var(--app-primary, #10b981);
    text-decoration: underline;
}

.sg-quick-links__link i {
    margin-right: 0.35rem;
    opacity: 0.75;
}

@media (max-width: 575.98px) {
    .sg-quick-links__list {
        gap: 0.4rem 0.9rem;
    }

    .sg-quick-links__link {
        font-size: 0.82rem;
    }
}
