/* ============================================================================
   Product page visual polish (overrides for extreme theme)
   Loaded via mgAddMeta() from views/product.php
   ============================================================================ */

/* === Breadcrumbs: less visual weight === */
.bread-crumbs {
    padding: 0.6rem 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #8A8A8A;
}
.bread-crumbs__item a {
    color: #8A8A8A;
    text-decoration: none;
    transition: color 0.2s;
}
.bread-crumbs__item a:hover { color: #2B2B2B; }
.bread-crumbs__item .last-crumb { color: #2B2B2B; }
.bread-crumbs__item.separator { margin: 0 0.25rem; color: #DCDCDC; }

/* === Image gallery: clean frame, soft shadow === */
.c-images {
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #ECECEC;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    padding: 1rem;
}
.c-images__big,
.c-main-img__wrap {
    border-radius: 8px;
    overflow: hidden;
}
.c-main-img {
    background-color: #FFFFFF;
}
/* DON'T override background of .c-main-img__wrap — its inline
   background-image is what the JS zoom uses to render the zoomed view. */
.c-images__big img,
.c-main-img {
    object-fit: contain;
    transition: transform 0.4s ease;
}
.c-images:hover img.c-main-img {
    transform: scale(1.02);
}

/* === Right column: spacing and rhythm === */
.product-status .c-product,
.product-details-block {
    color: #2B2B2B;
    font-family: 'Inter', sans-serif;
}

/* === Title === */
.product-status h1,
.product-details-block h1,
.c-product h1 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #1F1F1F !important;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem 0 !important;
}
@media (max-width: 767px) {
    .product-status h1, .product-details-block h1, .c-product h1 {
        font-size: 1.3rem !important;
    }
}

/* === Code / SKU / vendor (small meta line) === */
.c-product__code,
.product-details-block .product-code {
    font-size: 0.82rem;
    color: #8A8A8A;
    margin-bottom: 1rem;
}

/* === Price block === */
.c-product__price--current.normal-price {
    background: #FFFAEC;
    border: 1px solid #FFE9A8;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.c-product__price--current .c-product__price--title {
    font-size: 0.9rem;
    color: #6B6B6B;
    font-weight: 500;
}
.c-product__price--current .c-product__price--value,
.c-product__price--current .price.js-change-product-price {
    font-size: 1.85rem !important;
    font-weight: 700 !important;
    color: #1F1F1F !important;
    line-height: 1;
    letter-spacing: -0.015em;
}
.c-product__price--current .c-product__price--value span[itemprop="priceCurrency"] {
    font-size: 1rem;
    font-weight: 500;
    color: #6B6B6B;
    margin-left: 0.25rem;
}
.c-product__price.old {
    margin-bottom: 0.3rem;
}
.c-product__price.old .c-product__price--value.old-price,
.c-product__price--old s {
    font-size: 0.95rem;
    color: #9A9A9A;
    text-decoration: line-through;
    font-weight: 500;
}

/* === Buy button (Купить на Яндекс Маркете → Подробнее) === */
.c-buy__btn,
.c-buy__btn--default,
.yandex-market-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 52px !important;
    min-width: 240px;
    padding: 0 1.6rem !important;
    background: #FFB400 !important;
    color: #1F1F1F !important;
    border: 0 !important;
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.005em;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(255, 180, 0, 0.18);
}
.c-buy__btn:hover,
.c-buy__btn--default:hover,
.yandex-market-btn:hover {
    background: #F0A800 !important;
    box-shadow: 0 6px 16px rgba(255, 180, 0, 0.32) !important;
    color: #1F1F1F !important;
}
.c-buy__btn:active,
.yandex-market-btn:active {
    transform: translateY(1px);
}
.c-buy__btn .yandex-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #1F1F1F;
    color: #FFB400;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === Sections under main info (description, properties tabs) === */
.c-product .product-description,
.c-product .product-features,
.product-tabs__content {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #FFFFFF;
    border: 1px solid #ECECEC;
    border-radius: 12px;
}
.c-product h2,
.c-product h3 {
    font-weight: 600;
    color: #1F1F1F;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* === Properties table — alternating rows === */
.c-product__props,
.string-properties,
.c-string-properties {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #EFEFEF;
}
.c-product__props li,
.string-properties li,
.c-string-properties li {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #EFEFEF;
    font-size: 0.92rem;
    line-height: 1.4;
}
.c-product__props li:nth-child(even),
.string-properties li:nth-child(even),
.c-string-properties li:nth-child(even) {
    background: #FAFAFA;
}
.c-product__props li:last-child,
.string-properties li:last-child,
.c-string-properties li:last-child {
    border-bottom: 0;
}
.c-product__props li > span:first-child,
.string-properties li > .name,
.c-string-properties li > .name {
    color: #6B6B6B;
    font-weight: 500;
}
.c-product__props li > span:last-child,
.string-properties li > .value,
.c-string-properties li > .value {
    color: #2B2B2B;
    font-weight: 500;
    text-align: right;
}

/* === Description block: readable max-width and rhythm === */
.product-description,
.product-details-block .product-info-text,
.c-product .product-info-text {
    line-height: 1.7;
    color: #3C3C3C;
    font-size: 0.95rem;
}
.product-description p,
.c-product .product-info-text p {
    margin: 0 0 0.85rem 0;
}

/* === Tabs / nav buttons === */
.product-tabs__nav,
.tabs-list,
.tab-titles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.5rem 0 0;
    border-bottom: 1px solid #ECECEC;
    padding-bottom: 0;
}
.product-tabs__nav button,
.tabs-list a,
.tab-titles li {
    padding: 0.7rem 1.2rem;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #8A8A8A;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    border-radius: 0;
}
.product-tabs__nav button.active,
.tabs-list a.active,
.tab-titles li.active {
    color: #1F1F1F;
    border-bottom-color: #FFB400;
    font-weight: 600;
}
.product-tabs__nav button:hover,
.tabs-list a:hover {
    color: #1F1F1F;
}

/* === Hide remnants of old "Yandex Маркет (партнёрский каталог)" seller text on page if any === */
[itemprop="seller"] { display: none; }

/* === Favorites heart button === */
.mg-add-to-favorites,
.mg-remove-to-favorites {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 5;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #ECECEC !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.mg-add-to-favorites:hover,
.mg-remove-to-favorites:hover {
    border-color: #FFB400 !important;
    box-shadow: 0 4px 10px rgba(255, 180, 0, 0.2);
}
.mg-add-to-favorites svg,
.mg-remove-to-favorites svg {
    width: 18px;
    height: 18px;
    fill: #B0B0B0;
    transition: fill 0.2s;
}
.mg-add-to-favorites:hover svg { fill: #FFB400; }
.mg-remove-to-favorites svg { fill: #FFB400; }
.mg-add-to-favorites span,
.mg-remove-to-favorites span { display: none !important; }

/* === Product container spacing === */
@media (min-width: 1024px) {
    .product-status,
    .product-details-block {
        padding: 0.5rem 0;
    }
}

/* === Mobile: more compact === */
@media (max-width: 767px) {
    .c-images { padding: 0.5rem; }
    .c-product__price--current.normal-price {
        padding: 0.85rem 1rem;
    }
    .c-product__price--current .c-product__price--value,
    .c-product__price--current .price.js-change-product-price {
        font-size: 1.5rem !important;
    }
    .c-buy__btn,
    .yandex-market-btn {
        width: 100%;
        height: 48px !important;
        font-size: 0.95rem !important;
    }
}
