:root {
    --primary: #3498db;
    --secondary: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --gray: #7f8c8d;
    --light-gray: #f8f9fa;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    color: var(--dark);
    font-size: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 i {
    color: var(--primary);
}

.tagline {
    color: var(--gray);
    font-size: 14px;
    margin-top: -5px;
}

/* Поиск */
.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
    height: 40px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 0.95rem;
}

.search-box input {
    width: 100%;
    height: 100%;
    padding: 0 15px 0 45px;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-size: 16px;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    outline: none;
}

/* Кнопка языка */
.lang-selector {
    position: relative;
    flex-shrink: 0;
    height: 40px;
}

.lang-btn {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
    height: 100%;
}

.lang-btn:hover {
    background: #e9ecef;
}

.lang-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    z-index: 1100;
    overflow: hidden;
}

.lang-dropdown a {
    color: var(--dark);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.lang-dropdown a:last-child {
    border-bottom: none;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: var(--primary);
    color: white;
}

.lang-dropdown.show {
    display: block;
}

/* Кнопка админки */
.admin-btn {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 0.9rem;
    height: 40px;
}

.admin-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 2rem;
    opacity: 0.9;
}

.stat span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== Categories ===== */
.categories-section {
    padding: 40px 0;
}

.categories-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.all-categories {
    background: linear-gradient(135deg, var(--primary), #5d8ffc);
    color: white;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.category-card h4 {
    font-size: 1.2rem;
    margin: 0;
}

/* ===== Offers Grid ===== */
.offers-section {
    padding: 40px 0 60px;
}

.offers-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.offer-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Единый блок логотипа для карточек и страницы оффера */
.offer-header,
.offer-image-large {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0;
    height: 220px;
    border-radius: 10px;
}
.offer-header img,
.offer-image-large img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.offer-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    opacity: 0.7;
}

.offer-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cashback {
    background: var(--secondary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.rating {
    background: white;
    color: var(--warning);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.offer-content {
    padding: 20px;
}

.category-tag {
    display: inline-block;
    background: var(--light);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.offer-content h4 {
    font-size: 1.2rem;
    margin: 10px 0;
    color: var(--dark);
}

.offer-content h4 a {
    text-decoration: none;
    color: inherit;
}

.offer-content p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.offer-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-primary {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border);
}

/* ===== Строка с категорией и бейджами ===== */
.offer-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 8px;
}
.offer-badge-horizontal {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.category-tag {
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.offer-badge-horizontal .cashback,
.offer-badge-horizontal .rating {
    background: rgba(0,0,0,0.7);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}
.offer-badge-horizontal .cashback {
    background: #2ecc71;
    color: white;
}
.offer-badge-horizontal .rating {
    background: white;
    color: #f39c12;
}
@media (max-width: 480px) {
    .offer-meta-row {
        flex-wrap: wrap;
        gap: 5px;
    }
    .category-tag {
        white-space: normal;
    }
    .offer-badge-horizontal .cashback,
    .offer-badge-horizontal .rating {
        padding: 3px 5px;
        font-size: 0.7rem;
    }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
}
.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span {
    color: var(--gray);
}

/* ===== GDPR Banner, Footer, Modals ===== */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: white;
    padding: 15px 0;
    z-index: 1001;
    display: none;
}

.gdpr-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.gdpr-banner a {
    color: var(--primary);
    text-decoration: underline;
}

.btn-accept {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-accept:hover {
    background: #2980b9;
}

.footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    color: white;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo p {
    color: var(--light);
    opacity: 0.8;
    margin: 5px 0;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.footer-links a {
    color: var(--light);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: white;
}

.footer-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-languages a {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-languages a:hover {
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: var(--light);
    opacity: 0.7;
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
}

/* ===== Плавающие кнопки ===== */
.floating-close,
.floating-back {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(52,152,219,0.85);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 1000;
}
.floating-close:hover,
.floating-close:active,
.floating-back:hover,
.floating-back:active {
    background: rgba(52,152,219,1);
    transform: scale(1.1);
}
@media (max-width: 768px) {
    .floating-close,
    .floating-back {
        bottom: 30px;
        right: 30px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* ===== Страница оффера (детали) ===== */
.offer-detail-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin: 40px 0;
}

.offer-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

/* Логотип на странице оффера — единый стиль с карточками */
.offer-image-large {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0;
    height: 100%;
    min-height: 220px;
    border-radius: 10px;
}
.offer-image-large img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Правая колонка: метаданные и кнопка */
.offer-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.offer-meta p {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
}
.cashback-big {
    font-size: 2rem;
    font-weight: bold;
    color: #2ecc71;
}
.btn-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    margin-top: 0;
    align-self: flex-start;
}
.offer-description {
    border-top: 1px solid #eee;
    padding-top: 30px;
}
.offer-description p {
    line-height: 1.8;
}
.offer-full-content {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* ===== МОБИЛЬНЫЕ АДАПТАЦИИ ===== */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .header {
        padding: 8px 0;
    }

    .header .container {
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }

    .search-box {
        flex: 1;
        max-width: none;
        min-width: 0;
        height: 36px;
    }

    .search-box input {
        font-size: 14px;
        padding-left: 38px;
    }

    .search-box i {
        left: 12px;
        font-size: 14px;
    }

    .lang-selector {
        flex-shrink: 0;
        height: 36px;
    }

    .lang-btn {
        padding: 0 10px;
        font-size: 0.85rem;
        height: 36px;
    }

    .lang-dropdown {
        min-width: 130px;
        right: 0;
        left: auto;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .category-card h4 {
        font-size: 1rem;
    }

    .hero {
        padding: 30px 0;
        margin-bottom: 20px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .stats {
        gap: 15px;
    }

    .offers-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }

    /* Логотипы на мобильных: высота 110px (как вы хотели) */
    .offer-header,
    .offer-image-large {
        height: 110px;
        min-height: 110px;
    }

    .offer-detail-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .offer-meta p {
        font-size: 1.1rem;
        margin: 0 0 10px 0;
    }

    .cashback-big {
        font-size: 1.5rem;
    }

    .btn-large {
        padding: 12px 20px;
        font-size: 1rem;
        margin-top: 10px;
    }

    .page-header h1 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .legal-card h2,
    .about-card h2 {
        font-size: 1.15rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }

    .footer-languages {
        justify-content: center;
    }

    .gdpr-banner .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        padding: 12px 6px;
    }

    .category-icon {
        font-size: 1.5rem;
    }

    .category-card h4 {
        font-size: 0.85rem;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .offer-header,
    .offer-image-large {
        height: 100px;
        min-height: 100px;
    }

    .page-header h1 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .legal-card h2,
    .about-card h2 {
        font-size: 1rem;
    }
}