/**
 * Стили модалки быстрого просмотра товара (#quick-modal + .product-view внутри).
 *
 * Извлечено из catalog/view/theme/default/stylesheet/product.css — там тот же набор правил
 * подгружается контроллером product/product только на самой карточке. Модалка же открывается
 * с любой страницы (категория, поиск, главная), поэтому её стили вынесены в отдельный файл
 * и подключены глобально через bundles.php → common_styles_head_post.
 *
 * Не дублирует правила .em-product-view, .nav-tabs, .tab-*, .review-*, .product-view-detail —
 * это селекторы полной карточки, они остаются только в product.css.
 */

/* --- Опции товара (radio) — используются если у товара есть variants --- */
#product-options .radio {
    margin: 0;
    margin-right: 5px;
}

#product-options .radio label {
    padding: 0;
    margin: 0;
}

#product-options .radio label input {
    width: 1px;
    height: 1px;
    overflow: hidden;
    position: absolute;
    z-index: -1;
    opacity: 0;
    visibility: hidden;
}

#product-options .radio label span {
    display: block;
    border: 1px solid #D6DBE0;
    border-radius: 5px;
    padding: 5px 15px;
    cursor: pointer;
    user-select: none;
}

#product-options .radio label input:checked+span {
    background: #21467D;
    color: white;
}

/* --- .product-view .right: stock-бейдж, кнопки кол-ва, кнопка корзины --- */
.product-view .right .stock {
    background: #00A400;
    border-radius: 30px;
    font-size: 12px;
    padding: 5px 10px;
    color: white;
    white-space: nowrap;
}

.product-view .right .stock.red {
    background: #C81111;
}

.product-view .right .qty_cart {
    border: 1px solid #D6DBE0;
    height: 49px;
    border-radius: 5px;
    width: 120px;
}

.product-view .right .qty_cart input {
    border: 0;
    background: none;
    font-weight: bold;
    outline: none;
    text-align: center;
    width: 80px;
}

.product-view .right .qty_cart button {
    background: none;
    padding: 0 10px;
    border: 0;
    font-size: 14px;
    color: #848484;
    height: 100%;
}

.product-view .right #product-addtocart-button {
    background: #FFD705;
    border-radius: 5px;
    color: black;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 0;
    white-space: nowrap;
}

/* --- Сетка атрибутов товара --- */
.attr {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 40px;
    grid-row-gap: 10px;
}

.attr-item {
    border-bottom: 1px dashed #D6DBE0;
    padding: 7px 0;
}

.attr-item>span:first-child {
    text-align: left;
    font-weight: 600;
}

.attr-item>span:last-child {
    text-align: right;
}

/* --- Модалка: оболочка --- */
#quick-modal .modal-content {
    padding: 40px;
}

#quick-modal .modal-header {
    padding: 0;
    margin-bottom: 30px;
    border: 0;
}

#quick-modal .modal-header .modal-title {
    font-size: 20px;
}

#quick-modal .modal-body {
    padding: 0;
}

/* --- .product-view: внутренний layout модалки --- */
.product-view {
    column-gap: 40px;
}

.product-view .left {
    max-width: 400px;
    width: 100%;
}

.product-view .left img {
    border-radius: 10px;
}

.product-view .photo .photo-small {
    margin-top: 10px;
}

.product-view .photo .link-wishlist {
    z-index: 5;
    right: 10px;
    top: 10px;
}

.product-view .right {
    display: grid;
    grid-row-gap: 30px;
}

.product-view .right .attr {
    grid-template-columns: repeat(1, 1fr);
}

.product-view .right .attr a {
    color: #21467D;
}

.product-view .right h1 {
    margin: 0;
    font-size: 20px;
}

.product-view .right .price {
    font-size: 30px;
}

.product-view .right .add-to-cart {
    margin-top: 30px;
    column-gap: 10px;
}

.product-view .right .add-to-cart .qty_cart input {
    height: 49px;
    outline: none;
}

.product-view .right .read-more a {
    padding: 15px 0;
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #21467d;
    background: #fafcfd;
    border: 1px solid #d6dbe0;
    text-align: center;
    border-radius: 10px;
}

/* --- Адаптив --- */
@media (max-width: 600px) {
    #quick-modal .modal-content {
        padding: 20px 30px;
    }

    #quick-modal .modal-header {
        margin-bottom: 20px;
    }

    .product-view .right {
        grid-row-gap: 20px;
    }

    .attr {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .attr-item {
        flex-direction: column;
        text-align: left;
        column-gap: 0;
        row-gap: .5rem;
        flex-wrap: wrap;
    }

    .attr-item>span {
        width: 100%;
        text-align: left !important;
    }
}
