/* OVO Configurator — Frontend Styles */

.ovo-conf-wrap {
    position: relative;
    font-family: inherit;
}

:root {
    --blue: #2563eb;
    --dark: #111118;
    --text: #111118;
    --muted: #7a7a8a;
    --border: #e2e2e6;
    --bg: #f0f0ee;
    --white: #ffffff;
    --card-radius: 14px;
}

/* ─── BACK BUTTON ─── */
.ovo-conf-wrap .back-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 48px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    background: none;
    border: none;
}
.ovo-conf-wrap .back-btn svg {
    width: 16px; height: 16px;
    stroke: var(--text); fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ovo-conf-wrap .back-btn.visible { display: flex; }

/* ─── STEP NAV ─── */
.ovo-conf-wrap .step-nav {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 48px 24px;
    flex-wrap: wrap;
}
.ovo-conf-wrap .sn-item {
    display: flex; align-items: baseline; gap: 5px;
    cursor: pointer; color: var(--muted);
    font-size: 13px; font-weight: 500; white-space: nowrap;
}
.ovo-conf-wrap .sn-item.active { color: var(--text); }
.ovo-conf-wrap .sn-item.active .sn-num {
    color: var(--blue); font-size: 28px; font-weight: 900; letter-spacing: -0.5px;
}
.ovo-conf-wrap .sn-item.active .sn-title {
    font-size: 28px; font-weight: 900; color: var(--text);
}
.ovo-conf-wrap .sn-arrow { color: var(--muted); font-size: 14px; margin: 0 2px; }

/* ─── PAGES ─── */
.ovo-conf-wrap .page1 { display: none; padding: 0 48px 0px; }
.ovo-conf-wrap .page1.active { display: block; animation: ovoFadeUp .25s ease; }
@keyframes ovoFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══ STEP 1 — PRODUCT CARDS ═══ */
.ovo-conf-wrap .products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.ovo-conf-wrap .prod-card {
    background: var(--white);
    border-radius: 16px;
    border: 1.5px solid #e6e6e6;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
    overflow: hidden;
    display: grid;
    grid-template-columns: 36% 1fr;
    grid-template-rows: auto auto;
}
.ovo-conf-wrap .prod-card:hover { box-shadow: 0 6px 28px rgba(37,99,235,.13); border-color: #c8d8ff; }
.ovo-conf-wrap .prod-card.selected { border-color: var(--blue); box-shadow: 0 4px 20px rgba(37,99,235,.15); }

.ovo-conf-wrap .pc-image {
    grid-column: 1; grid-row: 1;
    background: #141828;
    overflow: hidden;
}
.ovo-conf-wrap .pc-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ovo-conf-wrap .pc-image-ph {
    width: 100%; height: 100%;
    background: linear-gradient(155deg, #1c2540 0%, #0e1525 45%, #132050 100%);
    display: flex; align-items: flex-end; justify-content: center;
}
.ovo-conf-wrap .pc-name-block {
    grid-column: 1; grid-row: 2;
    padding: 16px 18px 20px;
    background: var(--white);
    display: flex; flex-direction: column; gap: 0;
}
.ovo-conf-wrap .pc-name {
    font-size: 20px; font-weight: 800;
    line-height: 1.15; letter-spacing: -.3px; color: var(--text);
}
.ovo-conf-wrap .pc-name span { color: var(--blue); }
.ovo-conf-wrap .pc-tagline {
    font-size: 13px; color: var(--muted); margin: 6px 0 12px; line-height: 1.45;
}
.ovo-conf-wrap .pc-price {
    color: var(--blue); font-weight: 800; font-size: 17px; letter-spacing: -.2px;
}
.ovo-conf-wrap .pc-right {
    grid-column: 2; grid-row: 1 / 3;
    display: flex; flex-direction: column;
    padding: 20px 20px 18px; gap: 0;
}
.ovo-conf-wrap .pc-specs { font-size: 13px; line-height: 2; color: var(--text); flex: 1; }
.ovo-conf-wrap .pc-specs-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; color: var(--text); }
.ovo-conf-wrap .pc-mag-section { margin-top: 18px; }
.ovo-conf-wrap .pc-mag-label { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.ovo-conf-wrap .pc-mag-btns { display: flex; gap: 8px; }

/* «Далее» — появляется после выбора увеличения */
.ovo-conf-wrap .pc-next-btn {
    display: none; align-items: center; gap: 6px;
    margin-top: 12px;
    background: var(--blue); color: #fff;
    border: none; border-radius: 8px;
    padding: 10px 18px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: background .15s;
    width: 100%;
    justify-content: center;
    letter-spacing: .03em;
}
.ovo-conf-wrap .pc-next-btn:hover { background: #1d4fd8; }
.ovo-conf-wrap .pc-next-btn svg {
    width: 15px; height: 15px;
    stroke: #fff; fill: none; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
}
.ovo-conf-wrap .mag-btn {
    width: 52px; height: 42px;
    border: 1.5px solid #ccd6f0; border-radius: 8px;
    background: transparent;
    font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .14s; color: var(--text);
}
.ovo-conf-wrap .mag-btn:hover { border-color: var(--blue); color: var(--blue); }
.ovo-conf-wrap .mag-btn.active {
    border-color: var(--blue); background: #dce9ff; color: var(--blue); font-weight: 600;
}
.ovo-conf-wrap .pc-footer-row { display: none; }

/* «Подробнее о модели» — текстовая ссылка */
.ovo-conf-wrap .pc-more-row {
    margin-top: 14px;
}
.ovo-conf-wrap .pc-more-link {
    font-size: 12px; font-weight: 500;
    color: var(--muted); text-decoration: none;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 1px;
    transition: color .14s, border-color .14s;
    display: inline-block;
}
.ovo-conf-wrap .pc-more-link:hover { color: var(--blue); border-color: var(--blue); }
.ovo-conf-wrap .circle-arrow {
    width: 46px; height: 46px; border-radius: 50%;
    background: #1a2540; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.ovo-conf-wrap .circle-arrow:hover { background: var(--blue); }
.ovo-conf-wrap .circle-arrow svg {
    width: 18px; height: 18px;
    stroke: #fff; fill: none; stroke-width: 40;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ═══ STEP 2 — FRAME SELECTION ═══ */
.ovo-conf-wrap .s2-head-section {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 28px; align-items: start; margin-bottom: 28px;
}
.ovo-conf-wrap .s2-head-section h3 {
    grid-column: 1 / -1; font-size: 17px; font-weight: 800; margin-bottom: 4px;
}
.ovo-conf-wrap .slider-col { display: flex; flex-direction: column; justify-content: center; padding-top: 20px; }
.ovo-conf-wrap .slider-value-wrap {
    display: inline-flex; align-items: center;
    background: var(--white); border: 1.5px solid var(--border);
    border-radius: 8px; padding: 5px 12px;
    font-size: 13px; font-weight: 600; margin-bottom: 10px; width: fit-content;
}
.ovo-conf-wrap input[type=range] {
    -webkit-appearance: none;
    width: 100%; height: 3px; border-radius: 2px;
    background: linear-gradient(to right, var(--blue) 0%, var(--blue) 37.5%, #d0d0d0 37.5%);
    outline: none; cursor: pointer;
}
.ovo-conf-wrap input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--blue); border: 2.5px solid #fff;
    box-shadow: 0 0 0 1.5px var(--blue);
}
.ovo-conf-wrap .size-table-wrap {
    width: 220px; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--border); font-size: 13px; background: var(--white);
}
.ovo-conf-wrap .size-table-wrap table { width: 100%; border-collapse: collapse; }
.ovo-conf-wrap .size-table-wrap thead th {
    background: var(--dark); color: #fff;
    padding: 9px 16px; text-align: center; font-weight: 600; font-size: 12.5px;
}
.ovo-conf-wrap .size-table-wrap tbody td {
    padding: 8px 16px; text-align: center; border-bottom: 1px solid #f0f0f0;
}
.ovo-conf-wrap .size-table-wrap tbody tr:last-child td { border-bottom: none; }
.ovo-conf-wrap .size-table-wrap tbody tr.hl { background: #eef3ff; }
.ovo-conf-wrap .size-table-wrap tbody tr.cur td { background: #dbeafe; color: var(--blue); font-weight: 700; }

.ovo-conf-wrap .frames-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.ovo-conf-wrap .frame-card {
    background: var(--white); border-radius: var(--card-radius);
    border: 2px solid transparent; cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
    padding: 16px 14px 14px;
}
.ovo-conf-wrap .frame-card:hover { box-shadow: 0 4px 18px rgba(37,99,235,.09); }
.ovo-conf-wrap .frame-card.selected { border-color: var(--blue); }
.ovo-conf-wrap .frame-img {
    width: 100%; height: 120px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; overflow: hidden;
}
.ovo-conf-wrap .frame-img-ph {
    width: 100%; height: 100%; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.ovo-conf-wrap .frame-img-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.ovo-conf-wrap .frame-img-ph svg { width: 120px; height: 52px; }
.ovo-conf-wrap .frame-name { font-size: 13.5px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.ovo-conf-wrap .frame-meta { display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; }
.ovo-conf-wrap .frame-meta-left { color: var(--muted); line-height: 1.6; }
.ovo-conf-wrap .frame-price { color: var(--blue); font-weight: 800; font-size: 14px; white-space: nowrap; }

/* ═══ STEP 3 — PARAMS + CF7 ═══ */
.ovo-conf-wrap .s3-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}
.ovo-conf-wrap .s3-title { font-size: 17px; font-weight: 800; margin-bottom: 20px; }
.ovo-conf-wrap .params-card {
    background: var(--white); border-radius: var(--card-radius);
    padding: 24px; display: flex; flex-direction: column; gap: 18px;
}

/* ── CF7 Integration Styles ── */
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7 { width: 100%; }
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-form { display: flex; flex-direction: column; gap: 14px; }
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-form p { margin: 0; }
.ovo-conf-wrap .ovo-cf7-wrap label {
    display: flex; flex-direction: column; gap: 5px;
    font-size: 13px; font-weight: 500; color: var(--text);
}
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-form-control:not(.wpcf7-submit) {
    display: block; width: 100%; box-sizing: border-box;
    border: 1.5px solid var(--border); border-radius: 7px;
    padding: 10px 14px; font-size: 13px; outline: none;
    transition: border-color .15s; font-family: inherit;
    background: #fff; color: var(--text);
}
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-form-control:focus { border-color: var(--blue); }
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-form-control::placeholder { color: #b0b0b8; }
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-submit {
    background: var(--blue); color: #fff;
    border: none; border-radius: 8px;
    padding: 12px 28px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background .15s;
    width: 100%; letter-spacing: .02em;
}
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-submit:hover { background: #1d4fd8; }
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-response-output {
    margin-top: 12px; padding: 10px 16px;
    border-radius: 8px; font-size: 13px; border: none;
}
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-mail-sent-ok {
    background: #d1fae5; color: #065f46;
}
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-validation-errors,
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-mail-sent-ng {
    background: #fee2e2; color: #991b1b;
}
.ovo-conf-wrap .ovo-cf7-wrap .wpcf7-not-valid-tip {
    color: #dc2626; font-size: 11px; margin-top: 3px;
}

/* ── Video block ── */
.ovo-conf-wrap .video-block {
    background: #111828; border-radius: var(--card-radius);
    overflow: hidden; position: relative;
    min-height: 310px; display: flex; flex-direction: column;
}
.ovo-conf-wrap .video-inner {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px; position: relative;
}
.ovo-conf-wrap .video-title {
    position: absolute; top: 16px; left: 16px;
    color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500;
}
.ovo-conf-wrap .video-info {
    position: absolute; top: 14px; right: 14px;
    width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.35);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.45); font-size: 11px; font-weight: 700;
}
.ovo-conf-wrap .video-play-btn {
    width: 54px; height: 54px; border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; transition: background .15s;
}
.ovo-conf-wrap .video-play-btn:hover { background: rgba(255,255,255,.28); }
.ovo-conf-wrap .video-play-btn svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }

/* ── Glasses diagram ── */
.ovo-conf-wrap .glasses-diagram {
    grid-column: 1 / -1;
    display: flex; justify-content: center; gap: 32px; padding-top: 32px;
}
.ovo-conf-wrap .glasses-diagram img { max-width: 100%; height: auto; }

/* ═══ STICKY FOOTER ═══ */
.ovo-conf-wrap .sticky-footer {
    border-radius: 20px; z-index: 200;
    padding: 0 48px; height: 120px;
    display: flex; align-items: center; gap: 40px;
    background: linear-gradient(100deg, #0a1535 0%, #0e2060 40%, #1a4ccc 75%, #3a72ff 100%);
    margin-top: 40px;
}
.ovo-conf-wrap .sf-selected { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ovo-conf-wrap .sf-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.ovo-conf-wrap .sf-product-name { font-size: 22px; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovo-conf-wrap .sf-frame-name { font-size: 12px; color: rgba(255,255,255,.55); }
.ovo-conf-wrap .sf-price-block { display: flex; flex-direction: column; gap: 2px; }
.ovo-conf-wrap .sf-price-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.ovo-conf-wrap .sf-price { font-size: 28px; font-weight: 900; color: #fff; white-space: nowrap; }
.ovo-conf-wrap .sf-action { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ovo-conf-wrap .sf-action-text { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.ovo-conf-wrap .sf-arrow-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,.15); border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s;
}
.ovo-conf-wrap .sf-arrow-btn:hover { background: rgba(255,255,255,.28); }
.ovo-conf-wrap .sf-arrow-btn svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .ovo-conf-wrap .step-nav { padding: 4px 24px 20px; }
    .ovo-conf-wrap .page1 { padding: 0 24px 120px; }
    .ovo-conf-wrap .sticky-footer { padding: 0 24px; height: 100px; gap: 20px; }
    .ovo-conf-wrap .sf-product-name { font-size: 18px; }
    .ovo-conf-wrap .sf-price { font-size: 24px; }
}

@media (max-width: 768px) {
    .ovo-conf-wrap .step-nav { padding: 8px 20px 16px; gap: 4px; }
    .ovo-conf-wrap .sn-item { font-size: 11px; }
    .ovo-conf-wrap .sn-item.active .sn-num,
    .ovo-conf-wrap .sn-item.active .sn-title { font-size: 20px; }
    .ovo-conf-wrap .page1 { padding: 0 16px 100px; }
    .ovo-conf-wrap .products-grid { grid-template-columns: 1fr; gap: 16px; }
    .ovo-conf-wrap .prod-card { grid-template-columns: 40% 1fr; }
    .ovo-conf-wrap .pc-name { font-size: 16px; }
    .ovo-conf-wrap .pc-price { font-size: 15px; }
    .ovo-conf-wrap .pc-specs { font-size: 11px; line-height: 1.8; }
    .ovo-conf-wrap .mag-btn { width: 44px; height: 36px; font-size: 12px; }
    .ovo-conf-wrap .s2-head-section { grid-template-columns: 1fr; gap: 16px; }
    .ovo-conf-wrap .size-table-wrap { width: 100%; max-width: 280px; margin: 0 auto; }
    .ovo-conf-wrap .frames-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ovo-conf-wrap .frame-img { height: 90px; }
    .ovo-conf-wrap .frame-name { font-size: 12px; }
    .ovo-conf-wrap .s3-grid { grid-template-columns: 1fr; gap: 20px; }
    .ovo-conf-wrap .video-block { min-height: 260px; }
    .ovo-conf-wrap .sticky-footer {
        padding: 0 16px; height: auto; min-height: 80px;
        flex-wrap: wrap; gap: 12px; border-radius: 16px;
        margin-top: 20px;
    }
    .ovo-conf-wrap .sf-selected { flex: 1 1 100%; }
    .ovo-conf-wrap .sf-product-name { font-size: 16px; }
    .ovo-conf-wrap .sf-price { font-size: 20px; }
    .ovo-conf-wrap .sf-action { flex: 1; justify-content: flex-end; }
}

@media (max-width: 480px) {
    .ovo-conf-wrap .sn-item.active .sn-num,
    .ovo-conf-wrap .sn-item.active .sn-title { font-size: 18px; }
    .ovo-conf-wrap .prod-card { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
    .ovo-conf-wrap .pc-image { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 12; }
    .ovo-conf-wrap .pc-name-block { grid-column: 1; grid-row: 2; }
    .ovo-conf-wrap .pc-right { grid-column: 1; grid-row: 3; }
    .ovo-conf-wrap .frames-grid { grid-template-columns: 1fr; }
}
