/* ============================================
   LIGHT THEME
   Переопределение переменных для светлой темы
============================================ */

body.light-theme {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eaeaea;
    --text-primary: #1a1a1a;
    --text-muted: #666666;
    --text-dark: #999999;
    --highlight: #1a1a1a;
    --accent: #c45c26;
    --accent-light: #d4693a;
    --accent-dark: #a04a1e;
}

/* ============================================
   COMPONENT OVERRIDES
============================================ */

/* Noise overlay - уменьшаем для светлой темы */
body.light-theme .noise-overlay {
    opacity: 0.015;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Header */
body.light-theme .header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

body.light-theme .logo span {
    color: var(--text-primary);
}

body.light-theme .desktop-nav a {
    color: var(--text-muted);
}

body.light-theme .desktop-nav a:hover {
    color: var(--text-primary);
}

body.light-theme .header-cta {
    background: var(--accent);
    color: #ffffff;
}

body.light-theme .menu-toggle span {
    background: var(--text-primary);
}

/* Hero section */
body.light-theme .hero {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

body.light-theme .hero-bg-pattern {
    opacity: 0.03;
}

body.light-theme .hero-badge {
    background: rgba(196, 92, 38, 0.1);
    border: 1px solid rgba(196, 92, 38, 0.2);
}

body.light-theme .hero-subtitle {
    color: var(--text-muted);
}

body.light-theme .btn-outline {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

body.light-theme .btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-secondary);
}

body.light-theme .scroll-indicator span {
    color: var(--text-muted);
}

body.light-theme .scroll-line {
    background: linear-gradient(to bottom, var(--accent), transparent);
}

/* Trust section */
body.light-theme .trust {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .trust-icon {
    background: rgba(196, 92, 38, 0.1);
}

body.light-theme .trust-item:not(:last-child)::after {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), transparent);
}

/* Marquee */
body.light-theme .marquee-section {
    background: var(--bg-tertiary);
}

body.light-theme .marquee-item.stroke {
    -webkit-text-stroke-color: var(--text-muted);
}

body.light-theme .marquee-dot {
    background: var(--accent);
}

/* About section */
body.light-theme .about {
    background: var(--bg-primary);
}

body.light-theme .about-text {
    color: var(--text-muted);
}

body.light-theme .about-feature-icon {
    background: rgba(196, 92, 38, 0.1);
    border-color: rgba(196, 92, 38, 0.2);
}

body.light-theme .about-image-wrapper {
    background: var(--bg-secondary);
}

body.light-theme .about-image-label {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

/* Stats section */
body.light-theme .stats {
    background: var(--accent);
}

/* Products section */
body.light-theme .products {
    background: var(--bg-secondary);
}

body.light-theme .product-card {
    background: var(--bg-primary);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .product-card:hover {
    border-color: rgba(196, 92, 38, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

body.light-theme .product-index {
    color: rgba(0, 0, 0, 0.08);
}

body.light-theme .product-image {
    background: var(--bg-tertiary);
}

body.light-theme .product-specs {
    color: var(--text-muted);
}

body.light-theme .product-btn {
    background: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .product-btn svg {
    stroke: var(--text-primary);
}

/* Advantages section */
body.light-theme .advantages {
    background: var(--bg-primary);
}

body.light-theme .advantages-bg-text {
    -webkit-text-stroke-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .advantage-item {
    background: var(--bg-secondary);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .advantage-item:hover {
    border-color: rgba(196, 92, 38, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

body.light-theme .advantage-number {
    -webkit-text-stroke-color: rgba(196, 92, 38, 0.3);
}

body.light-theme .advantage-content p {
    color: var(--text-muted);
}

/* CTA section */
body.light-theme .cta {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .cta-phone {
    background: var(--bg-secondary);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Footer */
body.light-theme .footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .footer-desc {
    color: var(--text-muted);
}

body.light-theme .footer-column h4 {
    color: var(--text-primary);
}

body.light-theme .footer-links a {
    color: var(--text-muted);
}

body.light-theme .footer-links a:hover {
    color: var(--accent);
}

body.light-theme .footer-contact span {
    color: var(--text-muted);
}

body.light-theme .footer-socials a {
    background: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .footer-socials a svg {
    fill: var(--text-muted);
}

body.light-theme .footer-socials a:hover {
    background: var(--accent);
    border-color: var(--accent);
}

body.light-theme .footer-socials a:hover svg {
    fill: #ffffff;
}

body.light-theme .footer-bottom {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .footer-copy {
    color: var(--text-muted);
}

/* Modal */
body.light-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

body.light-theme .modal {
    background: var(--bg-secondary);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-close {
    color: var(--text-muted);
}

body.light-theme .modal-close:hover {
    color: var(--text-primary);
}

body.light-theme .modal-subtitle {
    color: var(--text-muted);
}

body.light-theme .form-label {
    color: var(--text-muted);
}

body.light-theme .form-input,
body.light-theme .form-select {
    background: var(--bg-primary);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-theme .form-input:focus,
body.light-theme .form-select:focus {
    border-color: var(--accent);
}

body.light-theme .form-input::placeholder {
    color: var(--text-dark);
}

body.light-theme .form-note {
    color: var(--text-muted);
}

/* Mobile menu */
body.light-theme .mobile-menu {
    background: var(--bg-secondary);
}

body.light-theme .mobile-menu a {
    color: var(--text-primary);
}

body.light-theme .menu-contact a {
    color: var(--accent);
}

/* Loader */
body.light-theme .loader {
    background: var(--bg-primary);
}

/* Custom cursor - инвертируем для светлой темы */
body.light-theme .cursor {
    background: rgba(26, 26, 26, 0.15);
    border-color: rgba(26, 26, 26, 0.3);
}

/* Theme toggle button */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    display: none; /* Hidden for now */
    /* display: flex; */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    margin-right: 1rem;
}

.theme-toggle::before,
.theme-toggle::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    transition: all 0.3s var(--ease-out-expo);
    pointer-events: none;
}

.theme-toggle::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.theme-toggle::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle:hover {
    background: rgba(196, 92, 38, 0.1);
    border-color: rgba(196, 92, 38, 0.3);
}

.theme-toggle:hover::before,
.theme-toggle:hover::after {
    width: 12px;
    height: 12px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s var(--ease-out-expo);
}

/* Sun icon (visible in dark mode) */
.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

/* Moon icon (visible in light mode) */
body.light-theme .theme-toggle .icon-sun {
    display: none;
}

body.light-theme .theme-toggle .icon-moon {
    display: block;
}

body.light-theme .theme-toggle {
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .theme-toggle::after {
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .theme-toggle:hover {
    background: rgba(196, 92, 38, 0.1);
    border-color: rgba(196, 92, 38, 0.3);
}

/* Transition for smooth theme change */
body.theme-transition,
body.theme-transition *,
body.theme-transition *::before,
body.theme-transition *::after {
    transition: background-color 0.4s ease,
                border-color 0.4s ease,
                color 0.4s ease,
                box-shadow 0.4s ease,
                fill 0.4s ease,
                stroke 0.4s ease !important;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
}
