/* ===== GENERATION PAGE STYLES ===== */

/* ===== HERO SECTION ===== */
.gen-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 40px 0 60px;
    color: #fff;
}

.gen-hero__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.gen-hero__brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gen-hero__brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
}

.gen-hero__title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.gen-hero__generation {
    font-size: 1.2rem;
    color: #FFD645;
    font-weight: 500;
}

.gen-hero__nav {
    display: flex;
    gap: 12px;
}

.gen-hero__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.gen-hero__nav-link:hover {
    background: #FFD645;
    border-color: #FFD645;
    color: #333;
}

.gen-hero__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.gen-hero__image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.gen-hero__image img {
    width: 100%;
    height: auto;
    display: block;
}

.gen-hero__prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.gen-price-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s, background 0.3s;
}

.gen-price-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.gen-price-card__label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gen-price-card__value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.gen-price-card--discount {
    background: rgba(255,214,69,0.2);
    border-color: #FFD645;
}

.gen-price-card--discount .gen-price-card__value {
    color: #FFD645;
}

.gen-price-card--benefit {
    background: rgba(76,175,80,0.2);
    border-color: #4CAF50;
}

.gen-price-card--benefit .gen-price-card__value {
    color: #4CAF50;
}

/* Кредитный калькулятор */
.gen-price-card--calculator {
    grid-column: span 2;
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
}

.gen-price-card--calculator .gen-price-card__value {
    color: #818cf8;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.credit-calc {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.credit-calc__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credit-calc__row label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    min-width: 45px;
}

.credit-calc__row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
}

.credit-calc__row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #818cf8;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.credit-calc__row input[type="range"]::-webkit-slider-thumb:hover {
    background: #a5b4fc;
}

.credit-calc__row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #818cf8;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.credit-calc__row span {
    font-size: 0.85rem;
    color: #fff;
    min-width: 55px;
    text-align: right;
    font-weight: 600;
}

/* ===== GALLERY SECTION ===== */
.gen-gallery {
    padding: 50px 0;
    background: #f5f5f5;
}

.gen-gallery__tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.gen-gallery__tab {
    padding: 10px 24px;
    border: none;
    background: #fff;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gen-gallery__tab:hover {
    background: #FFD645;
    color: #333;
}

.gen-gallery__tab.active {
    background: #FFD645;
    color: #333;
}

.gen-gallery__content {
    display: none;
}

.gen-gallery__content.active {
    display: block;
}

.gen-gallery__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 160px);
    gap: 12px;
}

.gen-gallery__item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gen-gallery__item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gen-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gen-gallery__item--large {
    grid-column: 1;
    grid-row: span 2;
}

.gen-gallery__more {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.gen-gallery__video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
}

.gen-gallery__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== COMPLECTATIONS SECTION ===== */
.gen-complects {
    padding: 40px 0;
    background: #fff;
}

.gen-complects__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.gen-complects__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.gen-complects__controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gen-complects__sort {
    display: flex;
}

.sort-select {
    padding: 10px 35px 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sort-select:hover {
    border-color: #ccc;
}

.sort-select:focus {
    border-color: #FFD645;
    box-shadow: 0 0 0 3px rgba(255, 214, 69, 0.2);
}

.gen-complects__search {
    width: 200px;
}

.gen-complects__search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.gen-complects__search input:focus {
    border-color: #FFD645;
    box-shadow: 0 0 0 3px rgba(255, 214, 69, 0.2);
}

.gen-complects__list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gen-complect-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.gen-complect-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.gen-complect-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-left: 4px solid transparent;
    transition: all 0.3s;
    gap: 20px;
}

.gen-complect-card.active .gen-complect-card__header {
    border-left-color: #FFD645;
    background: linear-gradient(135deg, #fffef5 0%, #fff9e6 100%);
}

.gen-complect-card__left {
    flex: 1;
    min-width: 0;
}

.gen-complect-card__title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.gen-complect-card__title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.gen-complect-card__years {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.gen-complect-card__toggle {
    color: #999;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.gen-complect-card.active .gen-complect-card__toggle {
    transform: rotate(180deg);
}

.gen-complect-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.spec-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #555;
    font-weight: 500;
}

.gen-complect-card__prices {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.gen-complect-price {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.gen-complect-price .label {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.gen-complect-price .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.gen-complect-price--discount .value {
    color: #e6b800;
}

.gen-complect-price--benefit .value {
    color: #4CAF50;
}

.gen-complect-card__body {
    display: none;
    padding: 25px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.gen-complect-card.active .gen-complect-card__body {
    display: block;
}

/* Поиск по опциям */
.gen-options-search {
    margin-bottom: 15px;
}

.gen-options-search .options-search-input {
    width: 100%;
    max-width: 350px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
}

.gen-options-search .options-search-input:focus {
    border-color: #FFD645;
    box-shadow: 0 0 0 3px rgba(255, 214, 69, 0.2);
}

.gen-options-search .options-search-input::placeholder {
    color: #999;
}

/* Табы внутри карточки */
.gen-complect-card .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.gen-complect-card .tab {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.gen-complect-card .tab:hover {
    background: #FFD645;
    border-color: #FFD645;
    color: #333;
}

.gen-complect-card .tab.active {
    background: #FFD645;
    border-color: #FFD645;
    color: #333;
}

.gen-complect-card .tab-content {
    display: none;
}

.gen-complect-card .tab-content.active {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gen-complect-card .option-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: calc(25% - 9px);
    box-sizing: border-box;
}

.gen-complect-card .option-card strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 6px;
}

.gen-complect-card .option-card p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* Скрываем старый accordion */
.accordion {
    display: none;
}

.accordion-item {
    background-color: white;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.accordion-header {
    cursor: pointer;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-left: 5px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.accordion-header__info {
    display: flex;
    align-items: center;
    gap: 50px;
    position: absolute;
    right: 20px;
    width: 480px;
    justify-content: space-between;
}

.accordion-header__price {
    width: 230px;
}

.accordion-header:hover {
    background-color: #f1f3f5;
}

.accordion-header.active {
    background-color: #e9f0ff8f;
    border-left-color: #FFD645;
}

.accordion-body {
    display: none;
    padding: 20px;
    background-color: #fafafa;
}

/* Табы в сетке */
.accordion .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px -20px;
}

.accordion .tab {
    min-width: 50px;
    padding: 4px 6px;
    text-align: center;
    font-weight: bold;
    color: #333;
    background-color: #f1f3f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.accordion .tab:hover {
    background-color: #FFD645;
    color: white;
}

.accordion .tab.active {
    background-color: #FFD645;
    color: white;
}

.accordion .tab-content {
    display: none;
}

.accordion .tab-content.active {
    display: block;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.accordion .option-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    width: 23%;
}

.accordion .option-card strong {
    font-weight: 500;
    text-align: center;
    display: block;
    width: 100%;
}

.accordion .option-card p {
    text-align: center;
    margin-top: 15px;
    font-weight: 800;
}

/*табы*/

.complectation-block {
    width: 100%;
}

.complect-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.complect-content {
    flex: 1 1 calc(33.333% - 7px);
    box-sizing: border-box;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .gen-hero__content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .gen-hero__image {
        order: -1;
    }

    .gen-hero__title h1 {
        font-size: 2rem;
    }

    .gen-gallery__grid {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: repeat(2, 140px);
    }

    .gen-complect-card .option-card {
        width: calc(33.33% - 8px);
    }
}

@media (max-width: 768px) {
    .gen-hero {
        padding: 30px 0 40px;
    }

    .gen-hero__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gen-hero__brand {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .gen-hero__nav {
        width: 100%;
        justify-content: center;
    }

    .gen-hero__nav-link {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .gen-hero__brand-logo {
        width: 60px;
        height: 60px;
    }

    .gen-hero__title h1 {
        font-size: 1.6rem;
    }

    .gen-hero__generation {
        font-size: 1rem;
    }

    .gen-hero__prices {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .gen-price-card {
        padding: 15px 10px;
    }

    .gen-price-card__label {
        font-size: 0.75rem;
    }

    .gen-price-card__value {
        font-size: 1rem;
    }

    .gen-gallery {
        padding: 30px 0;
    }

    .gen-gallery__tabs {
        gap: 8px;
    }

    .gen-gallery__tab {
        padding: 8px 16px;
        font-size: 12px;
    }

    .gen-gallery__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 100px);
    }

    .gen-gallery__item--large {
        grid-column: span 2;
        grid-row: span 1;
    }

    /* Комплектации - мобильные */
    .gen-complects {
        padding: 30px 0;
    }

    .gen-complects__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gen-complects__title {
        font-size: 1.3rem;
    }

    .gen-complects__controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .gen-complects__sort {
        order: 2;
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .gen-complects__search {
        width: 100%;
        order: 1;
    }

    .gen-complect-card__header {
        flex-wrap: wrap;
        padding: 12px 15px;
        gap: 10px;
    }

    .gen-complect-card__left {
        width: 100%;
    }

    .gen-complect-card__title {
        flex-wrap: wrap;
        gap: 8px;
    }

    .gen-complect-card__prices {
        gap: 15px;
        width: 100%;
        justify-content: flex-start;
    }

    .gen-complect-price {
        text-align: left;
    }

    .gen-complect-card__toggle {
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .gen-complect-card__header {
        position: relative;
    }

    .gen-complect-card__body {
        padding: 20px;
    }

    .gen-complect-card .option-card {
        width: calc(50% - 6px);
    }
}

@media (max-width: 480px) {
    .gen-hero__prices {
        grid-template-columns: 1fr;
    }

    .gen-price-card--calculator {
        grid-column: span 1;
    }

    .gen-gallery__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 100px);
    }

    .gen-complect-card__title h3 {
        font-size: 1.1rem;
    }

    .spec-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .gen-complect-price .value {
        font-size: 0.95rem;
    }

    .gen-complect-card .option-card {
        width: 100%;
    }
}
