.card:hover .discount-ribbon span {
    transform: rotate(45deg) scale(1.1);
    transition: transform 0.3s ease-in-out;
}
.discount-ribbon {
    width: 80px;
    height: 80px;
    overflow: hidden;
    position: absolute;
    top: -5px;
    right: -5px;
}

.discount-ribbon span {
    position: absolute;
    display: block;
    width: 120px;
    padding: 5px 0;
    background-color: #e53935;
    color: #fff;
    font-weight: bold;
    text-align: center;
    transform: rotate(45deg);
    top: 20px;
    right: -25px;
    box-shadow: 0 3px 10px -5px rgba(0,0,0,0.3);
    font-size: 0.85rem;
    transition: transform 0.3s ease-in-out;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1050;
    border-radius: 0 0 8px 8px;
}
#search-results .search-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #f1f1f1;
    text-decoration: none;
    color: #000;
}
#search-results .search-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}
#search-results .search-item:hover { background: #f8f9fa; }
#search-results .item-info { flex: 1; }
#search-results .item-price { font-weight: 700; color: #dc3545; }
#search-results .item-shop { font-size: 12px; color: #6c757d; margin-top: 2px; }
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card-img-top {
    object-fit: cover;
    height: 180px;
}

.discount-ribbon {
    width: 80px;
    height: 80px;
    overflow: hidden;
    position: absolute;
    top: -5px;
    right: -5px;
}

.discount-ribbon span {
    position: absolute;
    display: block;
    width: 120px;
    padding: 5px 0;
    background-color: #e53935; /* более яркий красный */
    color: #fff;
    font-weight: bold;
    text-align: center;
    transform: rotate(45deg);
    top: 20px;
    right: -25px;
    box-shadow: 0 3px 10px -5px rgba(0,0,0,0.3);
    font-size: 0.85rem;
}

.card-body p {
    margin-bottom: 0.5rem;
}
.card-body .btn {
    transition: transform 0.2s, background-color 0.2s;
}

.card-body .btn:hover {
    transform: scale(1.05);
    background-color: #0056b3; /* темно-синий вместо стандартного Bootstrap синего */
}
/* Анимация поиска */
.search-input {
    transition: width 0.3s ease-in-out;
    width: 150px;
}

@media (max-width: 767px) {
    .search-input {
        width: 100px;
    }
    .navbar-collapse.show .search-input {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Плавное раскрытие дропдауна пользователя */
.navbar-nav .dropdown-menu {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: top right;
}

/* Стили кнопки бургер остаются стандартными Bootstrap */
.navbar-nav .nav-link .badge {
    font-size: 0.65rem;
}
