/* Улучшенные стили для летающей корзины */

.flyin-cart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

.flyin-cart-open {
    display: block !important;
}

.flyin-cart-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90%;
    background: #fff;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.flyin-cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flyin-cart-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.flyin-cart-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.flyin-cart-close:hover {
    color: #000;
}

.flyin-cart-products {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.flyin-cart-product {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.flyin-cart-product:last-child {
    border-bottom: none;
}

.flyin-cart-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.flyin-cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.flyin-cart-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.flyin-cart-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

.flyin-cart-product-name a {
    color: #333;
    text-decoration: none;
}

.flyin-cart-product-name a:hover {
    color: #0073aa;
}

.flyin-cart-product-quantity {
    font-size: 14px;
    color: #666;
}

.flyin-cart-product-quantity .quantity {
    display: block;
}

button.remove-cart-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f5f5f5;
    border: none;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

button.remove-cart-item:hover {
    background: #ff4444;
    color: #fff;
}

button.remove-cart-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.flyin-cart-footer {
    padding: 20px;
    border-top: 2px solid #eee;
    background: #fff;
    position: sticky;
    bottom: 0;
}

.flyin-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.flyin-cart-buttons {
    display: flex;
    gap: 10px;
}

.flyin-cart-buttons a.button {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.2s;
}

.flyin-cart-buttons a.button:hover {
    background: #005a87;
}

.flyin-cart-empty {
    padding: 40px 20px;
    text-align: center;
}

.flyin-cart-empty p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Иконка корзины */
.flyin-cart-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #0073aa;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 9998;
}

.flyin-cart-icon:hover {
    background: #005a87;
    transform: scale(1.05);
}

.flyin-cart-icon i {
    font-size: 24px;
}

.flyin-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.flyin-cart-total {
    position: absolute;
    bottom: -25px;
    right: 0;
    background: #fff;
    color: #333;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Мобильная адаптация */
@media screen and (max-width: 768px) {
    .flyin-cart-content {
        width: 100%;
        max-width: 100%;
    }
    
    .flyin-cart-product-image {
        width: 60px;
        height: 60px;
    }
    
    .flyin-cart-product-name {
        font-size: 14px;
    }
    
    .flyin-cart-icon {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
    
    .flyin-cart-icon i {
        font-size: 20px;
    }
}

