/* --- Product Categories Grid --- */
.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}
@media (max-width: 1240px) {
    .product-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 610px) {
    .product-categories-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
.category-block-link {
    text-decoration: none;
    color: inherit;
}
.category-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    height: 100%;
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden;
    transition: .3s;
    z-index: 1;
}
.category-block:hover {
    background-color: #c1daff;
}
.category-top {
    flex: 0 0 auto;
}
.category-name {
    font-size: 18px;
    font-weight: bold;
}
.category-count {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}
.category-image {
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 20px;
}
.category-image img {
    border-radius: 6px;
}
.category-search-box {
    position: relative;
}
#category-search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    margin-bottom: 0;
    box-sizing: border-box;
    border-radius: 6px;
}
.category-search-loading {
    display: none;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 11px;
    right: 13px;
}
#search-suggestions {
    padding: 20px 10px;
    margin-top: -5px;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
}
.suggestions-result-box:not(:last-child) {
    margin-bottom: 15px;
}
.suggestions-result-item {
    padding: 5px 0;
}
@keyframes rotate-counterclockwise {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}
.rotate-image {
    animation: rotate-counterclockwise 1.3s linear infinite;
}
.btn-return-catalog {
    padding: 5px 15px;
    background: rgb(1 123 255);
    color: #fff;
    display: inline-block;
    border-radius: 6px;
    margin: 20px 0;
    transition: .3s;
}
.btn-return-catalog:hover {
    opacity: .7;
}

/* --- Поиск на странице магазина --- */
.category-search-box--shop {
    width: 100%;
    margin-bottom: 20px;
}

/* --- Кнопка очистки поиска --- */
.category-search-clear {
    position: absolute;
    top: 12px;
    right: 12px;
    transform: none;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    transition: .2s;
    user-select: none;
    z-index: 2;
}
.category-search-clear:hover {
    color: #333;
    background: #eee;
}
