/* Быстрый просмотр товара — модальное окно */

:root {
    --pfv-accent: var(--site-accent);
    --pfv-accent-hover: var(--site-accent-hover);
    --pfv-text: #2c3e4e;
    --pfv-text-muted: #5c6b7a;
    --pfv-text-light: #96a8aa;
    --pfv-border: #e8e8e8;
    --pfv-border-soft: #eef1f3;
    --pfv-surface: #fff;
    --pfv-surface-muted: #f8f9fa;
    --pfv-shadow: 0 16px 48px rgba(44, 62, 78, 0.18);
    --pfv-font: var(--font-body, "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif);
}

.product-fast-view {
    position: fixed;
    inset: 0;
    z-index: 10060;
    pointer-events: none;
}

.col-item__fast-view {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: #026602;
    background: var(--pfv-accent, #026602);
    box-shadow: 0 4px 14px rgba(2, 102, 2, 0.28);
    color: #fff;
    font-family: var(--pfv-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.col-item__fast-view:focus-visible {
    outline: none;
}

.col-item__fast-view:hover,
.col-item__fast-view:focus {
    background: #014401;
    background: var(--pfv-accent-hover, #014401);
    opacity: 1;
    outline: none;
}

.product-fast-view.is-open {
    pointer-events: auto;
}

.product-fast-view__overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 62, 78, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.product-fast-view.is-open .product-fast-view__overlay {
    opacity: 1;
    pointer-events: auto;
}

.product-fast-view__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 32px);
    max-width: 920px;
    max-height: min(calc(100vh - 32px), 92dvh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: var(--pfv-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--pfv-text);
    background: var(--pfv-surface);
    border-radius: 14px;
    box-shadow: var(--pfv-shadow);
    transform: translate(-50%, -48%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.product-fast-view.is-open .product-fast-view__dialog {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.product-fast-view__head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pfv-border);
    background: var(--pfv-surface);
}

.product-fast-view__title {
    margin: 0;
    font-family: var(--pfv-font);
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--pfv-text);
    text-transform: none;
    flex: 1 1 auto;
    min-width: 0;
}

.product-fast-view__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 1 auto;
    gap: 16px;
    min-width: 0;
}

.product-fast-view__tools-source {
    display: none;
}

.product-fast-view__tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--pfv-text-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease;
}

.product-fast-view__tool-label {
    font-size: 14px;
    line-height: 1.2;
}

.product-fast-view__tool.wishlist-btn {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--pfv-text-muted);
}

.product-fast-view__tool.wishlist-btn:hover,
.product-fast-view__tool.wishlist-btn:focus {
    color: #d9534f;
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: none;
}

.product-fast-view__tool.wishlist-btn--active,
.product-fast-view__tool.wishlist-btn--active:hover,
.product-fast-view__tool.wishlist-btn--active:focus {
    color: #d9534f;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.product-fast-view__tool.compare-btn {
    color: var(--pfv-text-muted);
}

.product-fast-view__tool.compare-btn:hover,
.product-fast-view__tool.compare-btn:focus {
    color: var(--pfv-accent);
    outline: none;
}

.product-fast-view__tool.compare-btn--active {
    color: var(--pfv-accent);
}

.product-fast-view__close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--pfv-border);
    border-radius: 50%;
    background: var(--pfv-surface);
    color: var(--pfv-text-muted);
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-fast-view__close:hover,
.product-fast-view__close:focus {
    background: var(--pfv-surface-muted);
    border-color: rgba(44, 62, 78, 0.2);
    color: var(--pfv-text);
    outline: none;
}

.product-fast-view__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1.25rem;
    overscroll-behavior: contain;
}

.product-fast-view__loader {
    padding: 3rem 1.25rem;
    font-size: 15px;
    font-weight: 500;
    color: var(--pfv-text-muted);
    text-align: center;
}

.product-fast-view-content {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 1.5rem);
    align-items: start;
}

.product-fast-view-content__media {
    position: relative;
}

.product-fast-view-content__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 12px;
    border: 1px solid var(--pfv-border);
    border-radius: 10px;
    background: var(--pfv-surface-muted);
    transition: border-color 0.15s ease;
}

.product-fast-view-content__image-link:hover,
.product-fast-view-content__image-link:focus {
    border-color: rgba(2, 102, 2, 0.35);
    outline: none;
}

.product-fast-view-content__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    margin: 0 auto;
    object-fit: contain;
}

.product-fast-view-content__disclaimer {
    margin: 12px 0 0;
    color: var(--pfv-text-light);
    font-size: 12px;
    line-height: 1.4;
}

.product-fast-view-content__head {
    margin-bottom: 0.75rem;
}

.product-fast-view-content__title {
    margin: 0 0 8px;
    font-family: var(--pfv-font);
    font-size: clamp(1.125rem, 2.2vw, 1.375rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--pfv-text);
    text-transform: none;
}

.product-fast-view-content__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.product-fast-view-content__title a:hover,
.product-fast-view-content__title a:focus {
    color: var(--pfv-accent);
    text-decoration: none;
}

.product-fast-view-content__sku {
    margin: 0 0 12px;
    color: var(--pfv-text-light);
    font-size: 13px;
    line-height: 1.35;
}

.product-fast-view-content__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-fast-view-content__stock-quantity {
    color: var(--pfv-text-muted);
    font-size: 13px;
    line-height: 1.35;
}

.product-fast-view-content__price {
    margin-bottom: 1rem;
}

.product-fast-view-content__price-current {
    color: var(--pfv-accent);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.product-fast-view-content__price-old {
    margin-left: 10px;
    color: var(--pfv-text-light);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: line-through;
}

.product-fast-view-content__price-note {
    margin: 6px 0 0;
    color: var(--pfv-text-muted);
    font-size: 13px;
    line-height: 1.35;
}

.product-fast-view-content__properties {
    margin-bottom: 1rem;
}

.product-fast-view-content__properties table {
    width: 100%;
    border-collapse: collapse;
}

.product-fast-view-content__properties td {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--pfv-border-soft);
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.35;
}

.product-fast-view-content__properties tr:last-child td {
    border-bottom: 0;
}

.product-fast-view-content__properties .key {
    width: 52%;
    padding-right: 4%;
    color: var(--pfv-text-muted);
    text-align: left;
}

.product-fast-view-content__properties .value {
    width: 48%;
    color: var(--pfv-text);
    font-weight: 600;
    text-align: right;
}

.product-fast-view-content__description {
    margin: 0 0 1rem;
    color: var(--pfv-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.product-fast-view-content__actions {
    margin-bottom: 1rem;
}

.product-fast-view-content__actions .col-item__actions {
    margin: 0;
}

.product-fast-view-content__details-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--pfv-accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 0.15s ease;
}

.product-fast-view-content__details-link:hover,
.product-fast-view-content__details-link:focus {
    color: var(--pfv-accent-hover);
    text-decoration: none;
    outline: none;
}

body.is-product-fast-view-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .product-fast-view__dialog {
        width: calc(100% - 16px);
        max-height: min(calc(100vh - 16px), 94dvh);
        border-radius: 12px;
    }

    .product-fast-view__head {
        flex-wrap: wrap;
        padding: 0.875rem 1rem;
    }

    .product-fast-view__tools {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .product-fast-view__body {
        padding: 1rem;
    }

    .product-fast-view-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-fast-view-content__image-link {
        min-height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-fast-view__overlay,
    .product-fast-view__dialog,
    .col-item__fast-view {
        transition: none;
    }
}
