/* Стили для модального окна с подробной информацией об объекте */
.cart-item-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-item-row:hover {
    background-color: #f9f9f9;
}
.cart-item-clickable {
    cursor: pointer;
}
.cart-item-cell-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cart-item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
}
.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.cart-item-code {
    font-size: 0.875rem;
    color: #777;
}

/* Модальное окно */
.cart-object-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}
.cart-object-modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 550px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10001;
}
.cart-object-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.cart-object-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.cart-object-modal-header h2 a {
    color: inherit;
    text-decoration: none;
}
.cart-object-modal-header h2 a:hover {
    text-decoration: underline;
}
.cart-object-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #777;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    position: absolute;
    right: 15px;
    top: 15px;
}

.cart-object-modal-close:hover {
    background: #f5f5f5;
    color: #000;
}

.cart-object-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-object-modal-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cart-object-modal-image-wrapper {
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
}

/* Слайдер изображений */
.cart-object-modal-slider {
    position: relative;
    width: 100%;
    height: 310px;
    overflow: hidden;
    background: #f5f5f5;
}

.cart-object-modal-slider-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.cart-object-modal-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.cart-object-modal-slider-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

.cart-object-modal-slider-slide.active {
    opacity: 1;
    position: relative;
}

.cart-object-modal-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
}

.cart-object-modal-slider-loading {
    min-width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.9375rem;
}

.cart-object-modal-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s, transform 0.2s;
    color: #333;
}

.cart-object-modal-slider-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.cart-object-modal-slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.cart-object-modal-slider-btn--prev {
    left: 10px;
}

.cart-object-modal-slider-btn--next {
    right: 10px;
}

.cart-object-modal-slider-btn img {
    width: 20px;
    height: 20px;
}

.cart-object-modal-slider-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-object-modal-slider-separator {
    opacity: 0.7;
}

/* Миниатюры */
.cart-object-modal-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    overflow-x: auto;
    justify-content: center;
    flex-shrink: 0;
}

.cart-object-modal-thumbnail-btn {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    padding: 2px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-object-modal-thumbnail-btn:hover {
    border-color: #ccc;
}

.cart-object-modal-thumbnail-btn.active {
    border-color: #fc5808;
}

.cart-object-modal-thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Обратная совместимость для одного изображения */
.cart-object-modal-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
}

.cart-object-modal-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    /*gap: 1.5rem;*/
    padding: 1.5rem;
}

.cart-object-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-object-section:last-of-type {
    border-bottom: none;
}

.cart-object-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #333;
}

.cart-object-specs {
    display: flex;
    flex-direction: column;
}

.cart-object-spec-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.cart-object-spec-label {
    font-size: 0.875rem;
    color: #777;
    flex-shrink: 0;
    white-space: nowrap;
}

.cart-object-spec-dots {
    flex: 1;
    min-width: 0;
    height: 1px;
    border-bottom: 1px dotted #bbb;
    margin: 0;
    align-self: baseline;
}

.cart-object-spec-value {
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
    flex-shrink: 1;
    text-align: right;
    min-width: 0;
}

#registry-modal-object-hash-link,
#modal-object-hash-link {
    color: #fc5808;
    text-decoration: none;
}

#registry-modal-object-hash-link:hover,
#modal-object-hash-link:hover {
    text-decoration: underline;
}

.cart-object-price-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-object-price-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9f9f9;
}

.cart-object-price-label {
    font-size: 1rem;
    color: #777;
}

.cart-object-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1976d2;
}

.cart-object-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

/* «Подробнее» — оранжевая основная кнопка как в ЛК (.account-primary-btn); для <a> задаём явно, чтобы не перебивали стили ссылок */
.cart-object-modal-footer a#registry-modal-view-details,
.cart-object-modal-footer a#modal-view-registry {
    background: #ff6c37;
    color: #fff;
    border: none;
    text-decoration: none;
}
.cart-object-modal-footer a#registry-modal-view-details:hover,
.cart-object-modal-footer a#modal-view-registry:hover {
    opacity: 0.9;
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cart-object-modal-content {
        max-width: 100%;
        width: 100%;
    }

    .cart-object-spec-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .cart-object-spec-dots {
        display: none;
    }

    .cart-object-spec-value {
        text-align: left;
        padding-left: 0;
    }

    .cart-object-modal-footer {
        flex-direction: column-reverse;
    }

    .cart-object-modal-footer .account-primary-btn,
    .cart-object-modal-footer .account-logout {
        width: 100%;
    }
}

