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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 a {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.contacts a {
    color: #e94560;
    text-decoration: none;
    margin-left: 20px;
    transition: 0.3s;
}

.contacts a:hover {
    color: #ff6b81;
}

/* ========== NAVIGATION ========== */
nav {
    background: #0f3460;
    padding: 12px 0;
    position: sticky;
    top: 70px;
    z-index: 999;
}

.main-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.main-menu li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: 0.3s;
    font-size: 14px;
}

.main-menu li a:hover {
    background: #e94560;
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
}

.btn-primary {
    background: #e94560;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    display: inline-block;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #ff6b81;
    transform: translateY(-2px);
}

/* ========== ADVANTAGES ========== */
.advantages {
    padding: 40px 0;
    background: white;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.advantage-card {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: 0.3s;
}

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

.advantage-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.advantage-card h3 {
    margin-bottom: 10px;
    color: #1a1a2e;
}

.advantage-card p {
    color: #666;
    font-size: 14px;
}

/* ========== SECTION TITLE ========== */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #1a1a2e;
}

/* ========== PARTS GRID ========== */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.part-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.part-card a {
    text-decoration: none;
    color: inherit;
}

.part-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.part-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
    background: #f5f5f5;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.stock-badge.in {
    background: #4caf50;
    color: white;
}

.stock-badge.out {
    background: #f44336;
    color: white;
}

.part-info {
    padding: 15px;
}

.part-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #1a1a2e;
    height: 40px;
    overflow: hidden;
}

.car-model {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.part-number {
    font-size: 12px;
    color: #e94560;
    font-family: monospace;
    margin: 8px 0;
    word-break: break-all;
}

.part-price {
    font-size: 20px;
    font-weight: bold;
    color: #e94560;
}

/* ========== CAR CATEGORIES ========== */
.car-categories {
    padding: 40px 0;
    background: #f0f2f5;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.car-category {
    background: white;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    transition: 0.3s;
    cursor: pointer;
    font-weight: 500;
}

.car-category:hover {
    background: #e94560;
    color: white;
    transform: translateY(-3px);
}

/* ========== PAGE HEADER ========== */
.page-header {
    margin: 30px 0 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 28px;
    color: #1a1a2e;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a {
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: #e94560;
    color: white;
    border-color: #e94560;
}

/* ========== BREADCRUMBS ========== */
.breadcrumbs {
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumbs a {
    color: #e94560;
    text-decoration: none;
}

/* ========== PART DETAIL PAGE (ТОВАР) ========== */
.part-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Галерея */
.part-gallery .main-photo {
    width: 100%;
    height: 350px;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.part-gallery .main-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-photo-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #ccc;
}

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}

.thumbnails img:hover {
    border-color: #e94560;
}

/* Інформаційні рядки */
.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.info-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.info-label-sku {
    font-size: 13px;
    font-weight: normal;
    color: #999;
    width: 110px;
    flex-shrink: 0;
}

.info-value-sku {
    font-size: 14px;
    color: #666;
    word-break: break-word;
}

.info-label-part {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    width: 140px;
    flex-shrink: 0;
}

.info-value-part {
    font-size: 16px;
    color: #e94560;
    font-weight: 600;
    word-break: break-word;
    background: #fef5f7;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Ціна */
.price-block {
    margin: 20px 0;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.price-label {
    font-size: 14px;
    color: #555;
    font-weight: normal;
}

.current-price {
    font-size: 28px;
    font-weight: bold;
    color: #e94560;
}

.current-price span {
    font-size: 16px;
}

.stock-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
}

.in-stock {
    background: #4caf50;
    color: white;
}

.out-stock {
    background: #f44336;
    color: white;
}

/* Опис товару */
.part-description {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.part-description h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1a1a2e;
}

/* Форма замовлення */
.order-form-block {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    width: 100%;
}

.order-form-block h3 {
    margin-bottom: 20px;
    color: #1a1a2e;
    font-size: 20px;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row input {
    flex: 1;
    min-width: 200px;
}

.order-form input,
.order-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}

.btn-order {
    background: #e94560;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-order:hover {
    background: #c73e56;
    transform: translateY(-2px);
}

.order-note {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    text-align: center;
}

/* Notify block */
.notify-block {
    text-align: center;
    padding: 30px;
    background: #fff3e0;
    border-radius: 10px;
}

.btn-call {
    display: inline-block;
    background: #e94560;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 30px;
    margin-top: 15px;
}

/* ========== ALERT ========== */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ========== EMPTY CATALOG ========== */
.empty-catalog {
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 10px;
}

/* ========== FOOTER ========== */
footer {
    background: #1a1a2e;
    color: white;
    margin-top: 50px;
    padding: 40px 0 20px;
}

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

.footer-section h4 {
    margin-bottom: 15px;
    color: #e94560;
}

.footer-section p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #777;
}

/* ========== MODAL WINDOW (Збільшення фото) ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.modal-close:hover {
    color: #bbb;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 14px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .part-detail {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    header .container {
        flex-direction: column;
        text-align: center;
    }

    .contacts a {
        margin: 0 10px;
    }

    nav {
        top: 110px;
    }

    .main-menu {
        justify-content: center;
    }

    .hero h2 {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .info-label-sku,
    .info-label-part {
        width: 100%;
        margin-bottom: 4px;
    }

    .info-row {
        flex-direction: column;
    }

    .price-label {
        width: auto;
    }

    .current-price {
        font-size: 24px;
    }

    .order-form-block {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .price-block {
        flex-direction: column;
        text-align: center;
    }

    .part-gallery .main-photo {
        height: 250px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row input {
        width: 100%;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .thumbnails img {
        width: 60px;
        height: 60px;
    }
}

.pre-order {
    background: #ff9800;
    color: white;
}

/* Кнопки месенджерів на сторінці товару */
.messenger-buttons {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-viber, .btn-telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.btn-viber {
    background: #7360f2;
    color: white;
}

.btn-viber:hover {
    background: #5a4ac7;
    transform: translateY(-2px);
}

.btn-telegram {
    background: #0088cc;
    color: white;
}

.btn-telegram:hover {
    background: #006699;
    transform: translateY(-2px);
}

.btn-viber img, .btn-telegram img {
    filter: brightness(0) invert(1);
}


    }
}