/* Детальная карточка товара. Стили намеренно изолированы от карточек заказов. */

.product-detail {
    margin-bottom: 8px;
}

.product-detail-gallery-column,
.product-detail-content-column {
    min-width: 0;
}

.product-detail .product-gallery-main {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(26, 44, 35, 0.06);
    cursor: default;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.product-detail .product-gallery-main.is-zoomable {
    cursor: zoom-in;
}

.product-detail .product-gallery-main.is-zoomable:hover,
.product-detail .product-gallery-main.is-zoomable:focus {
    border-color: var(--color-primary-border);
    box-shadow: 0 12px 34px rgba(26, 44, 35, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.product-detail .product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
}

.product-gallery-zoom-hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(16, 178, 108, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.product-gallery-main.is-zoomable:hover .product-gallery-zoom-hint,
.product-gallery-main.is-zoomable:focus .product-gallery-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

.product-detail .product-gallery-thumbnails {
    margin: 12px -5px 0;
}

.product-detail .product-gallery-thumbnails li {
    width: 72px;
    height: 72px;
    margin: 5px;
    border-radius: var(--radius-lg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-detail .product-gallery-thumbnails li:hover,
.product-detail .product-gallery-thumbnails li:focus,
.product-detail .product-gallery-thumbnails li.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(16, 178, 108, 0.12);
    outline: none;
}

.product-detail .product-card {
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(26, 44, 35, 0.06);
}

.product-detail .product-card-header {
    padding: 22px 26px 18px;
    border: 0;
    background: linear-gradient(135deg, rgba(232, 245, 233, 0.72) 0%, var(--color-bg-white) 54%);
}

.product-detail .product-availability-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
}

.product-detail .product-availability-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 11px;
    box-shadow: none;
    line-height: 1;
}

.product-detail .product-title {
    max-width: 760px;
    margin: 0;
    color: var(--color-text);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.product-detail .product-title .product-sku {
    font-size: 16px;
    font-weight: 450;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.product-detail .product-card-body {
    padding: 16px 26px 26px;
}

.product-purchase-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(16, 178, 108, 0.18);
    border-radius: 10px;
    background: linear-gradient(135deg, #f3fbf6 0%, #f8fcfa 100%);
}

.product-detail .product-purchase-panel,
.product-detail .product-info-section {
    width: 100%;
    max-width: 620px;
}

.product-detail .product-price-section,
.product-detail .product-basket-section {
    margin: 0;
    padding: 0;
    border: 0;
}

.product-detail .product-price-label {
    margin-bottom: 2px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.7px;
}

.product-detail .product-price-current {
    color: var(--color-primary-dark);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.25px;
}

.product-detail .product-price-old {
    font-size: 15px;
}

.product-detail .product-price-notice {
    margin-top: 7px;
}

.product-detail #product-basket-controls #product-add-to-basket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 15px;
}

.product-detail #product-basket-controls #product-add-to-basket i {
    display: inline-block;
}

.product-detail #product-basket-controls,
.product-detail #product-basket-controls .product-basket-info,
.product-detail #product-basket-controls .product-basket-add,
.product-detail #product-basket-controls .basket-controls-wrapper {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.product-detail #product-basket-controls .basket-controls-wrapper {
    flex-wrap: nowrap;
}

.product-detail #product-basket-controls .basket-quantity-controls {
    width: 154px;
    min-width: 154px;
    max-width: 154px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.product-detail #product-basket-controls .basket-quantity-btn {
    width: 36px;
    font-size: 18px;
}

.product-detail #product-basket-controls .basket-quantity-input {
    font-size: 14px;
}

.product-detail #product-basket-controls .basket-remove-btn {
    width: 42px;
    height: 42px;
}

.product-detail .product-info-section {
    margin-bottom: 0;
}

.product-detail .product-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 12px;
}

.product-detail .product-info-item {
    display: grid;
    grid-template-columns: max-content minmax(24px, 1fr) fit-content(128px);
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
}

.product-detail .product-info-item::after {
    content: '';
    grid-column: 2;
    grid-row: 1;
    min-width: 18px;
    border-bottom: 1px dotted #ccd5d0;
    transform: translateY(-3px);
}

.product-detail .product-info-label {
    grid-column: 1;
    grid-row: 1;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 450;
    white-space: nowrap;
}

.product-detail .product-info-value {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.product-detail .product-info-value a {
    color: var(--color-primary-dark);
}

.product-detail .product-description-section {
    margin-top: 22px;
    padding-top: 18px;
}

.product-detail .product-description {
    color: #454b47;
    font-size: 14px;
    line-height: 1.72;
}

.product-detail .product-description > :last-child {
    margin-bottom: 0;
}

.product-detail + .row .related-products-title {
    margin-top: 8px;
}

@media (max-width: 1199px) {
    .product-detail .product-card-header {
        padding: 20px 22px 17px;
    }

    .product-detail .product-card-body {
        padding: 14px 22px 22px;
    }

}

@media (max-width: 991px) {
    .product-detail-gallery-column {
        margin-bottom: 24px;
    }

    .product-detail .product-gallery {
        max-width: 520px;
        margin-right: auto;
        margin-left: auto;
    }

    .product-purchase-panel {
        grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr);
        gap: 22px;
    }
}

@media (max-width: 767px) {
    .product-detail {
        margin-bottom: 8px;
    }

    .product-detail-gallery-column {
        margin-bottom: 18px;
    }

    .product-detail .product-gallery-main {
        padding: 20px;
        border-radius: 12px;
        box-shadow: none;
    }

    .product-gallery-zoom-hint {
        display: none;
    }

    .product-detail .product-card {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .product-detail .product-card-header {
        margin: 0;
        padding: 2px 0 16px;
        border-bottom: 0;
        background: transparent;
    }

    .product-detail .product-availability-badge {
        margin-bottom: 0;
    }

    .product-detail .product-title {
        font-size: 21px;
        line-height: 1.3;
    }

    .product-detail .product-title .product-sku {
        font-size: 15px;
    }

    .product-detail .product-card-body {
        padding: 0;
    }

    .product-purchase-panel {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        margin-bottom: 20px;
        padding: 14px;
        border-radius: 10px;
    }

    .product-detail .product-price-current {
        font-size: 27px;
    }

    .product-detail #product-basket-controls #product-add-to-basket {
        width: 148px;
        min-width: 148px;
        max-width: 148px;
    }

    .product-detail .product-info-grid {
        grid-template-columns: 1fr;
    }

    .product-detail .product-description-section {
        margin-top: 20px;
        padding-top: 20px;
    }
}

@media (max-width: 420px) {
    .product-detail .basket-controls-wrapper {
        align-items: stretch;
        flex-direction: column;
    }

    .product-detail .basket-remove-btn {
        width: 100%;
    }
}
