* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


body {
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* Скрыть стрелочки у числового input */
.edit-input input[type="number"]::-webkit-outer-spin-button,
.edit-input input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Для Firefox */
.edit-input input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.edit-input input[type="number"] {
    appearance: textfield;
}

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

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.header h1 {
    font-weight: 400;
    font-size: 32px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    position: sticky;
    top: -1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    width: 100%;
    backdrop-filter: blur(10px);
}

.search-container.sticky {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 15px 20px;
}

/* ===== SEARCH FORM ===== */
.search-form {
    width: 100%;
    max-width: 65%;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.search-input-container {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 14px 45px 14px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #bdc3c7;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    font-size: 12px;
}

.clear-search:hover {
    background: #e74c3c;
    transform: translateY(-50%) scale(1.1);
}

.search-input:not(:placeholder-shown) + .clear-search {
    opacity: 1;
    visibility: visible;
}

.search-button {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: #34495e;
    transform: translateY(-1px);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    max-width: 65%;
    width: 100%;
}

.filter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

/* ===== DROPDOWN FILTERS ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.filter-button {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #ddd;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-button:hover {
    background: #e9ecef;
    border-color: #3498db;
    transform: translateY(-1px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 5px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content-inner {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dropdown-content button {
    background: none;
    border: none;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.dropdown-content button:hover {
    background: #f8f9fa;
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #2c3e50;
    transition: transform 0.3s ease;
}

.dropdown:hover .arrow-down {
    transform: rotate(180deg);
}

/* ===== CHECKBOX ===== */
.checkbox-container {
    padding-top: 15px;
}

.check-form {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #2c3e50;
    transition: all 0.3s ease;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    min-height: 48px;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    margin-right: 10px;
    position: relative;
    transition: all 0.15s ease;
    background: white;
    flex-shrink: 0;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.checkbox-label input:checked + .checkmark {
    background: #3498db;
    border-color: #3498db;
}

.checkbox-label input:checked + .checkmark:after {
    display: block;
}

.checkbox-text {
    font-weight: 500;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1.2;
}

.checkbox-label:hover .checkmark {
    border-color: #3498db;
    transform: scale(1.05);
}

/* ===== MODELS CONTAINER ===== */
.models-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
}

.model-category {
    border-radius: 12px;
    border: 3px solid rgba(176, 176, 176, 0.3);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.09);
    margin-bottom: 25px;
    background: white;
    padding: 25px;
    flex: 0 1 49%;
    animation: fadeInUp 0.5s ease-out;
}

.model-category:only-child {
    flex: 1 1 100%;
}

.model-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

/* ===== BRAND SECTIONS GRID ===== */
.model-category .brand-section {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.model-category .brand-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.model-category .brand-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

/* ===== SPARES LIST ===== */
.spares-list {
    display: grid;
    gap: 12px;
}

.spare-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    gap: 15px;
}

.spare-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.spare-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spare-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.3;
}

/* Стили для поля ввода количества запчастей */
.spare-quantity {
    width: 60px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 8px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.spare-quantity:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.spare-quantity.quantity-low {
    background-color: #fff5f5;
    border-color: #ff6b6b;
    color: #c92a2a;
}

.spare-quantity.quantity-low:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.25);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-category {
    animation: fadeInUp 0.5s ease-out;
}

.model-category .brand-section {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== SPARES CONTAINER  для модельного поиска===== */
.search-result {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.spares-container {
    margin-top: 20px;
}

.spare-category {
    border-radius: 12px;
    border: 3px solid rgba(176, 176, 176, 0.3);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.09);
    margin-bottom: 15px;
    background: white;
    padding: 25px;
}

.spare-title {
    font-size: 22px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.brand-section {
    margin-bottom: 25px;
}

.brand-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.models-list {
    display: grid;
    gap: 15px;
}

.model-item {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.model-item:hover {
    transform: translateY(-2px);
}

.model-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 17px;
    flex: 1;
    min-width: 150px;
}

/* Стили для формы редактирования количества */
.quantity-form {
    display: flex;
    align-items: center;
    gap: 10px;

}

.edit-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quantity-btn:active {
    background: #dee2e6;
    transform: scale(0.95);
}

/* Стили для поля ввода количества */
.model-quantity {
    width: 60px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 8px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.model-quantity:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Стиль для низкого количества */
.model-quantity.quantity-low {
    background-color: #fff5f5;
    border-color: #ff6b6b;
    color: #c92a2a;
}

.model-quantity.quantity-low:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.25);
}

/* Кнопка сохранения */
.edit-submit-button {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edit-submit-button:hover {
    background: #218838;
}

.edit-submit-button:active {
    transform: scale(0.98);
}

.compatibility {
    color: #95a5a6;
    font-size: 13px;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    width: 100%;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-unavailable {
    background: #f8d7da;
    color: #721c24;
}
/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin: 20px 0;
}

.empty-state div {
    font-size: 50px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    color: #7f8c8d;
}

/*=========== Анимации для уведомлений  ====== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Стили для состояния загрузки */
.model-quantity.quantity-updating {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

.quantity-low {
    background-color: #ffe6e6;
    border-color: #ff4444;
}


/* ===== PAGINATION STYLES ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.step-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

.pagination a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.pagination .current {
    padding: 10px 18px;
    background: #2c3e50;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.2);
}

/* Стили для активной страницы */
.pagination a.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Анимация при наведении */
.pagination a {
    position: relative;
    overflow: hidden;
}

.pagination a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.pagination a:hover::before {
    left: 100%;
}



/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .model-category .brand-section {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .header h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .header p {
        font-size: 14px;
    }

    .search-container {
        padding: 20px 15px;
        margin-bottom: 20px;
        position: relative;
        top: 0;
    }

    .search-form {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .search-bar {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 15px;
    }

    .search-input-container {
        width: 100%;
    }

    .search-input {
        padding: 16px 45px 16px 16px;
        font-size: 16px;
        border-radius: 10px;
    }

    .clear-search {
        right: 12px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .search-button {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 10px;
    }

    .filter-bar {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .filter-form {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .dropdown {
        width: 100%;
    }

    .filter-button {
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 8px;
        justify-content: center;
    }

    .dropdown-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        max-height: 70vh;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        z-index: 1001;
    }

    .dropdown-content-inner {
        max-height: 60vh;
        overflow-y: auto;
    }

    .dropdown-content button {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 6px;
    }

    .checkbox-container {
        padding-top: 10px;
        width: 100%;
    }

    .checkbox-label {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        border-radius: 8px;
        justify-content: center;
    }

    .checkmark {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }

    /* ===== MODEL CONTAINER MOBILE ===== */
    .models-container {
        margin-top: 15px;
        gap: 0;
    }

    .model-category {
        padding: 20px 15px;
        margin-bottom: 20px;
        flex: 1 1 100%;
    }

    .model-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* На мобильных - по одному бренду в ряд */
    .model-category .brand-section {
        display: block;
        width: 100%;
        margin: 0 0 20px 0 !important;
    }

    .model-category .brand-section:last-child {
        margin-bottom: 0 !important;
    }

    .model-category .brand-title {
        font-size: 17px;
        margin-bottom: 15px;
    }

    .spare-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
    }

    .spare-info {
        text-align: center;
    }

    .spare-name {
        font-size: 15px;
    }

    .quantity-form {
        justify-content: center;
    }

    .spare-quantity {
        width: 70px;
        height: 36px;
        font-size: 16px;
    }

    .compatibility {
        font-size: 14px;
        text-align: center;
    }

    /* ===== SPARES CONTAINER MOBILE ===== */
    .spares-container {
        margin-top: 15px;
    }

    .spare-category {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }

    .spare-title {
        font-size: 20px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .brand-section {
        margin-bottom: 20px;
    }

    .brand-title {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .models-list {
        gap: 12px;
    }

    .model-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
        border-left: 4px solid #3498db;
    }

    .model-name {
        min-width: auto;
        font-size: 16px;
        text-align: center;
        margin-bottom: 0;
        order: 1;
    }

    .quantity-form {
        order: 2;
        justify-content: center;
        gap: 12px;
    }

    .edit-input {
        gap: 8px;
    }

    .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .model-quantity {
        width: 70px;
        height: 36px;
        font-size: 16px;
    }

    .edit-submit-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .compatibility {
        order: 3;
        margin-top: 10px;
        padding-top: 10px;
        font-size: 14px;
        text-align: center;
    }

    /* ===== EMPTY STATE MOBILE ===== */
    .empty-state {
        padding: 40px 20px;
        margin: 15px 0;
    }

    .empty-state div {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .empty-state h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .empty-state p {
        font-size: 14px;
    }

    .search-result {
        padding: 12px;
        margin-bottom: 15px;
        text-align: center;
    }

    .search-result p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .header {
        padding: 15px 12px;
        margin-bottom: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 13px;
    }

    .search-container {
        padding: 15px 12px;
    }

    .search-input {
        padding: 14px 40px 14px 14px;
        font-size: 15px;
    }

    .search-button {
        padding: 14px 20px;
        font-size: 15px;
    }

    .filter-button {
        padding: 12px 14px;
        font-size: 14px;
    }

    .checkbox-label {
        padding: 14px;
        font-size: 15px;
    }

    .model-category {
        padding: 15px 12px;
        margin-bottom: 15px;
    }

    .model-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .model-category .brand-section {
        padding: 15px;
        margin-bottom: 15px !important;
    }

    .model-category .brand-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .spare-item {
        padding: 12px;
        gap: 10px;
    }

    .spare-name {
        font-size: 14px;
    }

    .spare-quantity {
        width: 60px;
        height: 32px;
        font-size: 15px;
    }

    .spare-category {
        padding: 15px 12px;
    }

    .spare-title {
        font-size: 18px;
    }

    .brand-title {
        font-size: 16px;
    }

    .model-item {
        padding: 12px;
    }

    .model-name {
        font-size: 15px;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .model-quantity {
        width: 60px;
        height: 32px;
        font-size: 15px;
    }

    .edit-submit-button {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .dropdown-content {
        width: 95vw;
        max-width: none;
    }

    .dropdown-content button {
        padding: 12px 14px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 5px;
    }

    .header {
        padding: 12px 10px;
    }

    .header h1 {
        font-size: 18px;
    }

    .search-container {
        padding: 12px 10px;
    }

    .search-input {
        padding: 12px 35px 12px 12px;
        font-size: 14px;
    }

    .quantity-form {
        flex-direction: column;
        gap: 8px;
    }

    .edit-input {
        justify-content: center;
    }

    .model-item {
        gap: 8px;
    }

    .spare-category {
        padding: 12px 10px;
    }

/* ===== RESPONSIVE PAGINATION ===== */
@media (max-width: 768px) {
    .pagination {
        margin: 30px 0 15px;
        padding: 20px 15px;
        border-radius: 10px;
    }

    .step-links {
        gap: 10px;
    }

    .pagination a {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 6px;
    }

    .pagination .current {
        padding: 8px 14px;
        font-size: 13px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .pagination {
        margin: 25px 0 10px;
        padding: 15px 10px;
        border-radius: 8px;
    }

    .step-links {
        gap: 8px;
    }

    .pagination a {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 36px;
        min-height: 36px;
        border-radius: 5px;
    }

    .pagination .current {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 36px;
        min-height: 36px;
        border-radius: 5px;
    }

    /* Скрываем текст на очень маленьких экранах, оставляем только стрелки */
    .pagination a:first-child,
    .pagination a:last-child {
        font-size: 0;
        position: relative;
    }

    .pagination a:first-child::after {
        content: '⇤';
        font-size: 14px;
        font-weight: bold;
    }

    .pagination a:last-child::after {
        content: '⇥';
        font-size: 14px;
        font-weight: bold;
    }

    .pagination a:nth-child(2) {
        font-size: 0;
        position: relative;
    }

    .pagination a:nth-child(2)::after {
        content: '←';
        font-size: 14px;
        font-weight: bold;
    }

    .pagination a:nth-last-child(2) {
        font-size: 0;
        position: relative;
    }

    .pagination a:nth-last-child(2)::after {
        content: '→';
        font-size: 14px;
        font-weight: bold;
    }
}

@media (max-width: 360px) {
    .pagination {
        padding: 12px 8px;
    }

    .step-links {
        gap: 5px;
    }

    .pagination a {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 32px;
        min-height: 32px;
    }

    .pagination .current {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 32px;
        min-height: 32px;
    }
}

}