/* ============================================================
   ОБЩИЕ СТИЛИ
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   ХЕДЕР (сквозной)
   ============================================================ */
.header {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #0407a9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 40px;
}

.header .nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.header .nav a {
    font-weight: 600;
    font-size: 14px;
    color: #4b5563;
    transition: color 0.2s;
    padding: 6px 12px;
    border-radius: 8px;
}

.header .nav a:hover {
    color: #0407a9;
    background: #f0f1ff;
}

.header .nav .btn-add {
    background: #0407a9;
    color: white !important;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
}

.header .nav .btn-add:hover {
    background: #03068a;
    transform: scale(1.02);
}

/* ============================================================
   ФУТЕР — ТЁМНЫЙ, С ЗОЛОТЫМИ АКЦЕНТАМИ
   ============================================================ */
.footer {
    background: #1a1a2e;
    color: #9ca3af;
    padding: 30px 0 16px;
    margin-top: 30px;
    border-top: 3px solid #f59e0b;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.footer-col h4 {
    color: #f59e0b;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.footer-col a {
    display: block;
    color: #9ca3af;
    font-size: 13px;
    padding: 4px 0;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-col a:hover {
    color: #f59e0b;
}

.footer-col p {
    font-size: 13px;
    color: #9ca3af;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col p i {
    color: #f59e0b;
    width: 20px;
    text-align: center;
}

.social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #9ca3af;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
}

.social a:hover {
    background: #f59e0b;
    color: #1a1a2e;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 12px;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* ============================================================
   ПОИСК
   ============================================================ */
.search-bar {
    margin: 20px 0 16px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}

.search-wrapper input {
    flex: 1;
    min-width: 200px;
    padding: 12px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 30px;
    font-size: 15px;
    background: white;
    transition: all 0.3s;
    outline: none;
}

.search-wrapper input:focus {
    border-color: #0407a9;
    box-shadow: 0 0 0 4px rgba(4,7,169,0.1);
}

.search-wrapper button {
    padding: 12px 28px;
    background: #0407a9;
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-wrapper button:hover {
    background: #03068a;
    transform: scale(1.02);
}

.clear-btn {
    position: absolute;
    right: 180px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
}

/* ============================================================
   НОВОСТИ
   ============================================================ */
.news-section {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #f59e0b;
}

.news-title {
    font-size: 18px;
    color: #0407a9;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 4px solid #0407a9;
    gap: 14px;
    transition: all 0.2s;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-item .icon-box {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #0407a9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.news-item .content {
    flex: 1;
    min-width: 150px;
}

.news-item .title {
    font-weight: 700;
    color: #0407a9;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-item .date-badge {
    font-weight: 400;
    font-size: 10px;
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 10px;
    border-radius: 20px;
}

.news-item .text {
    font-size: 13px;
    color: #1f2937;
    margin-top: 2px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   КАТЕГОРИИ
   ============================================================ */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.categories .cat-item {
    position: relative;
}

.categories .cat-link {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #e5e7eb;
    background: white;
    color: #4b5563;
    cursor: pointer;
}

.categories .cat-link:hover {
    border-color: #0407a9;
    color: #0407a9;
    background: #f0f1ff;
}

.categories .cat-link.active {
    background: #0407a9;
    color: white;
    border-color: #0407a9;
    box-shadow: 0 4px 12px rgba(4,7,169,0.3);
}

.categories .sub-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 180px;
    z-index: 10;
    border: 1px solid #e5e7eb;
    margin-top: 4px;
}

.categories .sub-list.open {
    display: block;
}

.categories .sub-list a {
    display: block;
    padding: 8px 18px;
    text-decoration: none;
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.categories .sub-list a:hover {
    background: #f0f1ff;
    color: #0407a9;
}

.categories .sub-list a.active {
    background: #0407a9;
    color: white;
}

/* ============================================================
   ГРИД ОБЪЯВЛЕНИЙ
   ============================================================ */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 12px 0;
}

/* ============================================================
   ⭐⭐⭐ КАРТОЧКА ОБЪЯВЛЕНИЯ — ФОТО НА ВСЮ ОБЛАСТЬ ⭐⭐⭐
   ============================================================ */
.ad-card {
    background: white;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.ad-card .image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: #ffffff;
    overflow: hidden;
}

.ad-card .image-wrapper img {
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: none !important;
    display: block;
    background: #ffffff;
}

.ad-card .image-wrapper .no-photo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #bbb;
}

.ad-card .badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
    pointer-events: none;
}

.ad-card .badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ad-card .badge.top {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ad-card .badge.urgent {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ad-card .type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: none;
}

.ad-card .type-sale {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.ad-card .type-wanted {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.ad-card .type-free {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.ad-card .type-exchange {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.ad-card .info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ad-card .price {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-bottom: 1px;
}

.ad-card .price .currency {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.ad-card .price.free {
    font-size: 13px;
    font-weight: 700;
    color: #8b5cf6;
}

.ad-card .title {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
    margin-top: 1px;
}

.ad-card .meta {
    display: flex;
    justify-content: flex-end;
    font-size: 10px;
    color: #9ca3af;
    padding-top: 4px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
}

/* ============================================================
   ВЫДЕЛЕНИЕ ПРЕМИУМ
   ============================================================ */
.ad-highlight {
    border: 3px solid #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
    transform: translateY(-2px);
    transition: all 0.3s ease;
    background: #fffbeb;
}

.ad-highlight:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.35);
}

.ad-highlight .price {
    color: #d97706;
}

.ad-highlight .title {
    color: #0407a9;
}

.ad-highlight .subscription-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 16px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #f0f1ff;
    border-color: #0407a9;
}

.pagination a.active {
    background: #0407a9;
    color: white;
    border-color: #0407a9;
}

/* ============================================================
   ПУСТОЙ СОСТОЯНИЕ
   ============================================================ */
.empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
}

.empty i {
    font-size: 60px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty p {
    font-size: 18px;
    color: #4b5563;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    background: #0407a9;
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: #03068a;
    transform: scale(1.02);
}

.btn-purple {
    background: #7c3aed;
}

.btn-purple:hover {
    background: #6d28d9;
}

/* ============================================================
   СЛАЙДЕР
   ============================================================ */
.slides-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 20px;
    background: #1f2937;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 3px solid #f59e0b;
}

.slides-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2937;
    height: 400px;
    min-height: 300px;
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.slide-item .slide-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    transform: scale(1.1);
    z-index: 0;
}

.slide-item .slide-image {
    position: relative;
    z-index: 1;
    max-width: 75%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.slide-item .slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 20px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
}

.slide-item .slide-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.slide-item .slide-content p {
    font-size: 15px;
    opacity: 0.95;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.slide-prev,
.slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-prev:hover,
.slide-next:hover {
    background: rgba(255,255,255,0.15);
    border-color: #f59e0b;
}

.slide-prev {
    left: 16px;
}

.slide-next {
    right: 16px;
}

.slide-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.slide-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.slide-dots .dot.active {
    background: #f59e0b;
    width: 28px;
    border-radius: 6px;
}

/* ============================================================
   ТИКЕР ТОП
   ============================================================ */
.ticker {
    overflow: hidden;
    background: white;
    border-radius: 12px;
    padding: 10px 0;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.ticker-track {
    display: flex;
    animation: ticker-scroll 25s linear infinite;
    gap: 30px;
    white-space: nowrap;
}

.ticker-item {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    flex-shrink: 0;
}

.ticker-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1200px) {
    .ad-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

@media (max-width: 992px) {
    .ad-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .slide-item { height: 360px; }
    .slide-item .slide-image { max-width: 70%; max-height: 75%; }
    .slide-item .slide-content h3 { font-size: 20px; }
}

@media (max-width: 768px) {
    .ad-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 4px 0; }
    .ad-card { border-radius: 14px; }
    .ad-card .image-wrapper { border-radius: 0; }
    .ad-card .image-wrapper img { border-radius: 0; }
    .ad-card .info { padding: 6px 8px 8px; }
    .ad-card .price { font-size: 14px; }
    .ad-card .title { font-size: 11px; min-height: 24px; }
    .ad-card .badge { font-size: 7px; padding: 1px 6px; }
    .ad-card .type-badge { font-size: 7px; padding: 2px 8px; top: 4px; right: 4px; }
    .ad-highlight { border-width: 2px; }
    .ad-highlight .subscription-badge { font-size: 7px; padding: 2px 8px; bottom: 4px; left: 4px; }
    .slide-item { height: 300px; min-height: 220px; }
    .slide-item .slide-image { max-width: 80%; max-height: 70%; }
    .slide-item .slide-content { padding: 14px 18px; }
    .slide-item .slide-content h3 { font-size: 17px; }
    .slide-item .slide-content p { font-size: 13px; }
    .slides-carousel { border-width: 2px; border-radius: 14px; }
    .slide-prev, .slide-next { width: 36px; height: 36px; font-size: 14px; }
    .slide-prev { left: 8px; }
    .slide-next { right: 8px; }
    .news-section { padding: 16px 18px; }
    .news-item { padding: 10px 14px; }
    .news-item .title { font-size: 13px; }
    .news-item .text { font-size: 12px; }
    .categories .sub-list { position: fixed; left: 10px; right: 10px; min-width: auto; }
    .search-wrapper input { font-size: 14px; padding: 10px 14px; }
    .search-wrapper button { font-size: 13px; padding: 10px 20px; }
}

@media (max-width: 480px) {
    .ad-grid { gap: 4px; padding: 2px 0; }
    .ad-card { border-radius: 12px; }
    .ad-card .image-wrapper { border-radius: 0; }
    .ad-card .image-wrapper img { border-radius: 0; }
    .ad-card .info { padding: 4px 6px 6px; }
    .ad-card .price { font-size: 12px; }
    .ad-card .title { font-size: 10px; min-height: 20px; -webkit-line-clamp: 1; }
    .ad-card .meta { font-size: 8px; padding-top: 2px; margin-top: 2px; }
    .ad-card .badge { font-size: 6px; padding: 1px 5px; }
    .ad-card .type-badge { font-size: 6px; padding: 1px 6px; top: 3px; right: 3px; }
    .ad-highlight { border-width: 2px; }
    .ad-highlight .subscription-badge { font-size: 6px; padding: 1px 6px; bottom: 3px; left: 3px; }
    .slide-item { height: 200px; min-height: 150px; }
    .slide-item .slide-image { max-width: 85%; max-height: 60%; border-radius: 8px; }
    .slide-item .slide-content { padding: 10px 14px; }
    .slide-item .slide-content h3 { font-size: 14px; margin-bottom: 3px; }
    .slide-item .slide-content p { font-size: 11px; display: none; }
    .slide-prev, .slide-next { width: 28px; height: 28px; font-size: 11px; }
    .slides-carousel { border-width: 2px; border-radius: 10px; margin-bottom: 12px; }
    .slide-dots .dot { width: 6px; height: 6px; gap: 6px; }
    .slide-dots .dot.active { width: 16px; }
    .news-section { padding: 10px 12px; }
    .news-item { padding: 8px 10px; gap: 10px; }
    .news-item .icon-box { width: 28px; height: 28px; font-size: 12px; }
    .news-item .title { font-size: 12px; }
    .news-item .text { font-size: 10px; -webkit-line-clamp: 1; }
    .news-item .link-btn a { font-size: 10px; padding: 2px 10px; }
    .categories .cat-link { font-size: 11px; padding: 5px 12px; }
    .search-wrapper input { font-size: 12px; padding: 8px 12px; min-width: 120px; }
    .search-wrapper button { font-size: 12px; padding: 8px 16px; }
    .header .logo { font-size: 18px; }
    .header .nav a { font-size: 12px; padding: 4px 8px; }
    .header .nav .btn-add { padding: 5px 12px; font-size: 12px; }
    .pagination a { padding: 6px 12px; font-size: 12px; }
    
    /* Футер на маленьких экранах */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .footer-col h4 { font-size: 13px; }
    .footer-col a, .footer-col p { font-size: 12px; }
    .social a { width: 30px; height: 30px; font-size: 14px; }
}

/* ============================================================
   АДАПТИВ ДЛЯ ФУТЕРА (отдельно, чтобы не потерялось)
   ============================================================ */
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .footer { padding: 24px 0 12px; }
}

/* ============================================================
   НОВЫЙ ХЕДЕР — С ЛОГОТИПОМ И ГАМБУРГЕРОМ
   ============================================================ */
.header {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #f0f1ff;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ⭐ ЛОГОТИП ПО ЦЕНТРУ */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 1;
    justify-content: center;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.05);
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #0407a9;
    letter-spacing: -0.5px;
}

.logo-domain {
    font-size: 20px;
    font-weight: 700;
    color: #f59e0b;
    margin-left: -4px;
}

/* ⭐ ГАМБУРГЕР */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 101;
    flex-shrink: 0;
}

.hamburger:hover {
    background: #f0f1ff;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #1f2937;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ⭐ МЕНЮ */
.header .nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header .nav a {
    font-weight: 600;
    font-size: 14px;
    color: #4b5563;
    transition: all 0.2s;
    padding: 8px 14px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header .nav a:hover {
    color: #0407a9;
    background: #f0f1ff;
}

.header .nav a i {
    font-size: 15px;
}

.header .nav .btn-add {
    background: #0407a9;
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
}

.header .nav .btn-add:hover {
    background: #03068a;
    transform: scale(1.02);
    color: #ffffff !important;
}

.header .nav .btn-add i {
    color: #ffffff;
}

/* ⭐ АДАПТИВ — ТЕЛЕФОН */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .logo {
        flex: none;
        justify-content: center;
        width: 100%;
        order: 1;
    }
    
    .logo-text {
        font-size: 22px;
    }
    
    .logo-domain {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 34px;
        height: 34px;
    }
    
    .header .container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .header .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 0 8px;
        border-top: 1px solid #f0f0f0;
        margin-top: 4px;
        order: 3;
    }
    
    .header .nav.open {
        display: flex;
    }
    
    .header .nav a {
        padding: 10px 16px;
        font-size: 15px;
        border-radius: 12px;
        justify-content: center;
    }
    
    .header .nav .btn-add {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .footer {
        padding: 24px 0 12px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 18px;
    }
    
    .logo-domain {
        font-size: 14px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .header .nav a {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .footer-col h4 {
        font-size: 13px;
    }
    .footer-col a,
    .footer-col p {
        font-size: 12px;
    }
    .social a {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* ⭐ ЖЁСТКИЙ ФИКС ДЛЯ ТЕЛЕФОНОВ — НЕТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
* {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    position: relative !important;
}

.container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
    margin: 0 auto !important;
}

.ad-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 6px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.ad-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.ad-card .image-wrapper {
    width: 100% !important;
    padding-bottom: 100% !important;
    overflow: hidden !important;
}

.ad-card .image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Убираем всё, что может торчать */
img, svg, video, iframe {
    max-width: 100% !important;
    height: auto !important;
}

/* Карточки на телефоне — компактно */
@media (max-width: 480px) {
    .ad-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
        padding: 4px 0 !important;
    }
    .ad-card .price {
        font-size: 11px !important;
    }
    .ad-card .title {
        font-size: 10px !important;
        min-height: 16px !important;
        -webkit-line-clamp: 1 !important;
    }
    .ad-card .badge {
        font-size: 6px !important;
        padding: 1px 4px !important;
    }
    .ad-card .type-badge {
        font-size: 6px !important;
        padding: 1px 5px !important;
    }
}