/* common/header/css/cart-button.css */

/* Кнопка корзины для десктопа */
.header-cart {
    margin-left: var(--spacing-md);
    display: flex;
    align-items: center;
}

.cart-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-button);
}

.cart-button:hover {
    background: var(--color-yellow);
    color: var(--color-black);
}

.cart-button:active {
    transform: scale(0.95);
}

.cart-button svg {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-yellow);
    color: var(--color-black);
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none; /* Скрыт по умолчанию */
    border: 2px solid var(--color-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Кнопка корзины для мобильного */
.mobile-cart {
    position: relative;
    margin-right: var(--spacing-md);
    padding: var(--spacing-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-button);
    transition: background var(--transition-base);
}

.mobile-cart:hover {
    background: var(--color-grey-light);
}

.mobile-cart svg {
    width: 20px;
    height: 20px;
    color: var(--color-black);
}

/* Скрываем/показываем нужные кнопки */
@media (max-width: 991px) {
    .header-cart {
        display: none;
    }
    
    .mobile-cart {
        display: flex;
    }
}

@media (min-width: 992px) {
    .mobile-cart {
        display: none;
    }
    
    .header-cart {
        display: flex;
    }
}

/* Для scrolled состояния header */
.fixed-header.scrolled .cart-button,
.fixed-header.scrolled .mobile-cart {
    color: var(--color-black);
}

.fixed-header.scrolled .cart-button:hover,
.fixed-header.scrolled .mobile-cart:hover {
    background: var(--color-yellow);
}