/* Keela lehe kerimine */
.vpp-modal-lock { overflow: hidden; }

/* Overlay */
.vpp-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 250ms ease;
    z-index: 999999;
}
.vpp-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.vpp-modal__backdrop {
    background: rgba(10, 12, 14, 0.55);
    backdrop-filter: blur(4px);
    inset: 0;
    position: absolute;
}

/* Popupi aken */
.vpp-modal__dialog {
    background: #faf7f2;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.18);
    color: #11181c;
    max-height: min(860px, calc(100vh - 48px));
    max-width: min(920px, calc(100vw - 32px));
    overflow: auto;
    position: relative;
    width: 100%;
    padding: 12px;
    transform: translateY(12px);
    transition: transform 250ms ease;
}
.vpp-modal.is-open .vpp-modal__dialog {
    transform: translateY(0);
}

/* Sulgemisnupp */
.vpp-modal__close {
    align-items: center;
    background: rgba(17,24,28,0.08);
    border: 0;
    border-radius: 999px;
    color: #11181c;
    cursor: pointer;
    display: flex;
    font-size: 20px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 38px;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
}
.vpp-modal__close:hover {
    background: #11181c;
    color: #fff;
}

.vpp-modal__body { min-height: 220px; }

.vpp-modal__loading {
    font-size: 16px;
    padding: 90px 0;
    text-align: center;
    color: #8a9299;
    letter-spacing: 0.02em;
}

.vpp-modal__error {
    color: #c0392b;
    font-size: 15px;
    padding: 60px 20px;
    text-align: center;
}

/* Toote layout */
.vpp-product {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 36px;
    padding: 28px 20px 28px 16px;
    align-items: center;
}

/* Pilt */
.vpp-product__media {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}
.vpp-product__media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    padding: 12px;
}

/* Sisu */
.vpp-product__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vpp-product__title {
    color: #0d1214;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.vpp-product__excerpt {
    color: #637076;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

/* Väljad */
.vpp-product__fields {
    border-top: 1px solid #ede9e0;
    margin: 8px 0 20px 0;
    padding: 0;
}
.vpp-product__field {
    border-bottom: 1px solid #ede9e0;
    display: grid;
    grid-template-columns: 110px 1fr;
    padding: 11px 0;
    font-size: 14.5px;
    gap: 8px;
}
.vpp-product__field dt {
    color: #8a9299;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
}
.vpp-product__field dd {
    margin: 0;
    color: #0d1214;
    font-weight: 500;
    font-size: 15px;
}

/* Nupp */
.vpp-product__link {
    background: #0d1214;
    border-radius: 8px;
    color: #fff;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 13px 24px;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.2s, transform 0.15s;
}
.vpp-product__link:hover {
    background: #2c3a42;
    color: #fff;
    transform: translateY(-1px);
}

/* Mobiil */
@media (max-width: 700px) {
    .vpp-modal { align-items: flex-end; }
    .vpp-modal__dialog {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        margin: 0;
        padding: 8px;
    }
    .vpp-product {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 16px 12px;
    }
    .vpp-product__media { min-height: 200px; }
    .vpp-product__media img { max-height: 260px; }
    .vpp-product__title { font-size: 22px; }
}
