/* Общие стили */
body {
    margin: 0;
    font-family: Inter, sans-serif;
    background: #f2f5fa;
    color: #2c3e50;
}


.navbar {
background: #0d6efd;
}
.navbar-nav  .nav-link  {
color: #fff;
}


.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
text-decoration: revert;
color: #fff;}

/* HEADER */
.header {
    background: linear-gradient(90deg, #2c6edb, #3b82f6);
    color: white;
    padding: 18px 0;
    
    
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 26px;
    font-weight: 700;
}

.logo span {
    color: #ffd54a;
}

.menu a {
    color: white;
    margin-left: 25px;
    text-decoration: none;
    font-weight: 500;
}

.auth a {
    margin-left: 15px;
    color: white;
    text-decoration: none;
}

/* HERO (временный, будет заменён на новый с человечком) */
.hero {
    background: linear-gradient(180deg, #3b82f6, #2c6edb);
    color: white;
    padding: 70px 0 90px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.hero p {
    opacity: 0.9;
}

.search {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.search input {
    width: 500px;
    padding: 18px;
    border-radius: 8px 0 0 8px;
    border: none;
    font-size: 16px;
}

.search button {
    background: #ff7a00;
    border: none;
    color: white;
    padding: 18px 40px;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    cursor: pointer;
}

.hero-links {
    margin-top: 20px;
    display: flex;
    gap: 25px;
    justify-content: center;
    font-size: 14px;
}

/* MAIN GRID */
.main {
    margin-top: 0;
}

.grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 25px;
}

/* BLOCK */
.block {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.block h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* REVIEWS (на главной) */
.review {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.review:last-child {
    border: none;
}

/* SIDEBAR */
.sidebar .block {
    padding: 20px;
}

.article {
    display: flex;
    margin-bottom: 15px;
}

.article img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    margin-right: 10px;
    background: #ddd;
}

/* CATEGORIES */
.categories {
    margin-top: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* CTA */
.cta {
    margin-top: 37px;
    padding: 143px 0;
    color: white;
    position: relative;
    background-image: url(/images/rew_bg.webp);
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    isolation: isolate;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta button {
    margin-top: 20px;
    background: #ff7a00;
    border: none;
    padding: 18px 40px;
    color: white;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

/* FOOTER */
footer {
    padding: 30px;
    text-align: center;
    background: white;
    margin-top: 40px;
}

/* ========== Стили для карточек магазинов (главная и список) ========== */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.store-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    border: 1px solid #E4E8F0;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.store-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.store-card h3 a {
    color: #2C3E50;
    text-decoration: none;
}

.store-card h3 a:hover {
    color: #2E6FD8;
}

.store-card .stars {
    color: #FFA726;
    font-size: 16px;
    margin: 10px 0 6px;
}

.store-card .stars i {
    margin: 0 1px;
}

.store-card .reviews-count {
    font-size: 14px;
    color: #6B7A90;
    margin: 0;
}

.store-card .description {
    font-size: 0.9rem;
    color: #777;
}

.store-card .details-link {
    display: inline-block;
    margin-top: 10px;
    color: #2c6edb;
}

.link-more {
    display: inline-block;
    margin-top: 20px;
    color: #2E6FD8;
    text-decoration: none;
    font-weight: 500;
}

.link-more:hover {
    text-decoration: underline;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-left: 0;
    list-style: none;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    color: #2c3e50;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #f0f7ff;
    border-color: #2c6edb;
    color: #2c6edb;
    z-index: 2;
}

.pagination .page-item.active .page-link {
    background: #2c6edb;
    border-color: #2c6edb;
    color: white;
    font-weight: 600;
    cursor: default;
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #dee2e6;
    pointer-events: none;
}

/* Стили для поиска на странице магазинов */
.search-form {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.search-form form {
    display: flex;
    width: 100%;
    max-width: 600px;
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
}

.search-form button {
    padding: 12px 30px;
    background: #ff7a00;
    border: none;
    color: white;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    cursor: pointer;
}

/* Выпадающее меню в шапке */
.auth {
    position: relative;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: white;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 5px 10px;
    text-decoration: none;
}

.dropdown-toggle:hover {
    text-decoration: underline;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    padding: 8px 0;
    margin-top: 5px;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 8px 20px;
    clear: both;
    font-weight: 400;
    color: #2c3e50;
    text-align: left;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background-color: #f8f9fa;
}

.dropdown-divider {
    height: 0;
    margin: 8px 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

/* Адаптивность для карточек */
@media (max-width: 992px) {
    .stores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stores-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== СВЕЖИЕ ОТЗЫВЫ ===== */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 25px 0;
}

.review-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.02);
    border: 1px solid #E4E8F0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.05);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.review-store a {
    font-weight: 600;
    color: #2C3E50;
    text-decoration: none;
}

.review-store a:hover {
    color: #2E6FD8;
}

.review-date {
    font-size: 12px;
    color: #8A99B4;
}

.review-content p {
    font-size: 14px;
    color: #2C3E50;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #E4E8F0;
    padding-top: 12px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-author span {
    font-size: 13px;
    font-weight: 500;
    color: #2C3E50;
}

.review-rating {
    color: #FFA726;
    font-size: 13px;
    display: flex;
    gap: 2px;
}

.review-rating i {
    margin: 0;
}

/* Если нужна сетка для нескольких отзывов в строку (например, на десктопе) */
@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Стили для карточек магазинов на странице каталога */
.store-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.store-logo-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.hover-shadow {
    transition: box-shadow 0.2s ease-in-out;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.store-card .stretched-link {
    position: relative;
}

/* Адаптация для мобильных устройств */
@media (max-width: 576px) {
    .store-logo,
    .store-logo-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .store-card .card-title {
        font-size: 1rem;
    }
}


/* ===== УЛУЧШЕНИЯ ДЛЯ МОБИЛЬНОГО МЕНЮ ===== */
@media (max-width: 768px) {
    /* Раскрытое меню – белый фон, тень */
    .navbar-collapse {
        background: white;
        border-radius: 16px;
        margin-top: 12px;
        padding: 16px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

    /* Пункты меню – тёмный цвет, удобные отступы */
    .navbar-custom .navbar-nav .nav-link {
        color: #2c3e50 !important;
        padding: 14px 16px !important;
        border-radius: 12px;
        font-size: 1.1rem;
        transition: background 0.2s;
    }

    .navbar-custom .navbar-nav .nav-link:hover,
    .navbar-custom .navbar-nav .nav-link:active {
        background: #f0f7ff;
        color: #2c6edb !important;
    }

    .navbar-custom .navbar-nav .nav-link.active {
        background: #e8f0fe;
        color: #2c6edb !important;
        font-weight: 600;
        border-bottom: none;
    }

    /* Кнопки входа/регистрации на мобильных – на всю ширину */
    .navbar-custom .btn-outline-light,
    .navbar-custom .btn-light {
        width: 100%;
        margin: 6px 0 !important;
        padding: 12px !important;
        text-align: center;
        font-size: 1.1rem;
    }

    /* Переопределяем цвета кнопок на мобильных, чтобы они сочетались с белым фоном */
    .navbar-custom .btn-outline-light {
        border: 2px solid #2c6edb;
        color: #2c6edb;
        background: transparent;
    }
    .navbar-custom .btn-outline-light:hover {
        background: #2c6edb;
        color: white;
    }

    .navbar-custom .btn-light {
        background: #2c6edb;
        border: 2px solid #2c6edb;
        color: white;
    }
    .navbar-custom .btn-light:hover {
        background: #1e4a9e;
        border-color: #1e4a9e;
    }

    /* Выпадающее меню пользователя на мобильных */
    .navbar-custom .dropdown-menu {
        background: #f8f9fa;
        border: none;
        box-shadow: none;
        padding: 8px;
        margin-top: 8px;
    }

    .navbar-custom .dropdown-item {
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .navbar-custom .dropdown-item i {
        width: 24px;
        color: #2c6edb;
    }

    /* Отключаем стандартный треугольник у дропдауна, если мешает */
    .navbar-custom .dropdown-toggle::after {
        display: none;
    }

    /* Аватарка и имя в шапке на мобильных */
    .navbar-custom .nav-link.dropdown-toggle {
        display: flex;
        align-items: center;
        background: #f0f7ff;
        margin-bottom: 8px;
    }

    .navbar-custom .nav-link.dropdown-toggle span {
        color: #2c3e50 !important;
    }
}

/* Для совсем маленьких экранов (до 480px) можем чуть уменьшить отступы */
@media (max-width: 480px) {
    .navbar-collapse {
        padding: 12px;
    }
    .navbar-custom .navbar-nav .nav-link {
        padding: 12px !important;
    }
}

.h2, h2 {
        font-size: 1.5rem;
    }


  /* Стили для категорий */
    .categories-section {
        margin-top: 40px;
    }
    .category-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-top: 20px;
    }
    .category-card {
        background: white;
        padding: 25px 15px;
        border-radius: 16px;
        text-align: center;
        box-shadow: 0 6px 15px rgba(0,0,0,0.05);
        transition: transform 0.2s, box-shadow 0.2s;
        text-decoration: none;
        color: #2c3e50;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        border: 1px solid #eef2f6;
    }
    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0,0,0,0.1);
        border-color: #2c6edb;
        color: #2c6edb;
    }
    .category-icon {
        font-size: 2.5rem;
        line-height: 1;
    }
    .category-name {
        font-weight: 600;
        font-size: 1.1rem;
    }
    .category-count {
        font-size: 0.85rem;
        color: #6c7a8d;
        background: #f0f7ff;
        padding: 4px 12px;
        border-radius: 30px;
        font-weight: 500;
    }

    /* Стили для свежих отзывов */
    .reviews-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 20px 0;
    }
    .review-card {
        background: white;
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 6px 15px rgba(0,0,0,0.05);
        border: 1px solid #eef2f6;
        transition: all 0.2s;
    }
    .review-card:hover {
        box-shadow: 0 12px 25px rgba(0,0,0,0.1);
        border-color: #2c6edb;
    }
    .review-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .review-store a {
        font-weight: 600;
        color: #2c3e50;
        text-decoration: none;
    }
    .review-store a:hover {
        color: #2c6edb;
    }
    .review-date {
        font-size: 0.8rem;
        color: #8a99b4;
    }
    .review-content p {
        font-size: 0.95rem;
        color: #2c3e50;
        line-height: 1.5;
        margin: 0 0 15px 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .review-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        border-top: 1px solid #eef2f6;
        padding-top: 15px;
    }
    .review-author {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .avatar-small {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        object-fit: cover;
    }
    .review-author span {
        font-size: 0.9rem;
        font-weight: 500;
        color: #2c3e50;
    }
    .review-rating {
        color: #ffc107;
        font-size: 0.9rem;
        display: flex;
        gap: 2px;
    }

    /* Стили для статей в сайдбаре */
    .sidebar .article {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eef2f6;
    }
    .sidebar .article:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .sidebar .article img,
    .sidebar .article .article-image-placeholder {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
        background: #f0f7ff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: #2c6edb;
    }
    .sidebar .article-content {
        flex: 1;
    }
    .sidebar .article-content p {
        margin-bottom: 8px;
        font-size: 0.95rem;
        color: #2c3e50;
        font-weight: 500;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .sidebar .article-link {
        color: #2c6edb;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        transition: color 0.2s;
    }
    .sidebar .article-link:hover {
        color: #1a4f9e;
        text-decoration: underline;
    }

    /* Адаптивность */
    @media (max-width: 992px) {
        .category-grid {
            grid-template-columns: repeat(3, 1fr);
        }
        .reviews-grid {
            grid-template-columns: 1fr;
        }
    }
    @media (max-width: 768px) {
        .category-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        .grid {
            grid-template-columns: 1fr;
        }
        .sidebar {
            margin-top: 30px;
        }
    }
    @media (max-width: 480px) {
        .category-grid {
            grid-template-columns: 1fr;
        }
        .hero-actions {
            flex-direction: column;
            width: 100%;
        }
        .hero-actions .btn {
            width: 100%;
        }
    }
    
    .quick-search-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eef2f6;
    z-index: 1050;
}

.quick-search-results .list-group-item {
    border-left: none;
    border-right: none;
    transition: background 0.2s;
}

.quick-search-results .list-group-item:first-child {
    border-top: none;
}

.quick-search-results .list-group-item:hover {
    background-color: #f8f9fa;
}