/* entrance-doors-mobile.css - Стили только для мобильных устройств (max-width: 768px) */
@charset "UTF-8";

/* Кнопка "Межкомнатные двери" для мобильной версии */
.mobile-back-button-container {
    display: none; /* Скрыта по умолчанию (на десктопе) */
    background: white;
    padding: 15px 20px;
    margin: 0 20px 20px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    color: #4361ee;
    transition: all 0.3s;
}

.mobile-back-button-container:hover {
    background: #f8f9fa;
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    /* Показываем мобильную кнопку */
    .mobile-back-button-container {
        display: block;
    }
    
    /* Скрываем оригинальную кнопку в хедере на мобильных */
    .header-nav-zone.left {
        display: none;
    }
}

/* Адаптивность панели выбора цвета */
@media (max-width: 1200px) {
.palette-grid {
grid-template-columns: repeat(5, 70px);
}
}

@media (max-width: 1000px) {
.palette-grid {
grid-template-columns: repeat(4, 70px);
}
.color-palette-panel {
left: calc(100% - 400px);
width: 380px;
}
}

@media (max-width: 768px) {
.main-container {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
margin-bottom: 20px;
}
.pagination-container {
flex-direction: column;
gap: 10px;
}
.product-list-item {
grid-template-columns: 1fr auto;
gap: 10px;
}
.product-list-item .item-info {
display: none;
}
.product-list-item .list-actions {
grid-column: 2;
margin-top: 0;
}
.product-list-item .model-name {
grid-column: 1;
}
.product-group.compact-view .image-container.full-height {
height: 400px;
}
.item-cell,
.detail-sizes-table .item-cell,
.trim-table .item-cell,
.item-header,
.detail-sizes-table .item-header,
.trim-table .item-header {
display: none !important;
}
.product-group.compact-view h3 {
height: 36px;
font-size: 1rem;
}
.product-group.compact-view .price {
font-size: 1.2rem;
}
.view-mode-toggle {
flex-direction: column;
gap: 5px;
}
.header-meta {
flex-direction: column;
align-items: center;
}
.auth-controls {
flex-wrap: wrap;
justify-content: center;
}
.modal-content {
width: 90%;
padding: 15px;
}
.size-item .cart-control-container, .list-actions .cart-control-container {
position: relative;
display: inline-block;
}
.size-item .cart-popup {
right: -10px;
}
.out-of-stock-notice,
.cart-notice,
.form-notice,
.order-notice {
font-size: 0.85rem;
padding: 8px;
}
.notification {
width: 95%;
max-width: 95%;
}
.color-palette-panel {
position: fixed;
left: 50%;
transform: translateX(-50%);
width: 90%;
max-width: 400px;
top: 50%;
transform: translate(-50%, -50%);
}
.palette-grid {
grid-template-columns: repeat(4, 60px);
}
.color-item {
width: 60px;
height: 60px;
}

/* Задача 1: Изменение расположения модального окна */
.product-detail-container {
flex-direction: column;
}
.product-main {
flex-direction: column;
}
.product-images {
width: 100%;
margin-bottom: 15px;
text-align: center;
}
#detail-product-image {
max-width: 100%;
height: auto;
max-height: 600px;
object-fit: contain;
margin: 0 auto;
}
.hover-actions {
top: 20px;
right: 10px;
}
#detail-placeholder {
width: 100%;
min-height: 200px;
display: none;
align-items: center;
justify-content: center;
}
.product-info {
width: 100%;
}

/* Задача 2: Изменение таблицы в мобильной версии */
.table-header {
display: none;
}
.item-cell {
display: none;
}
.item-header {
display: none;
}

/* Изменение порядка ячеек в мобильной версии */
.table-row {
position: relative;
padding-right: 60px;
border-bottom: 1px solid #eee;
}
.table-cell {
display: block;
width: 100%;
}
.size-cell {
font-weight: bold;
font-size: 1.1em;
}
.stock-cell {
color: #666;
}
.stock-cell.available::after {
content: "";
}
.stock-cell.unavailable::after {
content: "";
}
.price-range-container {
width: 100%;
margin-top: 0px;
position: relative;
padding: 0px 0;
}
.price-range-slider {
position: relative;
height: 24px;
width: 98%;
margin: 20px 0;
margin-left: 3px;
touch-action: none;
}
.price-range-values {
text-align: center;
font-size: 16px;
color: rgb(67, 97, 238);
font-weight: bold;
margin-top: 10px;
}
.price-range-values span {
font-weight: bold;
color: #4361ee;
}
.slider-track {
position: absolute;
height: 6px;
width: 100%;
background: #e9ecef;
border-radius: 3px;
top: 50%;
transform: translateY(-50%);
}
.slider-range {
position: absolute;
height: 6px;
background: #4361ee;
border-radius: 3px;
top: 50%;
transform: translateY(-50%);
z-index: 1;
}
.slider-thumb {
position: absolute;
width: 6px;
height: 24px;
background: rgb(67, 97, 238);
top: 50%;
transform: translate(-50%, -50%);
cursor: grab;
z-index: 5;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.slider-thumb::before,
.slider-thumb::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 12px;
height: 4px;
background: rgb(67, 97, 238);
}
.slider-thumb::before {
top: 0px;
}
.slider-thumb::after {
bottom: 0px;
}
.slider-thumb.active {
cursor: grabbing;
transform: translate(-50%, -50%) scale(1.1);
}
.slider-tooltip {
position: absolute;
background: rgb(67, 97, 238);
color: white;
border-radius: 4px;
padding: 4px 8px;
font-size: 14px;
font-weight: bold;
top: -40px;
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
opacity: 0;
transition: opacity 0.2s;
pointer-events: none;
min-width: 60px;
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.slider-tooltip.visible {
opacity: 1;
}
.slider-thumb.min-thumb::before {
left: 6px;
}
.slider-thumb.min-thumb::after {
left: 6px;
}
.slider-thumb.max-thumb::before {
right: -6px;
left: auto;
}
.slider-thumb.max-thumb::after {
right: -6px;
left: auto;
}
.price-cell {
font-weight: bold;
color: #4361ee;
font-size: 1.0em;
margin: 5px 0;
}
.actions-cell {
position: absolute;
top: 50%;
right: 20px;
transform: translateY(-50%);
display: flex;
flex-direction: column;
align-items: center;
width: 40px;
}
.cart-control-container {
position: relative;
}
.cart-popup {
right: 40px !important;
left: auto !important;
top: auto !important;
}
#cart-modal .close {
position: fixed;
top: 15px;
right: 15px;
z-index: 1001;
background: #dc3545;
color: #ffffff;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 20px;
line-height: 1;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
padding: 0;
}
#cart-modal .modal-content {
padding-top: 55px;
}
#cart-modal .modal-content {
padding-bottom: 20px;
}
.cart-item-actions {
gap: 3px;
}
.cart-item .remove-btn {
background: #ffffff;
color: #dc3545;
width: 24px;
height: 24px;
font-size: 16px;
}
.cart-item {
flex-direction: column;
align-items: flex-start;
}
.cart-item-actions {
align-self: flex-end;
margin-top: 8px;
}
.trim-table .table-header {
display: none;
}
.trim-table .item-cell {
display: none;
}
.trim-table .table-row {
position: relative;
padding-right: 60px;
border-bottom: 1px solid #eee;
padding: 12px 0;
font-size: 0.8rem;
align-items: center;
}
.trim-table .table-cell {
display: block;
width: 100%;
}
.trim-table .actions-cell {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
display: flex;
flex-direction: column;
align-items: center;
width: 40px;
}
.trim-table .cart-popup {
right: 40px !important;
left: auto !important;
top: -30px !important;
}
.modal-content.product-detail-content {
width: 95%;
max-width: 500px;
margin: 20px auto;
padding: 15px;
}
.product-detail-content h2 {
font-size: 1.4em;
margin-top: 10px;
}
.detail-price {
font-size: 1.5em;
color: #4361ee;
margin: 5px 0 15px 0;
}
h3.trim-items-title {
font-size: 1.3em;
margin: 20px 0 10px 0;
}
.trim-group-header {
font-size: 1.1em;
}
}

/* Дополнительные стили для адаптивности всплывающего окна корзины */
@media (max-width: 480px) {
.cart-popup {
min-width: 180px !important;
right: 50px !important;
height: 28px;
}
.quantity-input {
width: 40px !important;
font-size: 0.9em !important;
}
.buy-btn {
font-size: 0.8em !important;
padding: 3px 5px !important;
}
#product-detail-modal .close {
position: fixed;
top: 15px;
right: 15px;
z-index: 1001;
background: #dc3545;
color: #ffffff;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 20px;
line-height: 1;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
padding: 0;
}
#product-detail-modal .product-detail-content {
padding-top: 55px;
}
#product-detail-modal .product-detail-container {
padding-bottom: 20px;
}
}

.detailed-view-toggle {
    width: 86%;
}

.detailed-view-toggle label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    cursor: pointer;
    width: 100%;
}

.detailed-view-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.detailed-view-toggle span {
    flex: 1;
    text-align: left;
}

/* Исправление отображения характеристик в мобильной версии */
.specs-grid {
    grid-template-columns: 1fr !important; /* Одна колонка вместо двух */
    gap: 10px !important;
}

.spec-column {
    width: 100% !important;
}

.spec-item {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Label и значение в две колонки */
    gap: 10px !important;
    padding: 8px !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
    margin-bottom: 5px !important;
}

.spec-label {
    font-weight: bold !important;
    color: #555 !important;
    white-space: nowrap !important;
}

.spec-value {
    text-align: left !important;
    word-break: break-word !important; /* Перенос длинных слов */
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .spec-item {
        grid-template-columns: 1fr !important; /* Всё в одну колонку */
        gap: 5px !important;
    }
    
    .spec-label {
        color: #4361ee !important; /* Выделим цветом заголовки */
        font-size: 0.9em !important;
    }
}

/* Исправление положения кнопок действий - должны быть справа */
.action-buttons {
    opacity: 1 !important; /* Всегда видимы */
    justify-content: flex-end !important; /* Прижимаем вправо */
    margin-left: auto !important; /* Отступ слева автоматически */
    display: flex !important;
    gap: 5px !important;
}

.size-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important; /* Распределяем пространство */
    padding: 12px 0 !important;
    border-bottom: 1px solid #eee !important;
}

.size-label {
    flex: 1; /* Занимает доступное пространство */
    font-weight: bold !important;
    text-align: left !important;
}

.stock-quantity {
    text-align: center !important;
    margin: 0 10px !important;
    color: #38b000 !important;
    font-weight: 500 !important;
}

/* Крестик закрытия модального окна входных дверей */
#entrance-product-modal .close {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: #dc3545;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 0;
    border: none;
}

#entrance-product-modal .product-detail-content {
    padding-top: 55px;
}