/* Mobile overrides */
@media (max-width: 768px) {

    /* Header */
    .header { padding: 8px 0 !important; }

    .header .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 12px !important;
    }

    .logo {
        font-family: 'Exo 2', sans-serif !important;
        font-weight: 700 !important;
        font-size: 24px !important;
        font-style: italic !important;
        color: #e6edf3 !important;
    }

    .logo .accent {
        color: #225189 !important;
    }

    .header-right {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .btn-tg {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        background: #0088cc !important;
        border-radius: 6px !important;
    }

    .btn-tg svg {
        width: 18px !important;
        height: 18px !important;
        fill: white !important;
    }

    .btn-cerberus {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 6px !important;
        overflow: hidden !important;
    }

    .btn-cerberus img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .burger-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 4px !important;
        width: 32px !important;
        height: 32px !important;
        background: #21262d !important;
        border: none !important;
        border-radius: 6px !important;
        padding: 7px !important;
    }

    .burger-btn span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: #e6edf3 !important;
    }

    .filters { display: none !important; }

    .mobile-results-count {
        display: none !important;
        text-align: center !important;
        padding: 6px !important;
        font-size: 12px !important;
        color: #8b949e !important;
    }

    /* Shop grid 2 columns */
    .shops-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 !important;
    }

    /* Shop card - logo above name (default) */
    .shop-card {
        all: unset !important;
        display: block !important;
        padding: 8px !important;
        background: #1c2128 !important;
        border-radius: 8px !important;
        text-align: center !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
    }

    /* Logo square */
    .shop-card .shop-logo {
        all: unset !important;
        display: block !important;
        width: calc(100% - 16px) !important;
        margin: 0 auto 6px auto !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        background: #21262d !important;
        box-sizing: border-box !important;
    }

    .shop-card .shop-logo img,
    .shop-card .shop-logo video {
        all: unset !important;
        display: block !important;
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }

    /* Shop info */
    .shop-card .shop-info {
        all: unset !important;
        display: block !important;
        text-align: center !important;
    }

    .shop-card .shop-name {
        all: unset !important;
        display: block !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        margin: 4px 0 !important;
        color: #e6edf3 !important;
    }

    .shop-card .shop-flags {
        display: flex !important;
        justify-content: center !important;
        gap: 2px !important;
        margin: 4px 0 !important;
    }

    .shop-card .country-flag {
        width: auto !important;
        height: 12px !important;
    }

    .shop-card .shop-rating,
    .shop-card .shop-stats-row {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        gap: 6px !important;
        font-size: 10px !important;
        color: #8b949e !important;
    }

    .main { padding: 20px 0 8px 0 !important; }
    .main .container { padding: 0 8px !important; }
    .footer { display: none !important; }

    /* Shop detail page - name above logo */
    .shop-profile {
        display: flex !important;
        flex-direction: column !important;
        padding: 16px !important;
        gap: 16px !important;
    }

    .shop-profile .shop-logo-column {
        display: contents !important;
    }

    .shop-profile .shop-details {
        display: contents !important;
    }

    .shop-profile .shop-details h1 {
        order: -3 !important;
        font-size: 1.4rem !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .shop-profile .shop-logo-large {
        order: -2 !important;
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    .shop-profile .btn-telegram {
        order: -1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 12px 20px !important;
        background: #21262d !important;
        color: white !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    .shop-profile .rating-large {
        order: -1 !important;
        justify-content: center !important;
        margin: 8px 0 !important;
    }

    .shop-profile .shop-description {
        order: 2 !important;
        text-align: center !important;
    }
}

/* Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}
.sidebar-overlay.open { display: block; }

.sidebar {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100%;
    background: #161b22;
    z-index: 1000;
    transition: right 0.25s;
    overflow-y: auto;
}
.sidebar.open { right: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid #30363d;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: #e6edf3;
    font-size: 24px;
    cursor: pointer;
}

.sidebar-content { padding: 14px; }
.sidebar-content .filter-group { margin-bottom: 14px; }
.sidebar-content label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    color: #8b949e;
}
.sidebar-content select,
.sidebar-content input {
    width: 100%;
    padding: 10px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    font-size: 14px;
}
.sidebar-content button {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: #225189;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
}

/* Mobile shop count in sidebar */
.mobile-shop-count {
    text-align: center;
    padding: 12px;
    margin-top: 15px;
    background: #21262d;
    border-radius: 8px;
    color: #e6edf3;
    font-weight: 600;
    font-size: 14px;
}

/* Sidebar filter groups */
.sidebar-filters .filter-group {
    margin-bottom: 12px;
}

.sidebar-filters .filter-group select,
.sidebar-filters .filter-group input {
    width: 100%;
    padding: 12px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #e6edf3;
    font-size: 14px;
}

.sidebar-filters .reset-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

/* Sidebar actions row */
.sidebar-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    align-items: center;
}

.sidebar-actions .reset-btn {
    height: 44px;
    line-height: 20px;
    box-sizing: border-box;
    flex: 1;
    margin: 0;
    padding: 12px;
    text-align: center;
    background: #21262d !important;
    border-radius: 8px;
    color: #e6edf3 !important;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Exo 2', sans-serif;
    border: none;
    cursor: pointer;
}
.sidebar-actions .mobile-shop-count {
    height: 44px;
    line-height: 20px;
    box-sizing: border-box;
    flex: 1;
    margin: 0;
    padding: 12px;
    text-align: center;
    background: #21262d;
    border-radius: 8px;
    color: #e6edf3;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Exo 2', sans-serif;
}

/* Sidebar header EXO font */
.sidebar-header span {
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
}

/* Back link mobile spacing */
@media (max-width: 768px) {
    .back-link {
        margin-top: 0;
        margin-bottom: 20px;
    }
}
