/* Fonts */
@font-face {
    font-family: 'Sansation';
    src: url('../fonts/Sansation-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sansation';
    src: url('../fonts/Sansation-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
} 

@font-face {
    font-family: 'Sansation';
    src: url('../fonts/Sansation-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AGOpt Cyrillic';
    src: url('../fonts/agopt-cyrillic-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AGOpt Cyrillic';
    src: url('../fonts/agopt-cyrillic-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables: Global Color Palette */
:root {
    /* Base */
    --mm-color-bg: #ffffff;
    --mm-color-text: #333333;
    --mm-color-text-muted: #666666;
    --mm-color-text-light: #999999;

    /* Primary / Accent */
    --mm-color-primary: #000000;
    --mm-color-primary-hover: #333333;
    --mm-color-accent: #ff4500;

    /* Border / Surfaces */
    --mm-color-border: #e0e0e0;
    --mm-color-border-soft: #f5f5f5;
    --mm-color-surface: #ffffff;
    --mm-color-surface-muted: #f8f8f8;
    --mm-color-surface-alt: #fafafa;

    /* State */
    --mm-color-error: #d32f2f;

    /* Specials */
    --mm-color-blue: #2563eb;
    --mm-color-blue-hover: #1d4ed8;
    --mm-color-placeholder: #9ca3af;

     /* Small flat button */
     --mm-color-flat-btn-text-active: #333333;
     --mm-color-flat-btn-bg-active: #f5f5f5;
     --mm-color-flat-btn-text-disabled: #BBBBBB;
     --mm-color-flat-btn-bg-disabled: #f8f8f8;
}


body {
    font-family: 'Sansation', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.2px;
    color: var(--mm-color-text);
    background-color: var(--mm-color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Компенсация для fixed header */
}

/* Header Styles */
.site-header {
    background-color: var(--mm-color-bg);
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease;
    transform: translateY(0);
}

.site-header.scrolled {
    box-shadow: rgba(0, 0, 0, 0.08) 0 2px 5px;
}

.site-header.hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in;
}

.header-container {
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.header-logo {
    flex-shrink: 0;
}

.logo-link {
    /* display: inline-block; */
    text-decoration: none;
}

.logo-image {
    height: 21px;
    width: auto;
    max-width: 181px;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.icon-img {
    width: 25px;
    height: 25px;
    display: block;
}

.cart-badge {
    position: absolute;
    top: -11px;
    right: -11px;
    background-color: var(--mm-color-accent);
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 11px;
    padding: 4px;
}

.cart-badge:empty {
    display: none;
}

.account-icon {
    position: relative;
}

.account-menu {
    position: absolute;
    top: calc(100% + 19px);
    right: -16px;
    background: #fafafa;
    border-radius: 6px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1001;
    pointer-events: none;
}

.account-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-arrow {
    position: absolute;
    top: -10px;
    right: 17px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #fafafa;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    margin: 0;
}

/* Ссылки используют базовые стили из common.css */
.menu-list a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
    color: var(--mm-color-text-muted);
}

.menu-list a:hover {
    background-color: var(--mm-color-bg);
    color: var(--mm-color-primary);
}

/* Main Content */
.site-main {
    flex: 1;
    /* padding: 40px 0; */
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.page-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.home-page {
    text-align: center;
    padding: 0 0 80px 0;
} 

.home-page .page-container {
    max-width: initial;
    margin: 0 auto;
    padding: 0;
} 

.page-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--mm-color-text);
}

.page-description {
    font-size: 1.2rem;
    color: var(--mm-color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer Styles */
.site-footer {
    background-color: var(--mm-color-surface-muted);
    margin-top: auto;
    padding: 50px 0 20px;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: row;
    gap: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    gap: 15px;
    flex: 1 1 250px;
    min-width: 250px;
}

.footer-logo {
    margin-bottom: 10px;
}

.footer-logo .logo-image {
    height: 21px;
}

.footer-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: row;
    gap: 50px;
    flex: 2 1 600px;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 150px;
    min-width: 150px;
}

.footer-title {
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #333;
    letter-spacing: 0.5px;
}

.footer-list {
    list-style: none;
}

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

/* Ссылки используют базовые стили из common.css */
.footer-list a {
    font-size: 0.9rem;
    transition: color 0.2s;
}

/* .footer-list a:hover - color убран, наследует цвет от родителя */

.footer-bottom {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 40px 0;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #999;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-container {
        gap: 40px;
    }
    
    .footer-brand {
        flex: 1 1 100%;
    }
    
    .footer-links {
        flex: 1 1 100%;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .modal-content {
        max-height: inherit!important;
    }

    .header-container {
        padding: 0 20px;
        height: 70px;
    }
    
    .header-nav {
        gap: 20px;
    }
    
    .page-container {
        padding: 0 40px;
    }
    
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    
    .footer-brand {
        flex: 1 1 100%;
    }
    
    .footer-links {
        flex-direction: column;
        flex: 1 1 100%;
        gap: 30px;
    }
    
    .footer-column {
        flex: 1 1 100%;
    }
    
    .footer-bottom {
        padding: 20px 20px 0;
    }

    form .half-width,
    form .third-width,
    form .quarter-width {
        max-width: initial!important;
    }
}

@media (max-width: 480px) { 

    
    .page-title {
        font-size: 1.75rem;
    }
}
