@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories {
        grid-template-columns: repeat(4, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    :root {
        --header-height: 64px;
    }

    body {
        padding-bottom: 70px;
    }

    .sidebar {
        display: none;
    }

    .page {
        margin-left: 0;
    }

    .topbar {
        padding: 0 14px;
        gap: 8px;
    }

    .mobile-logo {
        margin-right: auto;
        font-size: 22px;
        font-weight: 900;
        display: block;
    }

    .mobile-logo span {
        color: var(--red);
    }

    .topbar-search,
    .topbar-wallet {
        display: none;
    }

    .topbar-actions {
        margin-left: 0;
    }

    .topbar-button,
    .topbar-avatar {
        width: 40px;
        height: 40px;
    }

    .home {
        width: calc(100% - 24px);
        padding-top: 14px;
    }

    .mobile-search {
        margin-bottom: 14px;
        display: block;
    }

    .mobile-search form {
        border: 1px solid var(--line);
        border-radius: 13px;
        background: var(--surface);
        overflow: hidden;
        display: flex;
    }

    .mobile-search input {
        height: 48px;
        min-width: 0;
        padding: 0 15px;
        border: 0;
        outline: none;
        flex: 1;
    }

    .mobile-search button {
        width: 52px;
        border: 0;
        background: var(--black);
        color: #ffffff;
    }

    .hero {
        min-height: 275px;
        padding: 30px 25px;
    }

    .hero-search {
        display: none;
    }

    .home-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bottom-menu {
        height: 68px;
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, .98);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 150;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }

    .bottom-item {
        color: #777777;
        font-size: 10px;
        font-weight: 700;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }

    .bottom-icon {
        font-size: 20px;
    }

    .bottom-item.active {
        color: var(--black);
    }

    .bottom-item.publish {
        color: var(--red);
    }
}

@media (max-width: 650px) {
    .home {
        width: calc(100% - 20px);
    }

    .hero {
        min-height: 250px;
        padding: 25px 20px;
        border-radius: 18px;
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 14px;
    }

    .hero::before {
        width: 270px;
        height: 270px;
        border-width: 50px;
        right: -130px;
    }

    .home-actions {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        scrollbar-width: none;
    }

    .home-actions::-webkit-scrollbar {
        display: none;
    }

    .home-action {
        min-width: 215px;
    }

    .categories {
        display: flex;
        overflow-x: auto;
        gap: 9px;
        scrollbar-width: none;
    }

    .categories::-webkit-scrollbar {
        display: none;
    }

    .category-card {
        min-width: 108px;
    }

    .product-grid {
        display: flex;
        overflow-x: auto;
        gap: 11px;
        scrollbar-width: none;
    }

    .product-grid::-webkit-scrollbar {
        display: none;
    }

    .product-card {
        min-width: 215px;
        max-width: 215px;
    }

    .product-image {
        height: 165px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .referral {
        padding: 25px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .referral h2 {
        font-size: 23px;
    }

    .footer {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .footer-copy {
        grid-column: auto;
    }
}