/* Стили для карточки товара - новый формат */
.product-visible {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.product-gallery-column {
    flex: 0 0 19% !important;
    max-width: 19% !important;
    box-sizing: border-box;
}

.product-info-column {
    flex: 0 0 48% !important;
    max-width: 48% !important;
    box-sizing: border-box;
}

.product-aside-column {
    flex: 0 0 29% !important;
    max-width: 29% !important;
    box-sizing: border-box;
}

.product-header-top {
    width: 100%;
    margin-bottom: 20px;
}

.product-header-modern {
    margin-bottom: 20px;
}

.product-title-modern {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #333;
}

.product_card__meta {
    margin: 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.product_card__info {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.product_card__meta-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #000;
}

.product_card__meta dl,
.product_card__meta .expand-content {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px 30px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.product_card__meta-row {
    display: contents; /* Убираем строки, все элементы становятся частью родительской сетки */
}

/* Адаптивная сетка: 4 колонки на больших экранах, 3 на средних, 2 на маленьких */
@media (min-width: 1400px) {
    .product_card__meta dl,
    .product_card__meta .expand-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1399px) {
    .product_card__meta dl,
    .product_card__meta .expand-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product_card__meta dl,
    .product_card__meta .expand-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .product_card__meta dl,
    .product_card__meta .expand-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    /* Отступы для wrapper с breadcrumbs на мобилке */
    .wrapper {
        margin-left: 15px !important;
        margin-right: 15px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Компактные breadcrumbs на мобилке */
    #breadcrumbs {
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 8px 0 !important;
        margin-bottom: 8px !important;
    }
    
    #breadcrumbs .breadcrumbs__item {
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
    }
    
    #breadcrumbs .breadcrumbs__item--separator {
        margin: 0 4px !important;
        font-size: 10px !important;
    }
    
    #breadcrumbs .breadcrumbs__link {
        font-size: 11px !important;
        white-space: nowrap;
    }
    
    /* Выравнивание элементов влево на мобилке */
    .product_card__meta dd,
    .product_card__meta dt,
    .expand-content dd,
    .expand-content dt,
    .product_card__meta-row,
    .product_card__meta_left,
    .product_card__meta_right {
        text-align: left !important;
    }
}

.product_card__meta_left,
.product_card__meta_right {
    display: flex;
    flex-direction: column;
}

.product_card__meta dt {
    display: block;
    font-weight: 400;
    margin: 0 0 8px 0;
    color: #808080;
    font-size: 14px;
    line-height: 1.4;
}

.product_card__meta dd {
    display: block;
    margin: 0;
    color: #000;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
}

.product_card__meta_more {
    margin-top: 15px;
}

.product_card__meta_link {
    display: inline-block;
    color: #f0cf4c;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    font-weight: 500;
}

.product_card__meta_link:hover {
    color: #e0bf3c;
    text-decoration: underline;
}

.productPrice--FrVYO {
    margin-bottom: 15px;
}

.priceBlockPrice--xf8pi {
    display: block;
}

.priceBlockFinalPrice--iToZR {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.actionsBlockMain--Wg5sn {
    margin-bottom: 15px;
}

.order--m6Y5H {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.productPageAside--k2l7R {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product_card__status {
    display: inline-block;
    padding: 4px 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.product_card__img_wrap {
    margin-bottom: 30px;
    width: 100%;
}

.product_card__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

.sub {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.sub a {
    color: #333;
    text-decoration: none;
}

.sub a:hover {
    color: #f0cf4c;
    text-decoration: underline;
}

.product_card__links {
    margin-top: 12px;
    margin-bottom: 23.5px;
}

.product-aside-column .btn,
.product-aside-column .product_card__to_cart,
.product-aside-column .product_card__get_price {
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box;
    text-align: center;
    border-radius: 12px !important;
    height: auto;
    min-height: 44px;
    line-height: 1.4;
}

.product-aside-column .order--m6Y5H {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.product-aside-column .order--m6Y5H .btn,
.product-aside-column .order--m6Y5H .product_card__to_cart,
.product-aside-column .order--m6Y5H .product_card__get_price {
    margin-bottom: 10px !important;
    width: 100% !important;
}

.product-aside-column .order--m6Y5H .btn:last-child,
.product-aside-column .order--m6Y5H .product_card__get_price {
    margin-bottom: 0 !important;
}

.product-aside-column .product_card__to_cart {
    background-color: #f0cf4c !important;
    color: #000 !important;
    border: none !important;
}

.product-aside-column .product_card__get_price {
    background-color: #fff !important;
    color: #333 !important;
    border: 2px solid #f0cf4c !important;
}

.product_card__link {
    color: #666;
    text-decoration: underline;
    font-size: 14px;
}

.product_card__link:hover {
    color: #f0cf4c;
}

/* Соц-сети и кнопка "Узнать цену" в одну строку */
.product_card__social-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product_card__social {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.product_card__social-price-row .product_card__get_price {
    flex: 1;
    min-width: 0;
}

.product_card__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product_card__social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product_card__social-link i {
    font-size: 18px;
}

.product_card__social-link[title="WhatsApp"] i {
    color: #25D366;
}

.product_card__social-link[title="Telegram"] i {
    color: #0088cc;
}

.product_card__social-link[title="Viber"] i {
    color: #665CAC;
}

/* Дополнительные действия */
.product_card__additional-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.product_card__action-btn {
    display: block;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
}

.product_card__action-btn:hover {
    border-color: #f0cf4c;
    color: #f0cf4c;
    background: #fffef5;
}

.product_card__action-btn--analog {
}

.product_card__action-btn--help {
}

/* Адаптивность */
@media (max-width: 992px) {
    .product-visible {
        flex-direction: column;
        gap: 20px;
        width: 100% !important;
    }
    
    .product-gallery-column,
    .product-info-column,
    .product-aside-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .productPageAside--k2l7R {
        position: static !important;
    }
    
    .product_card__meta dl,
    .product_card__meta .expand-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .product_card__meta dt {
        display: block;
        margin-bottom: 5px;
        min-width: auto;
    }
    
    .product_card__meta dd {
        display: block;
        margin: 0 0 15px 0;
    }
}

@media (max-width: 768px) {
    .product_card {
        padding: 0 15px;
        box-sizing: border-box;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .product_card .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .product-visible {
        width: 100% !important;
        margin: 0 0 30px 0 !important;
        padding: 0 !important;
        gap: 15px !important;
    }
    
    .product-gallery-column,
    .product-info-column,
    .product-aside-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .product-title-modern {
        font-size: 20px;
    }
    
    .priceBlockFinalPrice--iToZR {
        font-size: 22px;
    }
    
    .productPageAside--k2l7R {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
        position: static !important;
    }
    
    .product_card__img_wrap {
        margin-bottom: 15px;
        text-align: left !important;
        display: block !important;
    }
    
    .product_card__img_wrap * {
        text-align: left !important;
    }
    
    .product_card__img {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        display: block !important;
        float: none !important;
    }
    
    .product_card__meta-title {
        font-size: 16px;
        margin-bottom: 15px;
        text-align: left !important;
    }
    
    .product-title-modern,
    .product_card .product-title-modern,
    .product_card__info .product-title-modern {
        text-align: left !important;
    }
    
    .product-header-modern,
    .product_card .product-header-modern {
        text-align: left !important;
    }
    
    .product_card__info,
    .product_card .product_card__info,
    .product-info-column {
        text-align: left !important;
    }
    
    .product_card__info *,
    .product-info-column * {
        text-align: left !important;
    }
    
    .product_card__meta,
    .product_card .product_card__meta {
        text-align: left !important;
    }
    
    .product_card__meta * {
        text-align: left !important;
    }
    
    .product-visible,
    .product_card .product-visible {
        align-items: flex-start !important;
    }
    
    .product-gallery-column {
        text-align: left !important;
    }
    
    .product-gallery-column * {
        text-align: left !important;
    }
    
    .product_card__meta dl,
    .product_card__meta .expand-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .product_card__meta dt {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .product_card__meta dd {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .product_card__meta_link {
        font-size: 13px;
    }
    
    .product_card__social-price-row {
        flex-direction: row;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .product_card__social {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .product_card__social-link {
        width: 28px;
        height: 28px;
    }
    
    .product_card__social-link i {
        font-size: 14px;
    }
    
    .product_card__social-price-row .product_card__get_price {
        flex: 1;
        min-width: 0;
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    .product_card__social-link {
        width: 32px;
        height: 32px;
    }
    
    .product_card__social-link i {
        font-size: 16px;
    }
    
    .product_card__additional-actions {
        grid-template-columns: 1fr 1fr;
        margin-top: 15px;
        padding-top: 15px;
        gap: 8px;
    }
    
    .product_card__action-btn {
        padding: 8px 10px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .order--m6Y5H .btn,
    .product_card__to_cart,
    .product_card__get_price {
        width: 100% !important;
    }
    
    .sub {
        margin-top: 15px;
        font-size: 13px;
    }
}

/* Metal calculator widget on product page - Premium Compact Design */
.product-metal-calculator {
    margin-top: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1.5px solid rgba(240, 207, 76, 0.25);
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    position: relative;
}

.product-metal-calculator::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f0cf4c 0%, #e8c040 50%, #f0cf4c 100%);
    z-index: 1;
}

.product-metal-calculator__details {
    padding: 0;
}

.product-metal-calculator__summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 252, 0.95) 100%);
    position: relative;
    transition: background 0.2s ease;
    margin-top: 3px;
}

.product-metal-calculator__summary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(250, 251, 252, 1) 100%);
}

/* Hide default marker */
.product-metal-calculator__summary::-webkit-details-marker {
    display: none;
}
.product-metal-calculator__summary::marker {
    content: "";
}

.product-metal-calculator__summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2.5px solid #f0cf4c;
    border-bottom: 2.5px solid #f0cf4c;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-metal-calculator__details[open] .product-metal-calculator__summary::after {
    transform: translateY(-50%) rotate(-135deg);
}

.product-metal-calculator__summary-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 22px;
    color: #1a1f2e;
    letter-spacing: -0.2px;
}

.product-metal-calculator__summary-subtitle {
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: rgba(26, 31, 46, 0.65);
}

.product-metal-calculator__body {
    padding: 16px 20px 20px;
    background: #ffffff;
    position: relative;
}

/* Compact scale for desktop - make it visually smaller */
.product-metal-calculator__body metal-calculator {
    display: block;
    transform: scale(0.88);
    transform-origin: top left;
    width: calc(100% / 0.88);
    margin-left: -2%;
}

/* Override shadow DOM styles via CSS variables if supported */
.product-metal-calculator__body metal-calculator {
    --primary: #f0cf4c;
    --secondary: #2f384f;
    --text1: #1a1f2e;
    --text2: #1a1f2e;
    --bg1: #f8f9fa;
    --bg2: #ffffff;
    --corner-radius: 16px;
}

@media (max-width: 767px) {
    .product-metal-calculator {
        border-radius: 16px;
        margin-top: 20px;
    }
    
    .product-metal-calculator__summary {
        padding: 14px 16px;
    }
    
    .product-metal-calculator__summary-title {
        font-size: 16px;
        line-height: 20px;
    }
    
    .product-metal-calculator__summary-subtitle {
        font-size: 12px;
        line-height: 16px;
    }
    
    .product-metal-calculator__body {
        padding: 12px 16px 16px;
    }
    
    .product-metal-calculator__body metal-calculator {
        transform: none;
        width: 100%;
        margin-left: 0;
    }
}

