/*
 * Современная верхняя часть карточки товара MOSTVIDEO.
 * Подключается только на странице товара из product_detailed.tpl.html.
 */

.product-detail-layout {
    width: 100%;
    margin: 10px 0 12px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.product-detail-layout {
    width: 100%;
    max-width: 1000px;
}

.product-detail-info {
    width: auto;
    padding: 8px 12px 14px 8px !important;
    vertical-align: top !important;
}

.product-detail-main-table {
    width: 100%;
    table-layout: auto;
}

.product-detail-poster {
    width: 200px;
    padding: 0 18px 0 0 !important;
    vertical-align: top !important;
    text-align: left;
}

.product-detail-poster img,
.product-detail-poster .imboxl-podr {
    display: block;
    width: 180px !important;
    max-width: 180px;
    height: auto;
    margin: 0;
    padding: 3px;
    border: 1px solid #cfcfcf;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .10);
}

.product-detail-inner-gap {
    width: 4px;
    padding: 0;
}

.product-detail-options {
    width: auto !important;
    padding: 2px 8px 0 4px !important;
    vertical-align: top !important;
    font-size: 12px;
    line-height: 1;
    white-space: normal;
}

.product-detail-options strong {
    color: #111111;
}

.product-detail-options hr {
    height: 0;
    margin: 8px 0;
    border: 0;
    border-top: 1px solid #d7d7d7;
    background: transparent;
}

.product-detail-options input[type="radio"] {
    margin: 0 7px 0 4px;
    vertical-align: middle;
}

.product-detail-options img {
    margin: 2px 6px 2px 0;
}

.product-detail-gap {
    width: 22px;
    padding: 0;
}

.product-buy-cell {
    width: 292px;
    padding: 8px 8px 14px 0 !important;
    vertical-align: top !important;
}

.product-buy-box {
    width: 250px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #d9d9d9;
    border-radius: 11px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .09);
    text-align: center;
}

.product-buy-label {
    margin-bottom: 3px;
    color: #777777;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.product-buy-price {
    margin: 0 0 16px;
    color: #cc6000;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 28px;
    font-weight: bold;
    line-height: 1.15;
    white-space: nowrap;
}

.product-buy-old-price {
    margin: -9px 0 13px;
    color: #999999;
    font-size: 13px;
    text-decoration: line-through;
}

.product-buy-form {
    margin: 0;
    padding: 0;
}

.product-buy-controls {
    width: 100%;
}

.product-buy-qty {
    width: 38px !important;
    height: 32px;
    margin: 0 6px 10px 0 !important;
    padding: 0 5px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center;
    vertical-align: middle;
}

.product-cart-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    min-height: 44px;
    padding: 10px 14px !important;
    border: 1px solid #b55300;
    border-radius: 8px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f18820 0%, #cc6000 100%);
    box-shadow: 0 2px 5px rgba(130, 60, 0, .22);
    color: #ffffff !important;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
    cursor: pointer;
}

.product-cart-btn:hover {
    background: linear-gradient(180deg, #ff9d39 0%, #d96a08 100%);
    box-shadow: 0 3px 7px rgba(130, 60, 0, .30);
    color: #ffffff !important;
    text-decoration: none !important;
}

.product-cart-btn:active {
    position: relative;
    top: 1px;
    box-shadow: 0 1px 3px rgba(130, 60, 0, .22);
}

.product-cart-btn-icon {
    font-size: 20px;
    line-height: 1;
}

.product-favorite-wrap {
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid #e2e2e2;
    text-align: center;
}

.product-favorite-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto !important;
    color: #cc6000 !important;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none !important;
}

.product-favorite-btn:hover {
    color: #9e4a00 !important;
    text-decoration: none !important;
}

.product-favorite-heart {
    display: inline-block;
    color: #cc6000;
    font-size: 25px;
    line-height: 1;
}

.product-favorite-text {
    color: inherit !important;
    line-height: 1.2;
}

.product-compare-link {
    display: block !important;
    width: auto !important;
    margin-top: 12px;
    color: #777777 !important;
    font-size: 12px;
    text-decoration: underline !important;
}

.product-compare-link:hover {
    color: #cc6000 !important;
}

/* Убираем старую рамку/заливку верхнего блока только внутри новой карточки. */
.product-detail-layout .hdbtop {
    background: transparent;
}

/* На узких экранах карточка складывается по вертикали. */
@media screen and (max-width: 1050px) {
    .product-detail-layout,
    .product-detail-layout > tbody,
    .product-detail-layout > tbody > tr,
    .product-detail-info,
    .product-detail-gap,
    .product-buy-cell {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .product-detail-gap {
        height: 12px;
    }

    .product-buy-cell {
        padding: 0 8px 16px !important;
    }

    .product-buy-box {
        width: auto;
        max-width: 360px;
    }
}

/*
 * MOSTVIDEO — адаптация блока покупки для планшетов и телефонов.
 * Добавить в конец product_card.css.
 */

@media screen and (max-width: 1050px) {
    .product-detail-gap {
        height: 6px;
    }

    .product-buy-cell {
        padding: 0 8px 14px !important;
    }

    .product-buy-box {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 14px;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 12px 14px;
        box-sizing: border-box;
    }

    .product-buy-label {
        display: none;
    }

    .product-buy-price {
        flex: 0 0 125px;
        margin: 0;
        font-size: 26px;
        text-align: left;
    }

    .product-buy-old-price {
        flex: 0 0 auto;
        margin: 0;
    }

    .product-buy-form {
        flex: 1 1 260px;
        min-width: 0;
    }

    .product-favorite-wrap {
        flex: 0 0 100%;
        margin-top: 0;
        padding-top: 10px;
    }

    .product-compare-link {
        flex: 0 0 100%;
        margin-top: 0;
    }
}

@media screen and (max-width: 620px) {
    .product-detail-main-table,
    .product-detail-main-table > tbody,
    .product-detail-main-table > tbody > tr,
    .product-detail-poster,
    .product-detail-inner-gap,
    .product-detail-options {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .product-detail-poster {
        padding: 0 0 14px !important;
        text-align: center;
    }

    .product-detail-poster a {
        display: inline-block;
    }

    .product-detail-poster img,
    .product-detail-poster .imboxl-podr {
        margin: 0 auto;
    }

    .product-detail-inner-gap {
        height: 0;
    }

    .product-detail-options {
        padding: 0 4px !important;
    }

    .product-buy-box {
        display: block;
        padding: 14px;
    }

    .product-buy-price {
        margin: 0 0 12px;
        text-align: center;
    }

    .product-buy-form {
        width: 100%;
    }

    .product-favorite-wrap {
        margin-top: 12px;
    }
}

