/* Стили для баннеров */
.banner {
    margin: 15px 0;
    text-align: center;
}

.banner-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.banner-text {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
}

/* Адаптивность баннеров */
@media (max-width: 768px) {
    .banner-sidebar_top,
    .banner-sidebar_bottom {
        display: none; /* Скрываем баннеры в сайдбаре на мобильных */
    }
}

/* ============================================
   Базовые стили Cat Shop
   ============================================ */

/* Сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

/* Шапка */
.site-header {
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Логотип */
.site-logo {
    flex-shrink: 0;
}

.site-logo-img {
    max-height: 50px;
    width: auto;
    display: block;
}

.logo-text {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-name {
    color: var(--text-color, #1e293b);
    transition: color 0.3s ease;
}

.logo-text:hover .logo-name {
    color: var(--primary-color, #3b82f6);
}

/* Навигация */
.main-nav ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: inline-block;
}

.main-nav a.active {
    background: var(--primary-color, #3b82f6);
    color: white !important;
}

.main-nav a.active:hover {
    background: var(--link-hover-color, #2563eb);
    transform: translateY(-2px);
}

.main-nav a:not(.active):hover {
    background: rgba(59,130,246,0.1);
    transform: translateY(-2px);
}

/* Действия в шапке */
.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-actions a {
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.cart-link {
    position: relative;
}

/* Пользовательское меню */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 13px;
}

.user-dropdown a:hover {
    background: #f8fafc;
}

.user-dropdown .logout-link {
    color: #ef4444;
    border-top: 1px solid #f1f5f9;
}

/* Flash сообщения */
.flash-message {
    position: fixed;
    top: 90px;
    right: 20px;
    max-width: 400px;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.flash-error {
    background: #fee2e2;
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.flash-info {
    background: #e0f2fe;
    color: #0369a1;
    border-left: 4px solid #0ea5e9;
}

.flash-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    margin-left: auto;
}

.flash-close:hover {
    opacity: 1;
}

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

/* Подвал */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color, #3b82f6);
}

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

.footer-section li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    text-decoration: underline;
}

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

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
}

.footer-developer {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.7;
}

.footer-developer i {
    color: #ef4444;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color, #3b82f6);
    color: var(--primary-color, #3b82f6);
}

.btn-outline:hover {
    background: var(--primary-color, #3b82f6);
    color: white;
}

/* Карточки товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-section li {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .flash-message {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}