:root {
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 15px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Arial', sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

.logo h1 a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

nav ul li a i {
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 280px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.search-container button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.auth-buttons a {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.login-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.register-btn {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.auth-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.header-icon {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.header-icon:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MAIN CONTENT ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
    flex: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ===== BANNER ===== */
.banner {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1625246339666-3c6eed5c4a75?ixlib=rb-4.0.3');
    background-size: cover;
    background-position: center;
    height: 500px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.banner-content {
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.banner-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.banner-btn {
    padding: 1.2rem 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ===== CATEGORIES ===== */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.category-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.category-img {
    height: 200px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 4rem;
}

.category-info {
    padding: 2rem;
    text-align: center;
}

.category-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.category-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== PRODUCTS ===== */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff5722;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.badge-new {
    background: #4caf50;
}

.badge-hit {
    background: #ff9800;
}

.product-img {
    height: 250px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-img img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.08);
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: var(--shadow);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 2rem;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.4;
    font-weight: 600;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-rating i {
    color: #ffc107;
    font-size: 1.1rem;
}

.product-reviews {
    font-size: 0.9rem;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.product-price .current {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price .old {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions-bottom {
    display: flex;
    gap: 1rem;
}

.product-btn {
    padding: 0.9rem 1.5rem;
    border: 2px solid;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex: 1;
    gap: 0.5rem;
}

.details-btn {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

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

.buy-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
    background: white;
    padding: 4rem 5% 2rem;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-section a i {
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-color);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: var(--transition);
}

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

/* ===== FORMS ===== */
.form-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-submit {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.required {
    color: #e53935;
}

.error-message {
    background: #ffebee;
    color: #e53935;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid #e53935;
}

.success-message {
    background: #e8f5e9;
    color: #43a047;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid #43a047;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .header-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner-content h2 {
        font-size: 2.2rem;
    }
    
    .banner-content p {
        font-size: 1.1rem;
    }
    
    .categories,
    .products {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .search-container input {
        width: 200px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .product-actions-bottom {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-right {
        flex-direction: column;
        width: 100%;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: stretch;
    }
    
    .auth-buttons a {
        flex: 1;
        justify-content: center;
    }
    
    .banner {
        height: 350px;
    }
    
    .banner-content h2 {
        font-size: 1.8rem;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== SELECTION ===== */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.empty-state p {
    margin-bottom: 2rem;
}

/* ===== CONTACTS ===== */
.contacts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.contact-form-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.map-container {
    margin: 3rem 0;
}

.map-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.map-placeholder {
    height: 300px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.map-info {
    text-align: center;
    z-index: 2;
}

.map-info i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.map-info h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.departments {
    margin: 3rem 0;
}

.departments h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.5rem;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.department-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.department-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.department-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.department-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

@media (max-width: 968px) {
    .contacts-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .map-placeholder {
        height: 250px;
    }
    
    .map-info i {
        font-size: 2.5rem;
    }
}

/* ===== ФИЛЬТРЫ ===== */
.filters {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 3rem;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-title h3 {
    color: var(--text-color);
    font-size: 1.3rem;
}

.filter-title button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-option {
    padding: 0.6rem 1.2rem;
    background: var(--secondary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.filter-option:hover,
.filter-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.price-range {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.price-range input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.price-range input:focus {
    outline: none;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .filters {
        padding: 1.5rem;
    }
    
    .filter-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-option {
        margin-bottom: 0.5rem;
    }
}

/* ===== УВЕДОМЛЕНИЯ (МАЛЕНЬКИЕ, АККУРАТНЫЕ) ===== */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2e7d32;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    z-index: 10000;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    animation: fadeInRight 0.3s ease;
    font-family: Arial, sans-serif;
}

.notification i {
    font-size: 14px;
}

.notification.error {
    background: #e74c3c;
}

.notification.success {
    background: #2e7d32;
}

.notification.info {
    background: #2196f3;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.fade-out {
    animation: fadeOutRight 0.3s ease forwards;
}

@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ===== ПРЕДОТВРАЩЕНИЕ МИГАНИЯ ===== */
body:not(.loaded) .fade-in,
body:not(.loaded) .blog-card,
body:not(.loaded) .product-card,
body:not(.loaded) .category-card,
body:not(.loaded) [data-aos] {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: none !important;
    visibility: hidden !important;
}

body.loaded .fade-in,
body.loaded .blog-card,
body.loaded .product-card,
body.loaded .category-card,
body.loaded [data-aos] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

body {
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-loading body {
    visibility: hidden;
}

.font-loaded body {
    visibility: visible;
}

.blog-card, .product-card, .category-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.3s ease;
}

body.loaded .blog-card,
body.loaded .product-card,
body.loaded .category-card {
    opacity: 1;
    transform: translateY(0);
}

.review-notice {
    background: #e3f2fd;
    color: #1565c0;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}
.review-notice i {
    margin-right: 8px;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */

/* Планшеты и телефоны */
@media (max-width: 992px) {
    .container {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* Телефоны */
@media (max-width: 768px) {
    .hero {
        padding: 2rem;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Адаптация формы контактов */
    .contacts-container {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    /* Адаптация карточки товара */
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 180px;
    }
    
    /* Модальное окно на телефоне */
    .modal-order-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .hero {
        padding: 1.5rem;
    }
    
    .hero-text h1 {
        font-size: 1.4rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        text-align: center;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
    
    .price-inputs {
        flex-wrap: wrap;
    }
    
    .price-inputs input {
        width: calc(50% - 10px);
    }
    
    .product-buttons {
        flex-direction: column;
    }
    
    .btn-call, .btn-order {
        width: 100%;
    }
    
    .btn-details {
        width: 100%;
        padding: 0.6rem;
    }
    
    /* Хлебные крошки */
    .breadcrumbs {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
    
    /* Таблицы в админке */
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Фильтры */
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Адаптация для очень широких экранов */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* ============================================ */
/* ===== ГЛОБАЛЬНАЯ АДАПТАЦИЯ ДЛЯ ВСЕХ ЭКРАНОВ ===== */
/* ============================================ */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Телефоны (до 768px) */
@media (max-width: 768px) {
    /* Общие */
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Hero секция */
    .hero {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-text h1 {
        font-size: 1.6rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        justify-content: center;
        text-align: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .hero-image-placeholder {
        height: 200px;
        font-size: 4rem;
    }
    
    /* Категории */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .category-card h3 {
        font-size: 0.9rem;
    }
    
    /* Товары */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    /* Преимущества */
    .advantages {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .advantage-card h3 {
        font-size: 1rem;
    }
    
    .advantage-card p {
        font-size: 0.8rem;
    }
    
    /* Фильтры */
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filters-panel {
        padding: 1rem;
    }
    
    .price-inputs input {
        width: calc(50% - 10px);
    }
    
    /* Контакты */
    .contacts-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        padding: 1rem;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    /* Подвал */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-section ul li a {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Корзина */
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cart-item-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.8rem;
    }
    
    .cart-item-image {
        margin: 0 auto;
    }
    
    .quantity-selector {
        justify-content: center;
    }
    
    .cart-actions-bottom {
        flex-direction: column;
    }
    
    /* Оформление заказа */
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Личный кабинет */
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .profile-sidebar {
        position: static;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Модальное окно */
    .modal-order-content {
        width: 95%;
        padding: 1.2rem;
    }
    
    /* Хлебные крошки */
    .breadcrumbs {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
    
    /* Пагинация */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Карточка товара (product.php) */
    .product-detail-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: left;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Блог */
    .blog-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .blog-post-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Страница товара */
    .product-actions-block {
        flex-direction: column;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .btn-wishlist {
        width: 100%;
    }
}

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.3rem;
    }
    
    .hero-text h1 {
        font-size: 1.3rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .category-card h3 {
        font-size: 0.8rem;
    }
    
    .product-name {
        font-size: 0.85rem;
    }
    
    .current-price {
        font-size: 0.9rem;
    }
    
    .filter-group label {
        font-size: 0.8rem;
    }
    
    .filter-search input,
    .filter-sort select {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .price-inputs input {
        font-size: 0.8rem;
    }
    
    .modal-order-content h2 {
        font-size: 1.2rem;
    }
    
    .order-summary-card {
        padding: 1rem;
    }
    
    .total-amount {
        font-size: 1.1rem;
    }
}

/* Очень широкие экраны (больше 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        margin: 0 auto;
    }
    
    .hero-content {
        gap: 4rem;
    }
    
    .products-grid {
        gap: 2rem;
    }
}

/* Альбомная ориентация на телефонах */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 1rem;
    }
    
    .hero-image-placeholder {
        height: 150px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Улучшение читаемости на мобильных */
@media (max-width: 768px) {
    input, select, textarea, button {
        font-size: 16px !important; /* Предотвращает масштабирование на iOS */
    }
}

/* Плавные переходы для адаптивности */
* {
    transition: all 0.2s ease-in-out;
}

/* Убираем горизонтальный скролл */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Все изображения адаптивны */
img {
    max-width: 100%;
    height: auto;
}

/* Таблицы на мобильных */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}