@charset "UTF-8"; 

/* ================================================================= */
/* 1. БАЗОВЫЕ СТИЛИ: РЕЖИМ СЕТКИ (по умолчанию и при разрешении ≤ 790px) */
/* ================================================================= */

/* Основной контейнер */
.product-item__inner {
    display: flex;
    flex-direction: column;
    /* Установите вашу желаемую ширину для режима сетки здесь, например: */
    /* width: 280px; */ 
    height: auto; /* Высота авто для адаптации к названию */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Блок изображения (TOP) */
.product-item__top {
    position: relative;
    padding-bottom: 100%; /* Соотношение 1:1 */
    height: 0;
    overflow: hidden;
}

.gr-product-image, .gr-product-image a, .gr-product-image img {
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    height: 100%;
}

.gr_image_contain {
    object-fit: contain;
    display: block;
}

/* Блок информации (BOTTOM) */
.product-item__bottom {
    display: flex;
    padding: 15px;
    flex-grow: 1;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
}

.product-item__bottom-left {
    display: flex;
    flex-grow: 1;
    min-width: 0;
    /* Задаем фиксированную высоту для текста в режиме сетки */
    min-height: 100%;
    height: 90px;
    overflow: hidden; 
    justify-content: center;
    align-items: center;
}

.product-additional__top {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.gr-amount-flag {
    width: 100%;
    display: flex;
}

.product-item__bottom-right {
    flex-shrink: 0;
    width: 100%; 
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Название (Ограничение 2 строки) */
.gr-product-name a h2 { 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 5px 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    color: #333;
}

.item-breif {
    display: none /* Скрываем в режиме сетки */
}

/* Цена и Наличие */
.gr-amount-flag span {
    display: inline-block;
    font-size: 13px;
    line-height: 13px;
    background-color: #016ead;
    color: white;
    padding: 5px 10px 5px;
    margin-bottom: 5px;
}

.product-price {
    min-height: 45px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
}

.price-current strong {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: #2c2e32;
    line-height: 1.2;
}

.price-current p {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

/* Кнопки и Количество */
.product-additional__bottom {
    display: flex;
    flex-direction: column; 
    gap: 10px;
}

.product-item-btns {
    display: flex;
    flex-direction: row; 
    gap: 5px;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.product-amount-control-basket {
    display: flex;
    flex-direction: row;
    gap: 50px; 
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* БЛОК КОЛИЧЕСТВА [-] [1] [+] */
.product-amount-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.product-amount-control input[type="text"] {
    width: 40px;
    height: 34px; 
    line-height: 34px;
    border: none;
    text-align: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-size: 14px;
    -moz-appearance: textfield;
}

.product-amount-control input::-webkit-outer-spin-button, .product-amount-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-amount-control button {
    height: 34px;
    width: 30px;
    border: none;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    transition: background-color 0.1s;
    padding: 0;
    box-shadow: none;
}

.product-amount-control button:hover {
    background: #e0e0e0;
}

/* КНОПКА КОРЗИНЫ С ИКОНКОЙ */
.shop-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ff660000;
    color: #016ead;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: none;
    transition: background-color 0.2s;
}

.shop-product-btn:hover, button:hover {
    color: #03A9F4;
    background: white
}

.shop-product-btn.icon-only {
    width: 65px; 
    height: 65px;
    padding: 0;
    flex-shrink: 0;
}

.shop-product-btn.icon-only .fa {
    font-size: 45px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* ================================================================= */
/* 2. СТИЛИ ДЛЯ РЕЖИМА СПИСКА (РАБОТАЕТ, КОГДА ШИРИНА > 790PX) */
/* ================================================================= */

.list-item-view-mode-list .goods-list {
    display: block; 
}

.list-item-view-mode-list .list-item {
    width: 100%; 
    margin: 0 0 15px 0; 
    box-sizing: border-box;
}

.list-item-view-mode-list .product-item__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 700px;
    margin: 0 auto;
}

.list-item-view-mode-list .product-item__top {
    flex-shrink: 0; 
    width: 120px; 
    height: 120px; 
    margin-right: 20px; 
    padding-bottom: 0; 
    position: relative; 
    overflow: hidden;
}

.list-item-view-mode-list .gr-product-image,
.list-item-view-mode-list .gr-product-image a {
    position: static; 
    width: 100%;
    height: 100%;
}

.list-item-view-mode-list .gr-product-image img {
    object-fit: contain;
    position: static;
}

.list-item-view-mode-list .product-item__bottom {
    flex-grow: 1; 
    display: flex;
    flex-direction: row; 
    align-items: center; 
    padding: 0; 
    overflow: visible;
}

.list-item-view-mode-list .product-item__bottom-left {
    flex-grow: 1;
    min-width: 0;
    height: auto; 
    overflow: visible;
    justify-content: flex-start; 
    align-items: flex-start;
    flex-direction: column; 
}

/* Название (в списке без ограничения строк) */
.list-item-view-mode-list .gr-product-name a h2 {
    -webkit-line-clamp: unset; 
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: 20px; 
    line-height: 1.3;
}

/* Краткое описание (показываем в списке) */
.list-item-view-mode-list .item-breif {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    height: auto;
    font-size: 14px;
    color: #555;
    margin-top: 5px;
    margin-left: 0!important;
}

.list-item-view-mode-list .product-item__bottom-right {
    flex-shrink: 0;
    width: auto; 
    margin-left: 20px;
    text-align: right;
    
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: flex-end; 
    gap: 20px; 
}

.list-item-view-mode-list .product-additional__top {
    display: flex;
    flex-direction: column; 
    align-items: flex-end; 
    text-align: right;
}

.list-item-view-mode-list .gr-amount-flag {
    justify-content: flex-end;
}

.list-item-view-mode-list .product-price {
    font-size: 16px;
}

.list-item-view-mode-list .product-additional__bottom {
    flex-shrink: 0;
    flex-direction: row; 
    gap: 8px; 
}

.list-item-view-mode-list .product-additional__add {
    display: none;
}

/* ================================================================= */
/* 3. АДАПТАЦИЯ (MEDIA QUERY): ВОЗВРАТ К СЕТКЕ ПРИ ШИРИНЕ ≤ 790PX */
/* ================================================================= */

@media (max-width: 790px) {
    /* 1. Возвращаем режим сетки для контейнеров */
    .list-item-view-mode-list .goods-list {
        display: flex;
        flex-wrap: wrap; 
        justify-content: space-around; 
        gap: 15px; 
    }

    .list-item-view-mode-list .list-item {
        /* Делаем две карточки в ряд, учитывая отступы */
        width: calc(50% - 15px); 
        max-width: 350px; 
        margin: 0; 
    }

    /* 2. Возвращаем внутреннюю структуру карточки в режим СЕТКИ (вертикальный) */
    .list-item-view-mode-list .product-item__inner {
        flex-direction: column; /* Вертикальная раскладка */
        width: 100%;
        height: auto; 
        padding: 0; /* Убираем padding, чтобы он был только в .product-item__bottom */
    }

    /* 3. Возвращаем стили блоков TOP/BOTTOM к СЕТКЕ */
    .list-item-view-mode-list .product-item__top {
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* Соотношение 1:1 */
        margin-right: 0;
        position: relative;
    }
    
    .list-item-view-mode-list .gr-product-image,
    .list-item-view-mode-list .gr-product-image a {
        position: absolute;
    }

    .list-item-view-mode-list .product-item__bottom {
        flex-direction: column; 
        padding: 15px; /* Возвращаем padding */
        overflow: hidden;
    }
    
    /* 4. Возвращаем ЛЕВЫЙ блок к стилям СЕТКИ */
    .list-item-view-mode-list .product-item__bottom-left {
        height: 90px; 
        overflow: hidden;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Название: возвращаем ограничение 2 строки */
    .list-item-view-mode-list .gr-product-name a h2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 16px;
    }
    
    /* Описание: скрываем обратно */
    .list-item-view-mode-list .item-breif {
        display: none; 
    }

    /* 5. Возвращаем ПРАВЫЙ блок к стилям СЕТКИ */
    .list-item-view-mode-list .product-item__bottom-right {
        width: 100%;
        margin-left: 0;
        flex-direction: column; /* Вертикальная раскладка */
        text-align: left;
    }
    
    .list-item-view-mode-list .product-additional__top {
        align-items: flex-start; /* Прижимаем цену/наличие к левому краю */
        text-align: left;
    }
    
    .list-item-view-mode-list .gr-amount-flag {
        justify-content: flex-start;
    }

    .list-item-view-mode-list .product-additional__bottom {
        flex-direction: column; /* Кнопки снова вертикально */
        gap: 10px;
    }
    .list-item-view-mode-list .item-breif {
        display:none!important
    }
}
/* ================================================================= */
/* 1. КОНТЕЙНЕР ФОРМЫ */
/* ================================================================= */
/* Стиль для родительского контейнера формы (например, если форма внутри модального окна) */
#fast-order-message form {
    background-color: #1e1e1e; /* Темный фон */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    margin: 20px auto;
    color: #f0f0f0; /* Светлый текст */
    font-family: Arial, sans-serif;
}

/* ================================================================= */
/* 2. СТИЛИ ПОЛЕЙ ВВОДА (INPUT TEXT) */
/* ================================================================= */
#fast-order-message input[type="text"],
#fast-order-message input[type="tel"],
#fast-order-message .maskedInput {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: inline-block;
    border: 1px solid #444; /* Темная рамка */
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #2b2b2b; /* Фон поля чуть светлее фона контейнера */
    color: #f0f0f0;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Стили для маскированного поля при вводе текста (если оно показывает текст по умолчанию) */
input[type="text"][value="Введите номер телефона"] {
    color: #aaa; /* Более тусклый цвет для подсказки */
}

/* Фокус на поле ввода */
input[type="text"]:focus,
input[type="tel"]:focus,
.maskedInput:focus {
    border-color: #00bcd4; /* Акцентный цвет (бирюзовый) */
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.5);
    outline: none; /* Убираем стандартное выделение браузера */
}

/* Стиль для placeholder */
input::placeholder {
    color: #888;
}

/* ================================================================= */
/* 3. КНОПКА ОТПРАВКИ (SUBMIT) */
/* ================================================================= */
input[type="submit"] {
    width: 100%;
    background-color: #f7971e; /* Акцентный цвет */
    color: white;
    padding: 14px 20px;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.1s;
}

input[type="submit"]:hover {
    background-color: #0097a7; /* Чуть темнее при наведении */
}

input[type="submit"]:active {
    transform: scale(0.99); /* Эффект нажатия */
}

/* ================================================================= */
/* 4. СКРЫТЫЕ ПОЛЯ */
/* ================================================================= */
/* Убедитесь, что скрытые поля не мешают макету */
input[type="hidden"] {
    display: none;
}
.fancybox-outer {
    background-color:#ffffff!important
}
.buy_1 a {
    color:#016ead;
    font:bold 16px / normal Open Sans;
    background: #white;
    box-shadow: inset 0 0 0 1px black;
    padding:8px
}
.buy_1:hover a {
    background:#016ead;
    color:white;
}