/* Catalog product page (Product.cshtml + _DetailsOffersPartial — также Offer.cshtml без обёртки .ProductPage) */

:root {
    --product-page-border: #e0e0e0;
    --product-page-navy: #1a2b4a;
    --product-page-blue: #0d6efd;
    --product-page-green: #28a745;
    --product-page-orange: #fd7e14;
}

/* Дублируем на блоке страницы товара на случай переопределения темой только здесь */
.ProductPage {
    --product-page-border: #e0e0e0;
    --product-page-navy: #1a2b4a;
    --product-page-blue: #0d6efd;
    --product-page-green: #28a745;
    --product-page-orange: #fd7e14;
}

.ProductPage-mainRow {
    margin-bottom: 2rem;
}

.ProductPage-title {
    color: var(--product-page-navy);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    text-transform: none;
    padding-bottom: 0;
}

.ProductPage-title::after {
    display: none;
}

.ProductPage-subtitle {
    color: var(--product-page-navy);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.ProductPage-attrs {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.ProductPage-attrs dt {
    float: left;
    clear: left;
    width: 8.5rem;
    margin: 0;
    padding: 0.2rem 0;
    font-weight: 600;
    color: #333;
}

.ProductPage-attrs dd {
    margin: 0 0 0 8.5rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--product-page-border);
}

.ProductPage-attrs dd:last-of-type {
    border-bottom: none;
}

.ProductPage-gallery {
    border: 1px solid var(--product-page-border);
    background: #fff;
    padding: 0.75rem;
}

.ProductPage-gallery .CarouselContainer {
    max-width: 100%;
}

/* Сайтовый .CarouselBlock задаёт height:400px — для карточки товара это ломает сетку */
.ProductPage-gallery .CarouselBlock {
    height: auto !important;
    margin-bottom: 0 !important;
    overflow: visible;
}

.ProductPage-gallery .carousel.slide {
    overflow: hidden;
}

.ProductPage-gallery .carousel-inner {
    border: 1px solid var(--product-page-border);
    background: #fafafa;
    overflow: hidden;
}

/* Убираем w-100 у главного слайда: иначе высота по пропорциям выходит за max-height */
.ProductPage-gallery .carousel-item {
    text-align: center;
}

.ProductPage-gallery .carousel-item img {
    display: block;
    max-height: 360px;
    max-width: 100%;
    width: auto !important;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

.ProductPage-gallery .carousel-item a {
    display: block;
}

.ProductPage-gallery .carousel-indicators {
    position: static;
    margin: 0.75rem 0 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

.ProductPage-gallery .carousel-indicators li {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    margin: 0.25rem;
    text-indent: 0;
    border: 2px solid transparent;
    border-radius: 2px;
    background-color: #fff;
    opacity: 1;
}

.ProductPage-gallery .carousel-indicators li img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.ProductPage-gallery .carousel-indicators li.active {
    border-color: var(--product-page-blue);
}

.ProductPage-gallery .ProductPage-singleImage {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

/* Offers table */
.ProductPageOffers-table {
    border: 1px solid var(--product-page-border);
}

.ProductPageOffers-table thead th {
    background: #f5f5f5;
    border-bottom: 1px solid var(--product-page-border);
    color: #444;
    font-weight: 600;
    font-size: 0.85rem;
    vertical-align: middle;
}

.ProductPageOffers-table tbody td {
    border-color: var(--product-page-border);
    vertical-align: middle;
}

.ProductPageOffers-selectCol {
    width: 2.5rem;
}

.ProductPageOffers-selectCell {
    position: relative;
}

.ProductPageOffers-selectCell input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.ProductPageOffers-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ProductPageOffers-row:has(input._CartOffer:checked),
.ProductPageOffers-row.is-selected {
    background: var(--product-page-blue);
    color: #fff;
}

.ProductPageOffers-row:has(input._CartOffer:checked) a,
.ProductPageOffers-row:has(input._CartOffer:checked) label,
.ProductPageOffers-row.is-selected a,
.ProductPageOffers-row.is-selected label {
    color: #fff;
}

.ProductPageOffers-row:has(input._CartOffer:checked) .ProductPageOffers-check,
.ProductPageOffers-row.is-selected .ProductPageOffers-check {
    opacity: 1;
}

.ProductPageOffers-hitTarget {
    cursor: pointer;
    display: block;
    width: 100%;
}

.ProductPage-btnAddToCart {
    border: 2px solid var(--product-page-blue);
    color: var(--product-page-blue);
    background: #fff;
}

.ProductPage-btnAddToCart:hover {
    background: #f0f7ff;
    color: var(--product-page-blue);
}

.ProductPage-btnBuyNow {
    border: 2px solid var(--product-page-blue);
    color: var(--product-page-blue);
    background: #fff;
}

.ProductPage-btnBuyNow:hover {
    background: #f0f7ff;
    color: var(--product-page-blue);
}

.ProductPage-btnAsk {
    border: 2px solid var(--product-page-blue);
    color: var(--product-page-blue);
    background: #fff;
}

.ProductPage-btnAsk:hover {
    background: #f0f7ff;
    color: var(--product-page-blue);
}

.ProductPage-section {
    border-top: 1px solid var(--product-page-border);
    padding-top: 1.25rem;
    margin-top: 1.5rem;
}

.ProductPage-sectionTitle {
    color: var(--product-page-navy);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.ProductPage-description {
    font-size: 0.9375rem;
}

.ProductPage-description ul {
    padding-left: 1.1rem;
    margin: 0;
}

.ProductPage-description ul li {
    margin-bottom: 0.35rem;
}

.ProductPage-footerLinks {
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.ProductPage-footerLinks a {
    color: var(--product-page-blue);
}

.ProductPage-warrantyLink {
    color: var(--product-page-blue);
    text-decoration: underline;
    word-break: break-all;
}

.ProductPage-warrantyLink:hover {
    color: var(--product-page-blue);
    text-decoration: underline;
}

footer.ProductPage-footerLinks .ProductPage-warrantyHeading,
.ProductPage-footerLinks h3.ProductPage-warrantyHeading {
    color: #111 !important;
    font-size: 1.0625rem !important;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ProductPage-warrantyBody--custom {
    white-space: pre-wrap;
    word-break: break-word;
}

.ProductPage-appliesTable {
    font-size: 0.9rem;
}
