﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    overscroll-behavior-x: none;
}

body {
    font-family: 'Inter', sans-serif;
    background: #050505;
    color: white;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    overscroll-behavior-x: none;
}

.site-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    left: 0;
    margin: 0;
}

.container {
    width: min(1200px, 90%);
    margin: auto;
}

.bg-blur {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
}

.blur1 {
    width: 500px;
    height: 500px;
    background: #6d28d9;
    top: -100px;
    left: -100px;
}

.blur2 {
    width: 400px;
    height: 400px;
    background: #2563eb;
    right: -100px;
    bottom: 0;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    backdrop-filter: blur(15px);
    background: rgba(0, 0, 0, .4);
    z-index: 100;
}

.nav {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    display: inline-block;
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    color: #8b5cf6;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    opacity: .8;
    transition: .3s;
}

nav a:hover {
    opacity: 1;
}

nav .phone {
    font-weight: 700;
    opacity: 1;
    margin-left: -18px; /* tighten spacing so it's right next to Контакты */
}

/* Header location (geo) - desktop only */
.header-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 18px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    white-space: nowrap;
}

.header-location svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: #fff;
}

.header-location:hover {
    opacity: 0.9;
}

.location-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    min-width: 260px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 300;
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
    display: none;
}

.location-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-dropdown li {
    padding: 9px 16px;
    font-size: 14px;
    color: #ddd;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.location-dropdown li:hover {
    background: #1f1f1f;
    color: #fff;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn {
    background: linear-gradient(135deg, #7c3aed, #2563eb, #7c3aed, #6d28d9);
    background-size: 300% 300%;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
    animation: gradientShift 4s ease infinite;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, .4);
}

.btn.loading {
    cursor: wait;
    opacity: 0.85;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .2);
    padding: 15px 30px;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

/* ========== HERO ========== */

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 80px;
    padding: 140px 10% 40px;
}

.hero-content {
    flex: 1;
    padding-top: 20px;
    padding-left: 40px;
    max-width: 640px;
}

.badge {
    padding: 10px 20px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: 60px;
    line-height: 1;
    margin-bottom: 25px;
}

.hero p {
    font-size: 20px;
    opacity: .8;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 750px;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    margin-top: 40px;
}

/* ========== STATS ========== */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 40px 10%;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat h2 {
    font-size: 56px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

section {
    padding: 80px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 48px;
    margin-bottom: 10px;
}

/* ========== FEATURES (advantages) ========== */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    transition: .4s;
}

.feature:hover {
    transform: translateY(-10px);
    border-color: #8b5cf6;
}

.icon-svg {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
    display: block;
}

/* ========== SERVICES ========== */

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 35px;
    border-radius: 25px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: .4s;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.service-card span,
.service-card .service-price {
    display: block;
    margin: 15px 0;
    font-size: 28px;
    font-weight: 700;
    color: #8b5cf6;
    text-decoration: none;
    -webkit-text-decoration: none;
}

/* iOS Safari: не подчёркивать цены, ошибочно принятые за телефоны */
.service-card a[x-apple-data-detectors],
.service-card a[x-apple-data-detectors="true"] {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none;
}

.service-card p {
    opacity: .8;
    line-height: 1.6;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #8b5cf6;
}

/* ========== CTA ========== */

.cta {
    text-align: center;
    background: rgba(255, 255, 255, .04);
    border-radius: 30px;
    padding: 100px;
    margin: 0 10% 80px;
}

.cta h2 {
    font-size: 52px;
    margin-bottom: 20px;
}

.cta p {
    margin-bottom: 30px;
    opacity: .8;
}

/* ========== CONTACTS + MAP ========== */
.contacts-section {
    padding: 40px 10% 80px;
}

.contacts-layout {
    display: flex;
    gap: 40px;
}

.map-wrapper {
    flex: 1;
    min-width: 0;
    height: 300px;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.contacts-info {
    flex: 0 0 380px;
    height: 300px;
    background: #141414;
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.contacts-info h3 {
    font-size: 26px;
    margin: 0 0 8px;
    color: #fff;
}

.contact-item strong {
    display: block;
    font-size: 13px;
    color: #a78bfa;
    margin-bottom: 2px;
    font-weight: 600;
}

.contact-item p {
    margin: 0;
    color: #ddd;
    font-size: 15px;
    line-height: 1.4;
}

.contact-item p a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 900px) {
    .contacts-layout {
        flex-direction: column;
        gap: 30px;
    }

    .map-wrapper {
        order: 2;
        height: 300px;
        position: relative;
        overflow: hidden;
    }

    .contacts-info {
        order: 1;
        flex: none;
        height: auto;
        padding: 14px 15px 16px;
        justify-content: flex-start;
        gap: 9px;
    }

    .contacts-info h3 {
        font-size: 22px;
        margin: 0 0 2px;
    }

    .contacts-info .contact-item strong {
        font-size: 12px;
        margin-bottom: 1px;
    }

    .contacts-info .contact-item p {
        font-size: 14px;
        line-height: 1.35;
    }

    .contacts-section {
        padding: 30px 5% 60px;
    }
}

/* ========== FOOTER ========== */

footer {
    padding: 80px;
    text-align: center;
    opacity: .7;
}

/* ========== ФУТЕР В ОДНУ СТРОКУ ========== */
footer {
    padding: 8px 4%;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: #888;
    line-height: 1.3;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.footer-line {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
    max-width: 100%;
    margin: 0 auto;
    font-size: 16px;
    box-sizing: border-box;
    justify-content: center;
}

.footer-center {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
    text-align: center;
}

.footer-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-width: 0;
}

.footer-disclaimer {
    display: block;
    font-size: 14px;
    opacity: 0.6;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
}

.footer-legal {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.footer-legal a {
    color: #aaa;
    text-decoration: none;
}

.footer-legal a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

.footer-legal .sep {
    margin: 0 5px;
    opacity: 0.4;
}

.footer-copy {
    font-size: 15px;
    opacity: 0.6;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.15);
    min-width: 0;
}

/* Legal modals */
.legal-modal {
    width: 680px;
    max-width: 94%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.legal-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    font-size: 14.5px;
    line-height: 1.65;
    color: #ccc;
}

.legal-content h3 {
    font-size: 17px;
    color: #fff;
    margin: 22px 0 8px;
    font-weight: 600;
}

.legal-content p,
.legal-content ul {
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 20px;
}

.legal-content ul li {
    margin-bottom: 4px;
}

.legal-content a {
    color: #8b5cf6;
}

/* ========== MODAL ========== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: .4s;
    z-index: 999;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 500px;
    background: rgba(20, 20, 20, .95);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 30px;
    padding: 40px;
    position: relative;
}

.modal-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.modal-subtitle {
    font-size: 15px;
    opacity: .6;
    margin-bottom: 25px;
    text-align: center;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header .modal-title {
    margin-bottom: 8px;
}

.modal-header .modal-subtitle {
    margin-bottom: 0;
}

.modal-policy {
    font-size: 12px;
    opacity: .5;
    margin-top: 15px;
    text-align: center;
    line-height: 1.4;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal input,
.modal textarea,
.modal select {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    color: white;
    padding: 15px;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    transition: .3s;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    border-color: #8b5cf6;
}

.modal select option {
    background: #1a1a1a;
    color: white;
}

.modal textarea {
    min-height: 100px;
    resize: vertical;
}

.close-modal {
    position: absolute;
    right: 12px;
    top: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: .3s;
    padding: 8px;
    margin: -8px;
    z-index: 10;
    touch-action: manipulation;
}

.close-modal:hover {
    transform: rotate(90deg);
}

/* ========== MODAL SUCCESS ========== */

.modal-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.modal-success.active {
    display: block;
    animation: fadeIn .4s ease;
}

.success-icon {
    margin-bottom: 20px;
}

.success-icon svg {
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, .4));
}

.success-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-text {
    font-size: 16px;
    opacity: .7;
    line-height: 1.5;
}

/* ========== MODAL ERROR ========== */
.modal-error {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.modal-error.active {
    display: block;
    animation: fadeIn .4s ease;
}

.modal-error a {
    color: #8b5cf6;
    text-decoration: underline;
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ef4444;
}

/* ========== DELIVERY MODAL ========== */
.delivery-modal-content {
    width: 620px;
    max-width: 92%;
}

.delivery-content {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 8px;
}

.delivery-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.delivery-content h3:first-child {
    margin-top: 0;
}

.delivery-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 14px;
}

.delivery-content ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
    color: #ddd;
}

.delivery-content ul li {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 6px;
}

.delivery-content ul li strong {
    color: #fff;
}

.delivery-note {
    font-size: 14px;
    background: rgba(139, 92, 246, 0.1);
    padding: 14px 18px;
    border-radius: 12px;
    border-left: 3px solid #8b5cf6;
    margin-top: 20px !important;
}

.delivery-note a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

.delivery-note a:hover {
    text-decoration: underline;
}

.error-text {
    font-size: 16px;
    opacity: .85;
    line-height: 1.5;
    margin-bottom: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
    /* ========== MOBILE PERFORMANCE OPTIMIZATIONS ========== */
    /* Remove expensive backdrop-filter and heavy blurs - main cause of janky scroll on phones */
    .bg-blur {
        filter: blur(60px); /* much lighter blur */
    }

    header {
        backdrop-filter: none !important;
        background: rgba(0, 0, 0, 0.9);
    }

    .modal {
        backdrop-filter: none !important;
    }

    /* Lighter transitions + reduced effects on mobile for better scroll performance */
    .service-card,
    .btn,
    .btn-outline {
        transition: 0.2s ease;
    }

    /* Disable smooth scroll on mobile - can feel laggy with other effects */
    html {
        scroll-behavior: auto;
    }

    html {
        overflow-x: hidden;
        width: 100%;
        min-width: 0;
        overscroll-behavior-x: none;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overscroll-behavior-x: none;
        min-height: 100%;
    }

    @supports (-webkit-touch-callout: none) {
        html {
            overflow-y: auto;
            overscroll-behavior-y: none;
            -webkit-overflow-scrolling: touch;
        }

        body {
            overflow-y: auto;
            overscroll-behavior-y: none;
            -webkit-overflow-scrolling: touch;
        }
    }

    body.modal-open {
        overflow-x: hidden;
        overflow-y: hidden;
        width: 100%;
        max-width: 100%;
        position: relative;
        left: 0;
        right: 0;
    }

    .modal {
        overflow-x: hidden;
        touch-action: none;
    }

    .modal-content {
        max-width: 100%;
        overflow-x: hidden;
        touch-action: pan-y;
    }

    .site-shell {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .site-shell > * {
        min-width: 0;
        max-width: 100%;
    }

    header {
        left: 0;
        right: 0;
        width: auto;
    }

    #cases {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .bg-blur {
        pointer-events: none;
    }

    .blur1 {
        left: -30px;
        top: -50px;
        width: 220px;
        height: 220px;
    }

    .blur2 {
        right: -30px;
        left: auto;
        bottom: 0;
        width: 200px;
        height: 200px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 120px 5% 80px;
        gap: 40px;
        width: 100%;
        overflow: hidden;
    }

    .hero-content {
        padding-top: 0;
        padding-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 48px;
        word-break: break-word;
    }

    .hero p {
        font-size: 18px;
        padding: 0 5px;
    }

    .hero-image img {
        height: 300px;
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        padding: 30px 5%;
    }

    nav {
        display: none;
    }

    .header-location {
        display: none !important;
    }

    .delivery-link {
        display: none;
    }

    section {
        padding: 60px 5%;
        width: 100%;
        overflow: hidden;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 25px;
        /* lighter for performance */
        background: rgba(20, 20, 20, 0.85);
    }

    .cta {
        margin: 40px 5%;
        padding: 40px 20px;
        width: auto;
    }

    .cta h2 {
        font-size: 32px;
    }

    .modal-content {
        width: 90%;
        padding: 30px;
    }

    .delivery-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 25px;
    }

    .legal-modal {
        width: 95%;
        max-height: 80vh;
    }

    footer {
        padding: 4px 3% !important;
    }

    .footer-line {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 9px;
        justify-content: center;
        padding: 0;
        max-width: 100%;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .footer-center,
    .footer-right {
        flex: 1 1 100%;
        text-align: center;
        min-width: 0;
        max-width: 100%;
    }

    .footer-disclaimer {
        font-size: 8px;
        text-align: center;
        padding: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.15;
    }

    .footer-right {
        justify-content: center;
        gap: 2px;
        flex-wrap: wrap;
    }

    .footer-legal {
        font-size: 8.5px;
    }

    .footer-copy {
        font-size: 8.5px;
        margin-left: 2px;
        padding-left: 2px;
    }

    .modal input,
    .modal textarea,
    .modal select {
        font-size: 16px;
        touch-action: manipulation;
    }

    .btn, .btn-outline {
        padding: 12px 24px;
        white-space: nowrap;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .stats .stat h2 {
        font-size: 40px;
    }

    footer {
        padding: 40px 5%;
    }
}

/* 
  ========== BUILD CAROUSEL - FINAL DESKTOP / PC VERSION ==========
  This is the locked final version for desktop/PC (as of 2026-06-23).
  DO NOT modify the carousel styles, sizes, fonts, ring (3px/1.5px), 
  scales, heights (560px), or layout for desktop.
  User confirmed: "Отлично для пк версии идеально. все ни чего менять больше"
*/
.build-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0; /* full available width like services section content (section padding handles sides) */
  overflow-x: hidden;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  /* top/bottom padding for scale headroom + to fully show the purple focus ring on active card (top corners) */
  padding-top: 48px;
  padding-bottom: 48px;
  /* no horizontal padding here - arrows on outer, space via track padding */
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.carousel-track {
  display: flex;
  gap: 18px;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
  /* horizontal padding provides space so extreme cards don't touch arrows */
  padding-left: 55px;
  padding-right: 55px;
  /* small vertical padding to give room for scaled active card + ring */
  padding-top: 8px;
  padding-bottom: 8px;
}

.build-card {
  position: relative;
  flex: 0 0 290px; /* width unchanged */
  height: 560px; /* 1.3× taller for more text space, width unchanged */
  background: #141414;
  border-radius: 18px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.4s ease,
              box-shadow 0.4s ease,
              filter 0.4s ease;
  display: flex;
  flex-direction: column;
  transform-origin: center center;
  /* faded side cards */
  transform: scale(0.84);
  opacity: 0.5;
  filter: saturate(0.62) brightness(0.87);
}

/* Thinner purple ring (1.5px) for non-focused cards (.build-card and .near) */
.build-card::after {
  content: '';
  position: absolute;
  top: -1.5px;
  left: -1.5px;
  right: -1.5px;
  bottom: -1.5px;
  border: 1.5px solid #8b5cf6;
  border-radius: 19.5px; /* 18px card radius + 1.5px */
  pointer-events: none;
  z-index: 1;
}

.build-card.active {
  /* focused card is prominent and always perfectly centered */
  transform: scale(1.10);
  opacity: 1;
  filter: none;
  z-index: 5;
  overflow: visible;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.68);
}

/* Purple focus ring (3px) - using ::after so it sits on top and is not covered by the photo at top corners */
.build-card.active::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid #8b5cf6;
  border-radius: 21px; /* card 18px + 3px */
  pointer-events: none;
  z-index: 2; /* ensure ring is above the photo and info */
}

.build-card.near {
  transform: scale(0.94);
  opacity: 0.82;
  filter: saturate(0.82) brightness(0.96);
  z-index: 2;
}

.build-card.active:hover {
  transform: scale(1.12);
  overflow: visible;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72);
}

.build-card.active:hover::after {
  border-color: #a78bfa;
}

.build-card .image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0a0a0a;
  flex-shrink: 0;
  position: relative;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

/* subtle reflection under photo */
.build-card .image-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.025), transparent);
  pointer-events: none;
  z-index: 1;
}

.build-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0a0a0a;
  position: relative;
  z-index: 0;
}

.build-card .info {
  padding: 15px 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.build-card h3 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 15px;
  color: #f5f5f5;
  line-height: 1.1;
  text-align: center;
}

.build-card .specs {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #a0a0a0;
  text-align: left;
}

.build-card .specs li {
  padding: 2px 0;
}

.build-card .specs li::before {
  content: none;
}

.build-card .price {
  font-size: 24px;
  font-weight: 700;
  color: #a78bfa;
  margin-top: 10px;
  padding-top: 6px;
  text-align: center;
}

.carousel-arrow {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  z-index: 20;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.09);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.carousel-arrow:hover {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev {
  left: 8px;
}

.carousel-arrow.next {
  right: 8px;
}

@media (max-width: 900px) {
  .carousel-track {
    padding-left: 30px;
    padding-right: 50px; /* arrow space on right for mobile, JS handles last card full visibility */
    gap: 10px;
  }
  .build-card {
    flex: 0 0 155px; /* width unchanged */
    height: 340px; /* a bit more height for better text fit on mobile */
    transform: scale(0.96);
    opacity: 0.93;
    filter: none;
    overflow: hidden;
  }
  .build-card.active {
    transform: scale(1.08); /* make focused card enlarge a bit on phone */
    overflow: visible;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  }

  .build-card.active::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid #8b5cf6;
    border-radius: 21px;
    pointer-events: none;
    z-index: 2;
  }

  /* 1.5px ring for non-focused on mobile */
  .build-card::after {
    content: '';
    position: absolute;
    top: -1.5px;
    left: -1.5px;
    right: -1.5px;
    bottom: -1.5px;
    border: 1.5px solid #8b5cf6;
    border-radius: 19.5px;
    pointer-events: none;
    z-index: 1;
  }

  .build-card.near {
    transform: scale(0.98);
    opacity: 0.97;
  }
  .build-card h3 {
    font-size: 18px;
    text-align: center;
  }
  .build-card .specs {
    font-size: 10px;
    line-height: 1.5;
    margin: 0 0 2px;
    text-align: left;
  }
  .build-card .price {
    font-size: 15px;
    text-align: center;
    margin-top: auto;
    margin-bottom: 12px;
  }

  .build-card .specs li {
    padding: 1px 0;
  }
  .build-card .info {
    padding: 6px 8px 4px;
  }
  .build-carousel {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .carousel-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    width: 100%;
    max-width: 100%;
    min-height: 420px;
  }

  .carousel-track {
    position: absolute;
    left: 0;
    top: 28px;
    width: max-content;
    will-change: transform;
  }
  .carousel-arrow {
    width: 28px;
    height: 28px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.12);
  }

  .carousel-arrow.next {
    right: 5px;
  }
}

