/* == ОБЁРТКА ИЗОБРАЖЕНИЯ == */
.ps-img-wrap {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.ps-buy-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.72);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
}
.ps-img-wrap:hover .ps-buy-btn { opacity: 1; }

/* == ОВЕРЛЕЙ == */
.ps-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99998;
    align-items: center;
    justify-content: center;
}
.ps-overlay.active { display: flex; }

/* == МОДАЛКА == */
.ps-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.ps-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    z-index: 1;
}
.ps-modal-close:hover { color: #333; }

/* == ЭКРАНЫ == */
.ps-screen { display: none; padding: 30px; }
.ps-screen.active { display: block; }

/* == КОНСТРУКТОР == */
.ps-constructor { display: flex; gap: 28px; }
.ps-preview { flex: 0 0 260px; }
.ps-preview img { width: 100%; height: auto; border-radius: 8px; display: block; }
.ps-options { flex: 1; }
.ps-options h3 { margin: 0 0 20px; font-size: 18px; color: #222; }

.ps-group { margin-bottom: 18px; }
.ps-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}
.ps-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.ps-opt-btn {
    padding: 7px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}
.ps-opt-btn:hover { border-color: #0073aa; color: #0073aa; }
.ps-opt-btn.selected { border-color: #0073aa; background: #0073aa; color: #fff; }

.ps-opt-btn[data-value="white"].selected { background: #eee; color: #333; border-color: #aaa; }
.ps-opt-btn[data-value="black"].selected { background: #222; color: #fff; border-color: #222; }
.ps-opt-btn[data-value="blue"].selected  { background: #2563eb; color: #fff; border-color: #2563eb; }

.ps-price-block {
    margin-top: 22px;
    padding: 14px 18px;
    background: #f7f7f7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ps-price-label { font-size: 14px; color: #666; }
.ps-price-value { font-size: 26px; font-weight: 700; color: #222; }

.ps-order-btn {
    margin-top: 16px;
    width: 100%;
    padding: 13px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.ps-order-btn:hover { background: #005a87; }

/* == ФОРМА == */
.ps-form-screen h3 { margin: 0 0 6px; font-size: 18px; }
.ps-summary { color: #888; font-size: 13px; margin-bottom: 20px; }
.ps-field { margin-bottom: 14px; }
.ps-field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 5px; }
.ps-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}
.ps-back-btn { background: none; border: none; color: #0073aa; cursor: pointer; font-size: 13px; padding: 0; margin-bottom: 16px; }
.ps-submit-btn {
    width: 100%;
    padding: 13px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
}
.ps-submit-btn:hover { background: #15803d; }

/* == СПАСИБО == */
.ps-thanks-screen { text-align: center; padding: 50px 30px; }
.ps-thanks-screen .ps-check { font-size: 52px; margin-bottom: 14px; }
.ps-thanks-screen h3 { font-size: 22px; margin: 0 0 10px; }
.ps-thanks-screen p { color: #666; margin: 0 0 24px; }
.ps-close-btn { padding: 10px 28px; background: #0073aa; color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }

/* == АДАПТИВ == */
@media (max-width: 580px) {
    .ps-constructor { flex-direction: column; }
    .ps-preview { flex: none; }
}
