/* Страница рассрочки - стили по образцу М.Видео */

.installment-page {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Banner Section */
.installment-banner {
    position: relative;
    margin-bottom: 0;
}

.installment-banner__container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.installment-banner__image {
    position: relative;
    width: 100%;
    height: 100%;
}

.installment-banner__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.installment-banner__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(232, 4, 89, 0.8) 0%, rgba(255, 107, 157, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.installment-banner__default {
    background: linear-gradient(135deg, #e80459 0%, #ff6b9d 100%);
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.installment-banner__default::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.installment-banner__content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 0 20px;
}

.installment-banner__title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: white;
}

.installment-banner__subtitle {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 40px 0;
    opacity: 0.9;
    color: white;
}

.installment-banner__features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.installment-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.installment-feature__icon {
    width: 24px;
    height: 24px;
    color: #4ade80;
    flex-shrink: 0;
}

.installment-banner__button {
    background: white;
    color: #e80459;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.installment-banner__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Info Section */
.installment-info {
    padding: 80px 0;
    background: #f8fafc;
}

.installment-info__content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
}

.installment-info__title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: #1f2937;
}

.installment-info__features {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.installment-info__feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.installment-info__feature-icon {
    width: 48px;
    height: 48px;
    background: #e80459;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.installment-info__feature-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.installment-info__feature-content p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.installment-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.installment-hero__content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.installment-hero__title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.installment-hero__subtitle {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 40px 0;
    opacity: 0.9;
}

.installment-hero__features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.installment-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
}

.installment-feature__icon {
    width: 24px;
    height: 24px;
    color: #4ade80;
    flex-shrink: 0;
}

.installment-hero__button {
    background: white;
    color: #e80459;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.installment-hero__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Calculator */
.installment-calculator {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

.installment-calculator h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    text-align: center;
}

.installment-calculator__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.installment-calculator__field {
    position: relative;
}

.installment-calculator__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.installment-calculator__field input,
.installment-calculator__field select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.installment-calculator__field input:focus,
.installment-calculator__field select:focus {
    outline: none;
    border-color: #e80459;
}

.installment-calculator__currency {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6b7280;
    pointer-events: none;
}

.installment-calculator__button {
    background: #e80459;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.installment-calculator__button:hover {
    background: #d90051;
}

.installment-result {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.installment-result__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.installment-result__item:last-child {
    border-bottom: none;
}

.installment-result__item--highlight {
    background: #e80459;
    color: white;
    margin: 0 -20px;
    padding: 16px 20px;
    border-radius: 8px;
    border: none;
}

.installment-result__label {
    font-size: 14px;
    font-weight: 500;
}

.installment-result__value {
    font-size: 18px;
    font-weight: 700;
}

/* Statistics */
.installment-stats {
    padding: 60px 0;
    background: #f8fafc;
}

.installment-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.installment-stat {
    text-align: center;
}

.installment-stat__number {
    font-size: 48px;
    font-weight: 700;
    color: #e80459;
    line-height: 1;
    margin-bottom: 8px;
}

.installment-stat__label {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* How it works */
.installment-how {
    padding: 80px 0;
}

.installment-section__title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 60px 0;
    color: #1f2937;
}

.installment-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.installment-step {
    text-align: center;
    position: relative;
}

.installment-step__number {
    width: 60px;
    height: 60px;
    background: #e80459;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.installment-step h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1f2937;
}

.installment-step p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Advantages */
.installment-advantages {
    padding: 80px 0;
    background: #f8fafc;
}

.installment-advantages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.installment-advantage {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.installment-advantage:hover {
    transform: translateY(-5px);
}

.installment-advantage__icon {
    width: 64px;
    height: 64px;
    background: #e80459;
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.installment-advantage h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1f2937;
}

.installment-advantage p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Bank Partners */
.installment-banks {
    padding: 80px 0;
}

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

.installment-bank {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    transition: border-color 0.3s ease;
}

.installment-bank:hover {
    border-color: #e80459;
}

.installment-bank__logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.installment-bank__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.installment-bank__info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.installment-bank__periods {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.installment-bank__period {
    background: #e80459;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.installment-bank__limits {
    font-size: 14px;
    color: #6b7280;
}

/* Products by Category */
.installment-products-categories {
    padding: 80px 0;
    background: white;
}

.installment-category-section {
    margin-bottom: 60px;
}

.installment-category-section:last-child {
    margin-bottom: 0;
}

.installment-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.installment-category-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.installment-category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e80459;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.installment-category-link:hover {
    color: #d90051;
}

.installment-products-scroll {
    position: relative;
}

.installment-products-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.installment-products-container::-webkit-scrollbar {
    display: none;
}

.installment-product-card {
    flex: 0 0 280px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.installment-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.installment-product-card__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.installment-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.installment-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e80459;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.installment-product-card__content {
    padding: 20px;
}

.installment-product-card__name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.installment-product-card__price {
    margin-bottom: 16px;
}

.installment-product-card__price-current {
    font-size: 20px;
    font-weight: 700;
    color: #e80459;
}

.installment-product-card__installment {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.installment-product-card__monthly,
.installment-product-card__period {
    text-align: center;
}

.installment-product-card__monthly-label,
.installment-product-card__period-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.installment-product-card__monthly-value,
.installment-product-card__period-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.installment-product-card__button {
    width: 100%;
    background: #e80459;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.installment-product-card__button:hover {
    background: #d90051;
}

/* Scroll Controls */
.installment-scroll-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.installment-scroll-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.installment-scroll-btn:hover {
    background: #e80459;
    color: white;
    border-color: #e80459;
}

.installment-scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.installment-scroll-btn--prev {
    left: -24px;
}

.installment-scroll-btn--next {
    right: -24px;
}

/* Products (legacy) */
.installment-products {
    padding: 80px 0;
    background: #f8fafc;
}

.installment-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.installment-product {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.installment-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.installment-product__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.installment-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.installment-product__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e80459;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.installment-product__content {
    padding: 20px;
}

.installment-product__name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.installment-product__price {
    margin-bottom: 16px;
}

.installment-product__price-current {
    font-size: 20px;
    font-weight: 700;
    color: #e80459;
}

.installment-product__installment {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.installment-product__monthly,
.installment-product__period {
    text-align: center;
}

.installment-product__monthly-label,
.installment-product__period-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.installment-product__monthly-value,
.installment-product__period-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.installment-product__button {
    width: 100%;
    background: #e80459;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.installment-product__button:hover {
    background: #d90051;
}

.installment-load-more {
    display: block;
    margin: 0 auto;
    background: white;
    color: #e80459;
    border: 2px solid #e80459;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.installment-load-more:hover {
    background: #e80459;
    color: white;
}

/* FAQ */
.installment-faq {
    padding: 80px 0;
}

.installment-faq__list {
    max-width: 800px;
    margin: 0 auto;
}

.installment-faq__item {
    border-bottom: 1px solid #e5e7eb;
}

.installment-faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.installment-faq__question:hover {
    color: #e80459;
}

.installment-faq__question h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: inherit;
}

.installment-faq__icon {
    transition: transform 0.3s ease;
    color: #6b7280;
}

.installment-faq__answer {
    display: none;
    padding-bottom: 24px;
}

.installment-faq__answer p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Notifications */
.installment-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.installment-notification--show {
    transform: translateX(0);
    opacity: 1;
}

.installment-notification--success {
    border-left: 4px solid #10b981;
}

.installment-notification--error {
    border-left: 4px solid #ef4444;
}

.installment-notification__content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.installment-notification--success .installment-notification__content svg {
    color: #10b981;
}

.installment-notification--error .installment-notification__content svg {
    color: #ef4444;
}

.installment-notification__content span {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

/* Responsive */
@media (max-width: 768px) {
    .installment-banner__container {
        height: 300px;
    }
    
    .installment-banner__title {
        font-size: 32px;
    }
    
    .installment-banner__subtitle {
        font-size: 18px;
    }
    
    .installment-banner__features {
        flex-direction: column;
        gap: 16px;
    }
    
    .installment-info__content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .installment-info__title {
        font-size: 28px;
    }
    
    .installment-category-title {
        font-size: 24px;
    }
    
    .installment-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .installment-product-card {
        flex: 0 0 250px;
    }
    
    .installment-scroll-btn--prev {
        left: -16px;
    }
    
    .installment-scroll-btn--next {
        right: -16px;
    }
    
    .installment-scroll-btn {
        width: 40px;
        height: 40px;
    }
    
    .installment-calculator {
        padding: 24px;
    }
    
    .installment-stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .installment-stat__number {
        font-size: 36px;
    }
    
    .installment-steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .installment-advantages__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .installment-banks__grid {
        grid-template-columns: 1fr;
    }
    
    .installment-products__grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .installment-section__title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .installment-hero {
        padding: 40px 0;
    }
    
    .installment-hero__title {
        font-size: 28px;
    }
    
    .installment-stats__grid {
        grid-template-columns: 1fr;
    }
    
    .installment-products__grid {
        grid-template-columns: 1fr;
    }
    
    .installment-product__installment {
        flex-direction: column;
        gap: 12px;
    }
}
