/* ==============================================
   КАСТОМНАЯ ГАЛЕРЕЯ БЕЗ БИБЛИОТЕК
   ============================================== */

/* Основной контейнер слайдера */
.custom-slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    margin-bottom: 20px;
}

/* Основной слайдер */
.custom-main-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Слайды */
.custom-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.custom-slide.active {
    opacity: 1;
    pointer-events: all;
    position: relative;
    z-index: 1;
}

.custom-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    display: block;
}

/* Кнопки навигации */
.custom-slider-prev,
.custom-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(252, 252, 252, 0.801);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid black;
}

.custom-slider-prev {
    left: 20px;
}

.custom-slider-next {
    right: 20px;
}

.custom-slider-prev:hover,
.custom-slider-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.custom-slider-prev svg,
.custom-slider-next svg {
    width: 24px;
    height: 24px;
    fill: #000;
}

/* Счетчик слайдов */
.custom-slider-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

/* Миниатюры */
.custom-thumbnails {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.custom-thumbnail {
    width: 120px;
    height: 80px;
    flex: 0 0 auto;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.custom-thumbnail:hover {
    opacity: 0.8;
}

.custom-thumbnail.active {
    opacity: 1;
    border-color: #e70000;
}

.custom-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Основной контейнер */
.lot-details-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Gilroy', 'Arial', sans-serif;
    position: relative;
    scroll-margin-top: 100px;
}

/* Заголовочная секция лота */
.lot-header-meta {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.lot-header-meta .lot-label {
    font-size: 10px;
    font-weight: 400;
    color: #1f1e1e;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

.lot-header-meta .lot-title {
    font-size: 43px;
    font-weight: 500;
    color: #000;
    line-height: 1.1;
    margin: 0 0 10px 0;
    letter-spacing: -0.8px;
}

.lot-header-meta .lot-subtitle {
    font-size: 16px;
    color: #333;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    max-width: 600px;
}

/* Основной контейнер лота */
.lot-main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
}

/* Строка блока (левая и правая части) */
.lot-block-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
}

.lot-block-left,
.lot-block-right {
    display: flex;
    min-width: 0;
}

/* ========== ПЕРВЫЙ БЛОК - ГАЛЕРЕЯ И ХАРАКТЕРИСТИКИ ========== */

/* Левая часть - галерея */
.lot-gallery-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    position: relative;
}

/* Правая часть - информация */
.lot-info-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

/* Статус и номер лота */
.lot-status-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.lot-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #38a169;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
}

.lot-status-badge::before {
    content: '✓';
    font-size: 14px;
    font-weight: bold;
}

.lot-number-display {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.lot-number-display strong {
    color: #000;
}

/* Характеристики автомобиля */
.lot-specs-card {
    background: #f8f8f8;
    padding-left: 25px;
    padding-bottom: 25px;
    border-radius: 12px;
    width: 100%;
}

.lot-specs-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.lot-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.lot-spec-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lot-spec-label {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.lot-spec-value {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

/* Информация об аукционе */
.lot-auction-card {
    background: #f0f7ff;
    padding-left: 20px;
    padding-bottom: 20px;
    border-radius: 12px;
    border-left: 4px solid #2c5282;
    width: 100%;
}

.lot-auction-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 15px;
}

.lot-auction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ========== ВТОРОЙ БЛОК - ЦЕНЫ И QR-КОД ========== */
.second-block {
    margin-top: 20px;
}

/* Левая часть - цены и кнопки */
.lot-pricing-section-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.lot-price-block {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.lot-price-item {
    flex: 1;
    text-align: center;
}

.full_price {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
    font-size: 16px !important;
    color: #5100ff !important;
    cursor: pointer;
}

.lot-price-value {
    font-size: 28px;
    font-weight: 700;
    color: #e70000;
    margin-bottom: 1px;
}

#lotFinalPriceYen {
    color: #e7000083;
}

.lot-price-label {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding: 0;
}

.lot-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #e70000 0%, #cc0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 10px;
    width: 100%;
}

.lot-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 0, 0, 0.25);
}

.lot-messenger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

.lot-messenger-btn.telegram-btn {
    background: #0088cc;
}

.lot-messenger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}

.lot-messenger-btn.telegram-btn:hover {
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
}

.lot-action-text {
    font-size: 13px;
    color: #666;
    margin-top: 15px;
    text-align: center;
}

/* Правая часть - QR код */
.lot-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    height: fit-content;
    align-self: center;
    width: 100%;
}

.lot-qr-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.lot-qr-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

/* Индикатор загрузки */
.loading-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    height: 500px;
    width: 100%;
}

.image-placeholder {
    text-align: center;
    color: #666;
}

.image-placeholder svg {
    margin-bottom: 15px;
}

.image-placeholder p {
    font-size: 14px;
    margin: 0;
}

/* Модальное окно для фото */
/* Модальное окно для фото */
.lot-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.lot-modal-overlay.active {
    display: flex;
}

.lot-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lot-modal-close {
    position: absolute;
    top: -0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
}

.lot-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lot-modal-close svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.lot-modal-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lot-modal-slide img {
    max-height: 100vh;
    padding: 5px;

}

.lot-modal-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.2s ease;
    /* Плавное появление */
    opacity: 1;
}

/* Навигация в модальном окне */
.lot-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10000;
}

.lot-modal-nav button {
    pointer-events: all;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 20px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid black;
}

.lot-modal-nav button:hover {
    background: rgba(255, 255, 255, 0.932);
}

.lot-modal-nav button svg {
    width: 24px;
    height: 24px;
    fill: rgb(0, 0, 0);
}

.lot-modal-counter {
    position: absolute;
    top: -45px;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
}

/* Стили для статусов лота */
.lot-status-badge.status-excellent {
    background: #38a169 !important;
}

.lot-status-badge.status-good {
    background: #4299e1 !important;
}

.lot-status-badge.status-average {
    background: #ed8936 !important;
}

.lot-status-badge.status-bad {
    background: #e53e3e !important;
}

.lot-status-badge.status-repaired {
    background: #805ad5 !important;
}

.lot-status-badge.status-accident {
    background: #d69e2e !important;
}

.lot-status-badge.status-default {
    background: #718096 !important;
}

.lot-status-badge.status-unknown {
    background: #a0aec0 !important;
}

/* Анимация загрузки */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========== АДАПТИВНОСТЬ ========== */

@media (max-width: 1200px) {
    .lot-block-row {
        gap: 30px;
    }

    .custom-slider-container {
        height: 450px;
    }

    .loading-slide {
        height: 450px;
    }


}

@media (max-width: 992px) {
    .lot-block-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .lot-header-meta .lot-title {
        font-size: 38px;
    }

    .custom-slider-container {
        height: 400px;
    }

    .loading-slide {
        height: 400px;
    }

    .custom-thumbnails {
        height: 100px;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        /* ← Важно: запрещаем перенос */
    }

    .custom-thumbnail {
        width: 120px;
        /* ← Фиксированная ширина вместо процентов */
        height: 70px;
        flex: 0 0 auto;
        /* ← Запрещаем растягивание */
    }

    .lot-specs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lot-auction-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .lot-details-wrapper {
        padding: 30px 15px;
    }

    .lot-header-meta .lot-title {
        font-size: 32px;
    }

    .lot-header-meta .lot-subtitle {
        font-size: 15px;
    }

    .custom-slider-container {
        height: 350px;
    }

    .loading-slide {
        height: 350px;
    }

    .lot-price-block {
        flex-direction: column;
        gap: 15px;
    }

    .lot-price-value {
        font-size: 24px;
    }

    .custom-slider-prev,
    .custom-slider-next {
        width: 40px;
        height: 40px;
    }

    .custom-slider-prev svg,
    .custom-slider-next svg {
        width: 20px;
        height: 20px;
    }

    .lot-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lot-qr-box {
        padding: 20px;
    }


}

@media (max-width: 576px) {
    .lot-details-wrapper {
        padding: 20px 12px;
    }

    .custom-slider-container {
        height: 300px;
    }

    .loading-slide {
        height: 300px;
    }



    .custom-thumbnail {
        height: 60px;
    }

    .lot-header-meta .lot-title {
        font-size: 28px;
    }

    .lot-header-meta .lot-label {
        font-size: 9px;
    }

    .lot-specs-card {
        padding: 20px;
    }

    .lot-auction-card {
        padding: 18px;
    }

    .lot-qr-box {
        padding: 20px;
    }

    .lot-qr-image {
        width: 130px;
        height: 130px;
    }


}

@media (max-width: 480px) {
    .custom-slider-container {
        height: 250px;
    }

    .loading-slide {
        height: 250px;
    }



    .lot-status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lot-action-btn,
    .lot-messenger-btn {
        width: 100%;
        justify-content: center;
    }

    .lot-qr-text {
        font-size: 12px;
    }

    .custom-slider-prev {
        left: 10px;
    }

    .custom-slider-next {
        right: 10px;
    }



    .lot-modal-close {
        width: 36px;
        height: 36px;
    }
}

/* ==============================================
   БЛОК РАСЧЕТОВ
   ============================================== */

.lot-calculations-wrapper {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    border: 1px solid #e5e5e5;
    animation: fadeIn 0.3s ease;
}

.calculations-container {
    max-width: 800px;
    margin: 0 auto;
}

.calculations-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e70000;
}

.calculations-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.calculations-section:last-child {
    border-bottom: none;
}

.calculations-section.total-section {
    background: #fff5f5;
    padding: 10px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #e70000;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calculations-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #eee;
}

.calc-item:last-child {
    border-bottom: none;
}

/* Специальные стили для элементов с примечаниями */
.calc-item.with-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.calc-item.with-note .calc-label {
    flex: 1;
    min-width: 60%;
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 0;
}

.calc-item.with-note .calc-value {
    flex: 0 0 auto;
    text-align: right;
    min-width: 180px;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-bottom: 0;
    align-self: flex-start;
    margin-top: 0;
}

.calc-item.with-note .calc-note {
    flex: 1 0 100%;
    font-size: 12px;
    color: #666;
    font-style: italic;
    padding-left: 15px;
    margin-top: 5px;
    line-height: 1.3;
    width: 100%;
}

.calc-item.subtotal {
    border-top: 2px solid #333;
    padding-top: 12px;
    margin-top: 5px;
    font-weight: 600;
    background: #f0f7ff;
    padding: 10px 15px;
    border-radius: 6px;
}

.calc-item.subtotal .calc-label {
    color: #2c5282;
}

.calc-item.subtotal .calc-value {
    color: #2c5282;
    font-weight: 700;
}

.calc-item.total {
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e70000;
}

.calc-item.total .calc-label {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.calc-item.total .calc-value {
    font-size: 24px;
    font-weight: 700;
    color: #e70000;
}

.calc-label {
    font-size: 15px;
    color: #333;
    flex: 1;
    line-height: 1.4;
}

.calc-value {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    text-align: right;
    min-width: 180px;
}

.calc-value.prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.calc-price-yen {
    font-weight: 500;
    color: #0000007e;
    font-size: 12px;
}

.calc-price-rub {
    font-size: 16px;
    color: #000000;
}

.calculations-notes {
    margin-top: 30px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 8px;
    border-left: 4px solid #2c5282;
}

.calc-note-item p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.calc-note-item p strong {
    color: #333;
}

.calc-note-item p:last-child {
    margin-bottom: 0;
    font-style: italic;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================
   АДАПТИВНОСТЬ ДЛЯ БЛОКА РАСЧЕТОВ
   ============================================== */

@media (max-width: 768px) {
    .lot-calculations-wrapper {
        padding: 20px 15px;
        margin-top: 15px;
    }

    .calculations-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 16px;
    }

    .calc-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 8px 0;
    }

    .calc-item.with-note {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .calc-item.with-note .calc-label {
        min-width: 100%;
        width: 100%;
    }

    .calc-item.with-note .calc-value {
        text-align: left;
        min-width: auto;
        width: 100%;
        padding-left: 15px;
        align-self: flex-start;
        margin-top: 0;
    }

    .calc-item.with-note .calc-note {
        padding-left: 15px;
        margin-top: 3px;
    }

    .calc-value {
        text-align: left;
        min-width: auto;
        width: 100%;
        padding-left: 15px;
    }

    .calc-value.prices {
        align-items: flex-start;
    }

    .calc-label,
    .calc-value {
        font-size: 14px;
    }

    .calc-note {
        font-size: 11px;
    }

    .calc-item.total {
        padding: 12px;
    }

    .calc-item.total .calc-label {
        font-size: 16px;
    }

    .calc-item.total .calc-value {
        font-size: 20px;
        width: 100%;
        text-align: center;
    }

    .calculations-notes {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .lot-calculations-wrapper {
        padding: 15px 12px;
    }

    .calculations-title {
        font-size: 18px;
    }

    .calculations-grid {
        gap: 6px;
    }

    .calc-label,
    .calc-value {
        font-size: 13px;
    }

    .calculations-notes {
        padding: 12px;
    }

    .calc-note-item p {
        font-size: 12px;
    }
}



/* ==============================================
   СТИЛИ ДЛЯ СЕЛЕКТОРА ВОЗРАСТА (над ценой)
   ============================================== */
.lot-age-block {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #dee2e6;
}

.lot-age-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lot-age-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #212529;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.lot-age-select:hover {
    border-color: #e70000;
}

.lot-age-select:focus {
    outline: none;
    border-color: #e70000;
    box-shadow: 0 0 0 3px rgba(231, 0, 0, 0.1);
}

/* ==============================================
   АНИМАЦИЯ ОБНОВЛЕНИЯ ЦЕНЫ
   ============================================== */
@keyframes priceUpdate {
    0% {
        background-color: #d4edda;
        transform: scale(1);
    }

    50% {
        background-color: #c3e6cb;
        transform: scale(1.02);
    }

    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

.price-updated {
    animation: priceUpdate 0.5s ease-out;
    display: inline-block;
}

/* ==============================================
   СТИЛИ ДЛЯ СЕЛЕКТОРА В БЛОКЕ РАСЧЕТОВ (между Пошлина и ценой)
   ============================================== */

/* Специальный класс для строки с пошлиной */
.calc-item-duty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #eee;
    padding: 8px 0;
}

.calc-item-duty .calc-label {
    font-size: 15px;
    color: #333;
    flex: 0 0 auto;
    min-width: 100px;
}

/* Контейнер для селектора посередине */
.calc-item-duty .calc-custom {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 10px;
    text-align: center;
}

.calc-item-duty .calc-value {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    text-align: right;
    flex: 0 0 auto;
    min-width: 120px;
}

/* Сам селектор */
#calcAgeSelectInline {
    width: 100%;
    max-width: 160px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

#calcAgeSelectInline:hover {
    border-color: #e70000;
}

#calcAgeSelectInline:focus {
    outline: none;
    border-color: #e70000;
    box-shadow: 0 0 0 3px rgba(231, 0, 0, 0.1);
}

/* Анимация появления */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#calcAgeSelectorInline {
    animation: slideDown 0.3s ease-out;
}

/* ==============================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ
   ============================================== */
@media (max-width: 768px) {
    .calc-item-duty {
        flex-wrap: wrap;
        gap: 8px;
    }

    .calc-item-duty .calc-label {
        width: 100%;
        min-width: auto;
    }

    .calc-item-duty .calc-custom {
        width: 100%;
        order: 2;
        padding: 0;
    }

    .calc-item-duty .calc-value {
        width: 100%;
        text-align: left;
        min-width: auto;
        order: 3;
    }

    #calcAgeSelectInline {
        max-width: 100%;
    }
}

/* Стили для ручного ввода утильсбора */
#utilSelectorInline {
    display: flex;
    align-items: center;
    gap: 8px;
}

#utilSelect {
    width: 120px;
}

#utilSelectorInline input[type="number"] {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

#utilSelectorInline button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#utilSelectorInline button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    #utilSelectorInline {
        flex-wrap: wrap;
    }

    #utilSelect {
        width: 100%;
    }
}