/* ============================================================
   MAIN.CSS - ОСНОВНЫЕ СТИЛИ
   Reset, базовые стили, общие компоненты
   ============================================================ */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1e1e1e;
    color: #e0e0e0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== HEADER ===== */
.header {
    background: #2d2d2d;
    padding: 12px 0;
    border-bottom: 1px solid #4a4a4a;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.header__logo {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.header__logo span {
    color: #8a8a8a;
    font-weight: 300;
}

.header__logo a {
    text-decoration: none;
    color: #f0f0f0;
}

.header__contacts {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__phone {
    color: #ffffff;
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.header__phone:hover {
    color: #ffffff;
}

.header__phone i {
    color: #6a6a6a;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: #4a4a4a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #6a6a6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #4a4a4a;
}

.btn-secondary:hover {
    background: #4a4a4a;
    transform: translateY(-2px);
}

.btn--primary {
    background: #3a3a3a;
    color: #f0f0f0;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
}

.btn--primary:hover {
    background: #4a4a4a;
    transform: translateY(-1px);
}

/* ===== SECTION ===== */
section {
    padding: 0px 0;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: #f0f0f0;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #3a3a3a;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.product-card__image {
    height: 200px;
    background: #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__placeholder {
    font-size: 48px;
    color: #5a5a5a;
}

.product-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-new {
    background: rgba(58, 186, 106, 0.2);
    color: #3aba6a;
    border: 1px solid rgba(58, 186, 106, 0.3);
}

.badge-popular {
    background: rgba(186, 170, 58, 0.2);
    color: #baaa3a;
    border: 1px solid rgba(186, 170, 58, 0.3);
}

.product-card__content {
    padding: 20px;
}

.product-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 8px;
}

.product-card__title a:hover {
    color: #8a8a8a;
}

.product-card__price {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.product-card__old-price {
    font-size: 14px;
    color: #6a6a6a;
    text-decoration: line-through;
    margin-top: 2px;
}

.product-card__stock {
    margin-bottom: 8px;
}

.stock-label {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.stock-label.in-stock {
    background: rgba(58, 186, 106, 0.15);
    color: #3aba6a;
}

.stock-label.out-of-stock {
    background: rgba(186, 58, 58, 0.15);
    color: #ba3a3a;
}

.product-card__more {
    margin-top: 12px;
    color: #8a8a8a;
    font-size: 14px;
    transition: color 0.3s;
}

.product-card__more:hover {
    color: #d0d0d0;
}

.product-card__link {
    color: #8a8a8a;
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
}

.product-card__link:hover {
    color: #ffffff;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    max-width: 400px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background: #1a3a2a;
    border: 1px solid #2a5a3a;
}

.notification.error {
    background: #3a1a1a;
    border: 1px solid #5a2a2a;
}

/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦ
   ============================================================ */

/* ===== CATALOG ===== */
.catalog {
    padding: 60px 0;
    background: #232323;
}

.catalog__subtitle {
    text-align: center;
    color: #b0b0b0;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.catalog-item {
    background: #2a2a2a;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #3a3a3a;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.catalog-item:hover {
    transform: translateY(-4px);
    border-color: #6a6a6a;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    background: #303030;
}

.catalog-item__image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 8px;
    background: #1e1e1e;
}

.catalog-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-item__placeholder {
    font-size: 48px;
    color: #4a4a4a;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-item__name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f0f0f0;
}

.catalog-item__count {
    font-size: 0.9rem;
    color: #8a8a8a;
}

.catalog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #8a8a8a;
}

/* ===== CATEGORY PAGE ===== */
.category-page {
    padding: 40px 0;
    background: #232323;
}

.category-header {
    margin-bottom: 40px;
    text-align: center;
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: #f0f0f0;
    margin-bottom: 8px;
}

.category-description {
    color: #b0b0b0;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.category-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8a8a8a;
}

.category-empty p {
    font-size: 18px;
    margin-bottom: 16px;
}

/* ============================================================
   ФУТЕР
   ============================================================ */

.footer {
    background: #151515;
    padding: 40px 0 30px;
    border-top: 1px solid #2a2a2a;
}

.footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__logo {
    font-size: 1.1rem;
    color: #f0f0f0;
}

.footer__logo span {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6a6a6a;
    display: block;
}

.footer__copy {
    font-size: 0.8rem;
    color: #5a5a5a;
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__contacts a,
.footer__contacts span {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.footer__contacts a:hover {
    color: #f0f0f0;
}

.footer__contacts i {
    color: #5a5a5a;
    width: 18px;
}

.footer__menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer__menu a {
    color: #8a8a8a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer__menu a:hover {
    color: #f0f0f0;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 992px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 0 16px;
    }
    
    .header__logo {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .header__logo span {
        display: block;
        font-size: 0.7rem;
    }
    
    .header__contacts {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .header__phone {
        font-size: 0.85rem;
    }
    
    .btn--primary {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .footer .container {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .footer__contacts a,
    .footer__contacts span {
        justify-content: center;
    }
    
    .footer__menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .catalog-item {
        padding: 24px 12px;
    }
    
    .catalog-item__name {
        font-size: 1rem;
    }
    
    .category-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .catalog-item {
        padding: 16px 12px;
    }
    
    .catalog-item__image {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .header__logo {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .footer {
        padding: 30px 0 20px;
    }
    
    .footer__logo {
        font-size: 0.95rem;
    }
    
    .footer__contacts a,
    .footer__contacts span {
        font-size: 0.8rem;
    }
    
    .footer__menu a {
        font-size: 0.8rem;
    }
}