/* shop.css – стили для интернет-магазина Tesla Parts */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f9fafb;
    color: #1f2937;
}

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

/* ========== ШАПКА И НАВИГАЦИЯ ========== */
.top-bar {
    background: #1f2937;
    color: #9ca3af;
    padding: 8px 0;
    font-size: 14px;
    text-align: center;
}
.top-bar a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.2s;
}
.top-bar a:hover {
    color: #ef4444;
}
.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 20px;
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo i {
    color: #ef4444;
}
.nav-menu {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.nav-menu a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 16px;
}
.nav-menu a:hover {
    color: #ef4444;
}
.contacts-header {
    display: flex;
    gap: 16px;
}
.contacts-header a {
    color: #374151;
    font-size: 20px;
    transition: color 0.2s;
}
.contacts-header a:hover {
    color: #25D366; /* WhatsApp */
}
.contacts-header a.telegram:hover {
    color: #0088cc;
}

/* ========== БАННЕР ========== */
.hero {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    margin: 20px 0 40px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 40px 48px;
    gap: 30px;
}
.hero-text {
    flex: 1;
    color: white;
}
.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero-text p {
    font-size: 1.125rem;
    color: #d1d5db;
    margin-bottom: 24px;
    max-width: 500px;
}
.hero-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
    text-decoration: none;
}
.hero-btn:hover {
    background: #dc2626;
}
.hero-image {
    flex: 1;
    text-align: center;
}
.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.3);
}

/* ========== КАТАЛОГ (КАРТОЧКИ УМЕНЬШЕННЫЕ) ========== */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 40px 0 24px;
    color: #111827;
    position: relative;
    display: inline-block;
}
.section-title:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #ef4444;
    border-radius: 2px;
}
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.part-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.part-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.02);
}
.card-img {
    height: 180px; /* уменьшено */
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-img i {
    font-size: 60px;
    color: #9ca3af;
}
.card-body {
    padding: 16px;
}
.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: start;
}
.card-title h3 {
    font-size: 1rem;
    font-weight: 600;
}
.compatibility {
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.card-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 8px 0 12px;
    line-height: 1.4;
}
.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 12px;
}
.card-btn {
    width: 100%;
    background: #111827;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.card-btn:hover {
    background: #ef4444;
}

/* ========== ФИЛЬТРЫ ========== */
.filter-bar {
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.search-box {
    flex: 2;
    display: flex;
    gap: 8px;
}
.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    font-size: 0.9rem;
}
.search-box input:focus {
    outline: none;
    border-color: #ef4444;
}
.search-box button {
    background: #111827;
    border: none;
    padding: 0 20px;
    border-radius: 40px;
    color: white;
    cursor: pointer;
}
.filter-select {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ========== ПОДВАЛ ========== */
.footer {
    background: #111827;
    color: #9ca3af;
    margin-top: 60px;
    padding: 40px 0 24px;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
}
.footer-col {
    flex: 1;
    min-width: 180px;
}
.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}
.footer-col a {
    display: block;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.875rem;
}
.footer-col a:hover {
    color: #ef4444;
}
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}
.social-links a {
    font-size: 24px;
    display: inline-block;
}
.copyright {
    text-align: center;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid #1f2937;
    font-size: 0.75rem;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
    }
    .nav-menu {
        justify-content: center;
        gap: 20px;
    }
    .contacts-header {
        justify-content: center;
    }
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box button {
        white-space: nowrap;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}

/* ========== КАТЕГОРИИ ========== */
.categories-section {
    margin-bottom: 30px;
}
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.category-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.category-card i {
    font-size: 14px;
}
.category-card:hover {
    background: #f3f4f6;
    border-color: #ef4444;
}
.category-card.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}