* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #000000 0%, #222222 50%, #000000 100%);
    color: #FFFFFF;
    padding: 40px;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #FCC10B 0px,
        #FCC10B 25px,
        transparent 25px,
        transparent 50px
    );
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #FCC10B 0px,
        #FCC10B 25px,
        transparent 25px,
        transparent 50px
    );
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 300px;
    height: auto;
    filter: drop-shadow(3px 3px 0px rgba(0,0,0,0.3));
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}





/* Filters Section */
.filters-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 2px solid #f39c12;
}

.filters-section h3 {
    color: #f39c12;
    margin: 0 0 20px 0;
    font-size: 18px;
    text-align: center;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: #f39c12;
    font-weight: 600;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 12px 15px;
    border: 2px solid #f39c12;
    border-radius: 8px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.3);
    background: #2d2d2d;
}

.filter-group select option {
    background: #1a1a1a;
    color: #ffffff;
}

.filter-results {
    text-align: center;
    color: #f39c12;
    font-size: 14px;
    font-weight: 500;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

    .export-btn {
        padding: 15px 30px;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: linear-gradient(135deg, #28a745, #20c997);
        color: white;
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
    
    .export-btn:hover {
        background: linear-gradient(135deg, #20c997, #28a745);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    }
    
    .export-btn:active {
        transform: translateY(0);
    }
    
    .export-pdf-btn {
        padding: 15px 30px;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: linear-gradient(135deg, #dc3545, #c82333);
        color: white;
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    }
    
    .export-pdf-btn:hover {
        background: linear-gradient(135deg, #c82333, #dc3545);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    }
    
    .export-pdf-btn:active {
        transform: translateY(0);
    }

/* Map Container */
.map-container {
    margin-top: 40px;
    text-align: center;
}

.map-container h3 {
    color: #f39c12;
    font-size: 22px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-wrapper {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #f39c12;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.map-wrapper iframe {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Responsive Map */
@media (max-width: 768px) {
    .map-container {
        margin-top: 30px;
    }
    
    .map-container h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .map-wrapper {
        padding: 15px;
    }
    
    .map-wrapper iframe {
        height: 300px;
    }
}

.filter-actions {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.clear-filters-btn {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: #1a1a1a;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    min-width: 200px;
}

.clear-filters-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.filter-results {
    text-align: center;
    color: #f39c12;
    font-size: 14px;
    font-weight: 500;
}

.no-results {
    text-align: center;
    color: #f39c12;
    font-size: 18px;
    font-weight: 600;
    padding: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid #f39c12;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin: 20px 0;
    }
    
    .export-btn {
        width: 100%;
        max-width: 300px;
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .filter-group select,
    .filter-group input {
        padding: 15px;
        font-size: 16px;
    }
    
    .filter-actions {
        margin: 25px 0;
    }
    
    .clear-filters-btn {
        width: 100%;
        padding: 18px;
        font-size: 16px;
        min-width: auto;
    }
}

/* KP Description Section */
.kp-description {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 3px solid #f39c12;
}

.description-header {
    text-align: center;
    margin-bottom: 40px;
}

.description-header h2 {
    color: #f39c12;
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.description-main {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.description-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.description-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #f39c12;
    transition: all 0.3s ease;
}

.description-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.3);
    border-color: #f1c40f;
}

.description-card h3 {
    color: #f39c12;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

.description-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.description-card li {
    color: #ffffff;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.description-card li:before {
    content: "✓";
    color: #f39c12;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.description-card li:last-child {
    margin-bottom: 0;
}

.how-to-order {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #f39c12;
}

.how-to-order h3 {
    color: #f39c12;
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.order-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 10px;
    border-left: 4px solid #f39c12;
}

.step-number {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: #1a1a1a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.step-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
}

/* Responsive KP Description */
@media (max-width: 768px) {
    .kp-description {
        padding: 25px;
        margin: 25px 0;
    }
    
    .description-header h2 {
        font-size: 24px;
    }
    
    .description-main {
        font-size: 16px;
    }
    
    .description-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .description-card {
        padding: 20px;
    }
    
    .description-card h3 {
        font-size: 18px;
    }
    
    .how-to-order {
        padding: 20px;
    }
    
    .how-to-order h3 {
        font-size: 20px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .step-text {
        font-size: 14px;
    }
}



/* All Cars Section */
.all-cars-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.all-cars-section h2 {
    color: #000;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
    border-bottom: 3px solid #FCC10B;
    padding-bottom: 15px;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.car-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: #FCC10B;
}

.car-card h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #FCC10B;
    padding-bottom: 10px;
}

.car-card-details {
    display: grid;
    gap: 10px;
}

.car-card-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.car-card-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
}

.car-card-value {
    color: #333;
    text-align: right;
}

/* Быстрые ссылки в карточках автомобилей */
.car-card-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.quick-link {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.quick-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.auction-link {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
}

.auction-link:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    border-color: #20c997;
}

.photo-link {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
    border-color: #17a2b8;
}

.photo-link:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    border-color: #20c997;
}

/* Адаптивность для быстрых ссылок */
@media (max-width: 768px) {
    .car-card-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .quick-link {
        text-align: center;
        padding: 10px 15px;
        font-size: 0.9em;
    }
}



/* Бейдж контейнера */
.container-badge {
    background: #17a2b8;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}



/* Табличный вид на десктопе */
@media (min-width: 1024px) {
    .cars-grid {
        display: table;
        width: 100%;
        border-collapse: collapse;
        background: white;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .table-header {
        display: table-row;
        background: #343a40;
        color: white;
        font-weight: 600;
    }
    
    .table-header .table-cell {
        display: table-cell;
        padding: 15px 20px;
        border-bottom: 2px solid #FCC10B;
        text-align: center;
        vertical-align: middle;
    }
    
    .table-row {
        display: table-row;
        background: #f8f9fa;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .table-row:hover {
        background: #e9ecef;
    }
    
    .table-cell {
        display: table-cell;
        padding: 15px 20px;
        border-bottom: 1px solid #dee2e6;
        vertical-align: middle;
        text-align: center;
    }
    
    .table-cell:first-child {
        text-align: left;
        font-weight: 600;
        width: 15%;
    }
    
    .table-cell:nth-child(2) { /* VIN */
        width: 20%;
    }
    
    .table-cell:nth-child(3) { /* Год */
        width: 8%;
    }
    
    .table-cell:nth-child(4) { /* Пробег */
        width: 10%;
    }
    
    .table-cell:nth-child(5) { /* Цена */
        width: 12%;
    }
    
    .table-cell:nth-child(6) { /* Контейнер */
        width: 12%;
    }
    
    .table-cell:nth-child(7) { /* Статус */
        width: 18%;
    }
    
    .table-cell:last-child { /* Действия */
        width: 15%;
        text-align: center;
    }
    
    /* Скрываем карточки на десктопе */
    .car-card {
        display: none;
    }
    
    /* Стили для кнопок действий в таблице */
    .table-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .table-action-btn {
        padding: 6px 12px;
        border-radius: 6px;
        text-decoration: none;
        font-size: 0.8rem;
        font-weight: 500;
        transition: all 0.3s ease;
        border: none;
        cursor: pointer;
        white-space: nowrap;
        min-width: 80px;
    }
    
    .table-auction-btn {
        background: #28a745;
        color: white;
    }
    
    .table-auction-btn:hover {
        background: #20c997;
        transform: translateY(-1px);
    }
    
    .table-photo-btn {
        background: #17a2b8;
        color: white;
    }
    
    .table-photo-btn:hover {
        background: #20c997;
        transform: translateY(-1px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .logo {
        width: 250px;
    }
    

    
    .car-details {
        grid-template-columns: 1fr;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .part-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FCC10B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contact Section */
.contact-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 30px;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #FCC10B;
    border-radius: 3px;
}

.contact-section h2 {
    color: #000;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
    border-bottom: 3px solid #FCC10B;
    padding-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #FCC10B;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-label {
    font-weight: 700;
    color: #333;
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.contact-value {
    color: #666;
    font-size: 1.1em;
    line-height: 1.4;
}

/* Responsive Design for Contact Section */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-section {
        padding: 20px;
    }
    
    .contact-section h2 {
        font-size: 1.5em;
    }
    

}

/* Стили для кликабельных телефонов */
.phone-link {
    color: #FCC10B;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.phone-link:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* Мобильная плашка действий */
.mobile-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #000000 0%, #222222 100%);
    border-top: 3px solid #FCC10B;
    padding: 15px 20px;
    display: none;
    gap: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.mobile-actions button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 50px;
}

.mobile-call-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.mobile-call-btn:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.mobile-call-btn:active {
    transform: translateY(0);
}

.mobile-excel-btn {
    background: linear-gradient(135deg, #FCC10B, #FFD700);
    color: #000;
    box-shadow: 0 4px 15px rgba(252, 193, 11, 0.3);
}

.mobile-excel-btn:hover {
    background: linear-gradient(135deg, #FFD700, #FCC10B);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 193, 11, 0.4);
}

.mobile-excel-btn:active {
    transform: translateY(0);
}

.mobile-pdf-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.mobile-pdf-btn:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.mobile-pdf-btn:active {
    transform: translateY(0);
}

/* Показываем мобильную плашку только на мобильных устройствах */
@media (max-width: 768px) {
    .mobile-actions {
        display: flex;
    }
    
    /* Добавляем отступ снизу для контента, чтобы он не перекрывался плашкой */
    body {
        padding-bottom: 100px;
    }
    
    .container {
        padding-bottom: 100px;
    }
}

/* Модальное окно с информацией об автомобиле */
.car-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    /* Дополнительные свойства для корректной работы на мобильных */
    -webkit-overflow-scrolling: touch;
    overflow: hidden;
    /* Обеспечиваем правильное позиционирование кнопки закрытия */
    isolation: isolate;
}

/* Кнопка закрытия - НЕЗАВИСИМЫЙ СТИЛЬ */
.modal-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(0, 0, 0, 1) !important;
    border: 3px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 32px !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 100000 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    min-height: 50px !important;
    min-width: 50px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    /* Обеспечиваем, чтобы кнопка была поверх всего */
    isolation: isolate !important;
    contain: layout style paint !important;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.9) !important;
    color: white !important;
    transform: scale(1.1) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.6) !important;
}

.modal-close:active {
    transform: scale(0.95) !important;
    background: rgba(255, 0, 0, 1) !important;
    border-color: rgba(255, 255, 255, 1) !important;
}

/* Мобильная версия кнопки закрытия */
@media (max-width: 768px) {
    .modal-close {
        top: 15px !important;
        right: 15px !important;
        width: 55px !important;
        height: 55px !important;
        font-size: 36px !important;
        background: rgba(255, 0, 0, 0.9) !important;
        border: 3px solid rgba(255, 255, 255, 1) !important;
        box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5) !important;
    }
}

.car-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.car-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #000000 0%, #222222 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 3px solid #FCC10B;
    position: relative;
    overflow: visible;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #FCC10B;
    text-align: center;
    flex: 1;
}

.modal-body {
    padding: 30px;
}

.car-details-section, .parts-section {
    margin-bottom: 30px;
}

.car-details-section h3, .parts-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #FCC10B;
    padding-bottom: 10px;
}

.car-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #FCC10B;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
}

.detail-value {
    color: #333;
    font-weight: 500;
    text-align: right;
}

.parts-list {
    display: grid;
    gap: 15px;
}

.part-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.part-name {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.part-quantity {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
}

.no-parts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .car-modal {
        padding: 10px;
        /* Убеждаемся, что модальное окно корректно отображается на мобильных */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
    }
    
    .modal-content {
        max-height: 95vh;
        width: 95% !important;
        margin: 0 auto;
    }
    
    .modal-header {
        padding: 15px;
        position: relative !important;
        overflow: visible;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
        text-align: center;
    }
    
    /* Кнопка закрытия уже стилизована глобально */
    
    .modal-body {
        padding: 20px;
    }
    
    .car-details-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .detail-value {
        text-align: left;
        font-weight: 600;
        color: #000;
    }
    
    .part-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .part-quantity {
        align-self: flex-end;
    }
    
    /* Дополнительные стили для мобильной версии */
    .car-modal.show {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .modal-content {
        transform: translateY(0) !important;
    }
    
    /* Кнопка закрытия уже стилизована глобально */
    
    /* Улучшенная поддержка touch событий */
    .car-card, .table-row {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: pan-y; /* Разрешаем только вертикальный скролл */
    }
    
    /* Кнопка закрытия уже стилизована глобально */
    
    /* Добавляем активное состояние для touch */
    .car-card:active, .table-row:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
        background-color: rgba(0, 123, 255, 0.1);
    }
    
    /* Добавляем hover эффект для десктопа */
    @media (hover: hover) {
        .car-card:hover, .table-row:hover {
            background-color: rgba(0, 123, 255, 0.05);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
    }
    
    /* Предотвращение скролла страницы при открытом модальном окне */
    body.modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Улучшаем мобильную версию */
    @media (max-width: 768px) {
        .car-card, .table-row {
            /* Увеличиваем область для touch */
            min-height: 44px; /* Минимальная высота для touch */
            padding: 15px 20px;
        }
        
        /* Добавляем отступ между элементами для лучшего разделения */
        .car-card + .car-card {
            margin-top: 10px;
        }
    }
}

/* Секция медиа-файлов в модальном окне */
.car-media-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.car-media-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
    border-bottom: 2px solid #FCC10B;
    padding-bottom: 10px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.media-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.media-item:hover {
    border-color: #FCC10B;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 193, 11, 0.15);
}

.media-item h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.media-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.media-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.media-icon {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.media-text {
    color: #666;
    font-weight: 500;
    font-size: 0.95em;
}

/* Специфичные стили для аукционного листа */
.auction-sheet {
    border-left: 4px solid #28a745;
}

.auction-sheet:hover {
    border-color: #28a745;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.auction-sheet .media-icon {
    color: #28a745;
}

/* Специфичные стили для фотографий */
.car-photos {
    border-left: 4px solid #17a2b8;
}

.car-photos:hover {
    border-color: #17a2b8;
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.15);
}

.car-photos .media-icon {
    color: #17a2b8;
}

/* Стили для таблицы автомобилей с новыми колонками */
.cars-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 0.9em;
}

.cars-table th {
    background: #343a40;
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #FCC10B;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cars-table th:hover {
    background: #495057;
}

.cars-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
}

.cars-table tr:hover {
    background: #f8f9fa;
}

/* Стили для конкретных колонок */
.checkbox-cell {
    width: 50px;
    text-align: center;
}

.vin-cell {
    width: 120px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
}

.car-name-cell {
    width: 200px;
    text-align: left;
    font-weight: 500;
}

.model-cell {
    width: 120px;
}

.year-cell {
    width: 80px;
    font-weight: 600;
}

.price-cell {
    width: 120px;
    font-weight: 600;
    color: #28a745;
}

.status-cell {
    width: 150px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rating-cell {
    width: 80px;
    font-weight: 600;
    color: #ffc107;
}

.container-cell {
    width: 100px;
    font-weight: 500;
    color: #6c757d;
}

.links-cell {
    width: 100px;
    text-align: center;
}

.links-cell a {
    display: inline-block;
    margin: 0 5px;
    padding: 5px 8px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.links-cell a:hover {
    transform: scale(1.2);
}

.actions-cell {
    width: 100px;
    text-align: center;
}

/* Адаптивность для таблицы */
@media (max-width: 1200px) {
    .cars-table {
        font-size: 0.8em;
    }
    
    .cars-table th,
    .cars-table td {
        padding: 8px 5px;
    }
    
    .car-name-cell {
        width: 150px;
    }
    
    .status-cell {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .cars-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .cars-table th,
    .cars-table td {
        min-width: 80px;
        padding: 6px 4px;
    }
}

/* Адаптивность для медиа-секции */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .media-item {
        padding: 15px;
    }
    
    .media-icon {
        font-size: 2em;
    }
    
    .media-text {
        font-size: 0.9em;
    }
}
