* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
}
.banner-container {
    position: relative;
    width: 100%;
}
.banner-img {
    width: 100%;
    max-height: 700px;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    background: transparent;
    z-index: 10;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 32px;
    font-weight: bold;
    color: white;
}
.logo span {
    color: #019d50;
}
.header-logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    clip-path: inset(2px 2px);
}

.logo-with-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-select-header .lang-select {
    background: transparent;
    border: 1px solid white;
    color: white;
    height: 38px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.lang-select-header .lang-select option {
    color: #333;
    background: white;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}
.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary {
    background-color: #019d50;
    color: white;
}
.btn-secondary:hover {
    opacity: 0.9;
}
.btn-telegram {
    background-color: #1a2c62;
    color: white;
}
.btn-telegram:hover {
    opacity: 0.9;
}

.btn-outline-white {
    padding: 10px 20px;
    margin-top: 12px;
    border-radius: 8px;
    font-size: 20px;
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-gray {
    background-color: #ccc;
    color: #333;
}

.btn-gray:hover {
    opacity: 0.9;
}

/* Footer */
.footer {
    background-color: #1a2c62;
    padding: 20px 40px;
    color: white;
    text-align: left;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.footer-logo span {
    color: #019d50;
}

.footer-copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: normal;
    word-break: break-word;
}

.banner-text-container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    padding: 0 40px;
    z-index: 10;
    transform: translateY(-50%);
}
.banner-text-content {
    display: block;
}
.banner-text-content h1 {
    font-size: 68px;
    margin-bottom: 15px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}
.banner-text-content p {
    font-size: 26px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Auth hint */
.auth-hint {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.auth-hint p {
    margin: 0;
    margin-right: 20px;
    color: #333;
    font-weight: bold;
    font-size: 42px;
    text-align: left;
    max-width: 66.666%;
}

.auth-hint-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

@media (min-width: 769px) {
    .auth-hint-buttons .btn {
        min-width: 140px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .auth-hint {
        flex-direction: column;
        align-items: flex-start;
    }
    .auth-hint p {
        margin-bottom: 20px;
        margin-right: 0;
        font-size: 21px;
        max-width: 100%;
    }
    .auth-hint-buttons {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: auto;
    }
}

/* Stats block */
.stats-container {
    background: white;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.stat-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    object-fit: contain;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #019d50;
    margin-bottom: 0px;
}

.stat-label {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 10px 0;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    .stat-value {
        font-size: 24px;
    }
    .stat-label {
        font-size: 12px;
    }
}

/* Services cards */
.services-container {
    max-width: 1200px;
    margin: -30px auto 30px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.service-card {
    flex: 1 1 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 18px;
    text-align: center;
}

.service-card p {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.service-card-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
}

.service-card-buttons .btn {
    flex: 1;
    max-width: 180px;
    text-align: center;
}

@media (max-width: 768px) {
    .service-card-buttons {
        flex-direction: column;
        align-items: center;
    }
    .service-card-buttons .btn {
        width: 180px;
    }
}

@media (min-width: 769px) {
    .service-card {
        flex: 1 1 48%;
    }
}

/* Brands block */
.brands-container {
    background: white;
    padding: 40px 20px;
}

.divider {
    height: 2px;
    background: #ffffff;
    background-image: linear-gradient(to right,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,1) 30%,
        rgba(0,0,0,1) 70%,
        rgba(0,0,0,0) 100%);
    margin: 0 auto;
    max-width: 800px;
}

/* Search section */
.search-section {
    position: relative;
    max-width: 1200px;
    margin: 0px auto 40px;
}

/* Модальное окно "В разработке" */
#devFeatureModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2001;
    display: none;
    align-items: center;
    justify-content: center;
}

#devFeatureModal.active {
    display: flex;
}

#devFeatureModal .modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: calc(100% - 40px);
    position: relative;
}

#devFeatureModal .modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
}

#devFeatureModal .modal-close:hover {
    color: #000;
}

.dev-feature-text {
    text-align: center;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 20px;
}

.dev-feature-footer {
    text-align: center;
}

/* Модальное окно манифеста */
#manifestModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2001;
    display: none;
    align-items: center;
    justify-content: center;
}

#manifestModal.active {
    display: flex;
}

#manifestModal .modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: calc(100% - 40px);
    position: relative;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

#manifestModal .modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
}

#manifestModal .modal-close:hover {
    color: #000;
}

.manifest-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.manifest-scrollable-content {
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    scrollbar-width: auto;
    scrollbar-color: #888;
}

.manifest-scrollable-content::-webkit-scrollbar {
    width: 10px;
    background: #f1f1f1;
}

.manifest-scrollable-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.manifest-scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .manifest-scrollable-content {
        scrollbar-width: none;
        scrollbar-color: transparent transparent;
    }
    .manifest-scrollable-content::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 768px) {
    #manifestModal .modal-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.manifest-text {
    text-align: center;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
}

.manifest-footer {
    text-align: center;
    margin-top: 20px;
}

.search-form {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 0;
    position: relative;
    z-index: 10;
}

.additional-params-hint {
    color: #000;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
}

.more-results-text {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.search-main-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
}

.filter-group input,
.filter-group select,
.filter-group .color-button {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    height: 40px;
    box-sizing: border-box;
}

.color-button {
    overflow: hidden;
}

.filter-group select,
.filter-group .color-button {
    cursor: pointer;
}

.filter-group select {
    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 10px center;
}

#main-search-btn {
    grid-column: 4;
    align-self: end;
    height: 40px;
    width: 100%;
    padding: 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Color Selector (как в search) */
.color-selector {
    position: relative;
}

.color-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.color-button:hover {
    border-color: #4CAF50;
}

.color-preview-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #ccc;
    flex-shrink: 0;
    background-color: transparent;
}

.color-text {
    flex: 1;
}

.color-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}

.color-button.open .color-arrow {
    transform: rotate(180deg);
}

.color-palette {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    animation: lb-fade 0.2s ease;
}

.color-palette.closing {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.color-option {
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.color-option:hover {
    transform: scale(1.05);
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.color-option::after {
    content: attr(data-name);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 101;
}

.color-option:hover::after {
    opacity: 1;
}

.color-option[data-color="white"],
.color-option[data-color="silver"],
.color-option[data-color="beige"],
.color-option[data-color="light-blue"] {
    border: 2px solid #ddd;
}

@media (max-width: 768px) {
    .search-form {
        margin-top: 0;
        padding: 10px;
    }
    .search-main-row {
        display: grid;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
        grid-template-columns: repeat(2, 1fr);
    }

    #main-search-btn {
        grid-column: 2;
    }
    
    .search-main-row .filter-group {
        flex: 1;
        min-width: 0;
    }
    
    .search-main-row .filter-group label {
        display: none;
    }

    .desktop-only {
        display: none;
    }
    
    .header-content .btn-telegram {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .search-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .filter-group {
        margin-bottom: 0;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-group input,
    .filter-group select,
    .filter-group .color-button,
    .filter-group-mobile-only input,
    .filter-group-mobile-only select,
    .filter-group-mobile-only .color-button {
        padding: 8px 10px;
        font-size: 13px;
        height: 38px;
        min-width: 0;
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 6px;
    }
    
    .filter-group label,
    .filter-group-mobile-only label {
        font-size: 12px;
        color: #666;
    }

    .filter-group select,
    .filter-group .color-button,
    #main-body-type-mobile {
        padding: 8px 36px 8px 10px;
        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 10px center;
        background-color: white;
    }

    .filter-group .color-button {
        padding: 8px 10px;
        background-image: none;
    }

    .filter-group .color-button .color-text {
        font-size: 13px;
    }

    .filter-group .color-button .color-arrow {
        font-size: 10px;
    }

    .filter-group .color-preview-box {
        width: 18px;
        height: 18px;
    }

    #main-search-input {
        width: 100%;
        min-width: 0;
    }

    #main-search-btn {
        flex-shrink: 0;
        height: 38px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .mobile-only .filter-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}

#main-search-input {
    flex: 1;
    padding: 10px 30px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
    appearance: none;
}

#main-search-btn {
    padding: 10px 25px;
}

.search-results {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.search-results.hidden {
    display: none;
}

.result-card-main {
    border: 1px solid #eee;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.result-card-main .card-wrapper {
    padding: 15px;
}

.result-card-main .card-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-card-main .card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-card-main .card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.result-card-main .card-specs {
    font-size: 14px;
}

.result-card-main .spec-text {
    color: #666;
    font-weight: bold;
}

.result-card-main .spec-sep {
    color: #333;
    font-weight: normal;
}

.result-card-main .card-price {
    font-size: 16px;
    font-weight: bold;
    color: #019d50;
}

.result-card-main .card-match {
    position: absolute;
    right: 15px;
    bottom: 15px;
    font-size: 14px;
    color: #1a2c62;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .search-section {
        margin: 0 20px;
    }
    .search-results {
        grid-template-columns: 1fr;
    }
    .result-card-main {
        display: flex;
        gap: 15px;
    }
    .result-card-main .card-photo {
        width: 120px;
        height: 120px;
        margin: 0;
        flex-shrink: 0;
    }
    .result-card-main .card-info {
        flex: 1;
    }
    .btn-outline-white {
        font-size: 13px;
    }
}

.brands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.brands-header h2 {
    margin: 0;
    color: #333;
}

.toggle-brands {
    background: transparent;
    color: #333;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-item.hidden {
    display: none;
}

.brand-logo {
    width: 100%;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.brand-name {
    font-size: 14px;
    color: #333;
    text-align: center;
    font-weight: bold;
}

.brands-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .banner-img {
        height: 320px;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }
    header {
        padding: 15px 20px;
    }
    .banner-text-container {
        padding: 0 20px;
        top: 46%;
        transform: translateY(-50%);
    }
    .logo {
        font-size: 24px;
    }
    .banner-text-content h1 {
        font-size: 22px;
    }
    .banner-text-content p {
        font-size: 13px;
    }
    .stats-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
    }
    .stat-item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 15px;
        padding-left: 14%;
    }
    .stat-icon {
        margin-bottom: 0;
    }
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .brands-header {
        padding: 0;
    }
    .brands-header h2 {
        font-size: 22px;
    }
}

@media (min-width: 769px) {
    .filter-group-mobile-only {
        display: none;
    }
}

/* Модальное окно авторизации для мобильного */
#mobileAuthModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

#mobileAuthModal.active {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

#mobileAuthModal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: calc(100% - 40px);
    position: relative;
    text-align: center;
}

#mobileAuthModal .modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
}

#mobileAuthModal .modal-close:hover {
    color: #000;
}

#mobileAuthModal .modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

#mobileAuthModal p {
    text-align: center;
    margin: 0 20px 20px;
    font-size: 1.3em;
}

/* Полный поиск */
.full-search-hint {
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 15px;
}

.full-search-btn-container {
    text-align: center;
    margin-bottom: 20px;
}

.btn.full-search-btn {
    background-color: #1a2c62;
    color: white;
}

.more-results-text {
    text-align: center;
    font-size: 1.5em;
    margin: 15px 0;
}

.full-search-btn-container {
    margin-top: 15px;
}

@media (min-width: 769px) {
    .full-search-hint {
        font-weight: bold;
    }
    
    .more-results-text {
        font-weight: bold;
        margin-top: 20px;
    }
}

/* Мобильная версия: размер шрифта как у auth-hint */
@media (max-width: 768px) {
    .full-search-hint {
        font-size: 21px;
    }
    
    .more-results-text {
        font-size: 21px;
    }
}