/* =========================================
   ОБЩИЕ СТИЛИ ГЛАВНОЙ СТРАНИЦЫ
   ========================================= */
.text-center { text-align: center; }

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--color-text);
    letter-spacing: -1.4px;
    line-height: 1.05;
}

.section-subtitle {
    max-width: 620px;
    margin: 0 auto 50px;
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.7;
}

/* =========================================
   БЕГУЩАЯ СТРОКА (MARQUEE)
   ========================================= */
.announcement-bar {
    width: 100%;
    background-color: var(--color-accent);
    color: var(--color-bg);
    overflow: hidden;
    padding: 12px 0;
    position: relative;
}

.announcement-track {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
}

.announcement-track:hover { animation-play-state: paused; }

.announcement-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding-right: 20px;
    flex-shrink: 0;
}

.announcement-content span {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.announcement-content .dot {
    margin: 0 20px;
    font-size: 10px;
    opacity: 0.5;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================
   HERO
   ========================================= */
.home-hero {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--color-bg) 100%);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: #FFFFFF;
    color: var(--color-accent);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(230, 106, 69, 0.1);
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-title span { color: var(--color-accent); }

.hero-subtitle {
    font-size: 16px;
    color: var(--color-text-muted);
    max-width: 500px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-btn {
    width: auto;
    padding: 18px 40px;
    font-size: 16px;
}

.hero-trust {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-success);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 280px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    transform: rotate(5deg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: rotate(5deg) translateY(0px); }
    50% { transform: rotate(5deg) translateY(-20px); }
    100% { transform: rotate(5deg) translateY(0px); }
}

.glass-header {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 5px;
}

.glass-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 15px;
}

.glass-status {
    display: inline-block;
    background: #E8F5EE;
    color: var(--color-success);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================
   HOW IT WORKS
   ========================================= */
.home-steps {
    padding: 90px 0;
    background: var(--color-surface);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.step-card {
    background: var(--color-bg);
    padding: 40px 30px;
    border-radius: 28px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all .35s ease;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* =========================================
   PREMIUM CATEGORIES
   ========================================= */
.home-categories {
    padding: 90px 0 30px;
    position: relative;
    overflow: hidden;
}

.home-categories::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(230,106,69,0.08) 0%, transparent 70%);
    top: -250px;
    right: -180px;
    pointer-events: none;
}

.categories-head {
    text-align: center;
    margin-bottom: 50px;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    min-height: 280px;
    background: #111111;
    isolation: isolate;
    transition: transform .45s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow .45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 10px 40px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 30px 70px rgba(0,0,0,0.12),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.category-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    transform: scale(1);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.category-card:hover .category-image {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(8,8,8,0.05) 0%,
            rgba(8,8,8,0.35) 45%,
            rgba(8,8,8,0.88) 100%
        );
    z-index: 2;
}

.category-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
}

.category-top {
    margin-bottom: auto;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.95);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.category-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.05;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 12px;
    letter-spacing: -1px;
}

.category-description {
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 18px;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.category-count {
    color: rgba(255,255,255,0.68);
    font-size: 13px;
    font-weight: 600;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    transition: all .3s ease;
}

.category-link svg {
    transition: transform .3s ease;
}

.category-card:hover .category-link svg {
    transform: translateX(4px);
}

.category-action {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
    transition: all .35s ease;
}

.category-card:hover .category-action {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

/* =========================================
   PRODUCTS
   ========================================= */
.home-products {
    padding: 70px 0 100px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: 28px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all .35s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(230, 106, 69, 0.1);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #F8F9FA;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: var(--color-accent);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 20px;
    z-index: 2;
}

.product-card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 4px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.installment-price-block {
    margin-bottom: 15px;
}

.installment-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
    display: block;
    line-height: 1;
}

.installment-price small {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.full-price {
    font-size: 12px;
    color: #A0A0A0;
    text-decoration: line-through;
    margin-top: 4px;
    display: block;
}

.btn-want-loop {
    display: block;
    text-align: center;
    padding: 14px;
    background: #F4F1EC;
    color: var(--color-text);
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    margin-top: auto;
    border: none;
}

.product-card:hover .btn-want-loop {
    background: var(--color-accent);
    color: #ffffff;
}

/* =========================================
   DESKTOP
   ========================================= */
@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card:first-child {
        grid-column: span 2;
        min-height: 360px;
    }
}

@media (min-width: 992px) {

    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .hero-visual {
        justify-content: flex-end;
        padding-right: 50px;
    }

    .glass-card {
        width: 350px;
        transform: rotate(3deg);
    }

    @keyframes float {
        0% { transform: rotate(3deg) translateY(0px); }
        50% { transform: rotate(3deg) translateY(-20px); }
        100% { transform: rotate(3deg) translateY(0px); }
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    /* =========================
       КАТЕГОРИИ — 3 В РЯД
       ========================= */

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .category-card,
    .category-card:first-child,
    .category-card:nth-child(2),
    .category-card:nth-child(3),
    .category-card:nth-child(4),
    .category-card:nth-child(5),
    .category-card:nth-child(6) {
        grid-column: auto;
        min-height: 420px;
    }

    .category-name {
        font-size: 32px;
    }

    .category-description {
        font-size: 15px;
    }

    /* PRODUCTS */

    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }

    .product-card {
        padding: 16px;
    }

    .product-title {
        font-size: 15px;
    }

    .installment-price {
        font-size: 24px;
    }
}