/* Основные стили плавающей корзины */
.ark-pro-floating-cart {
    position: fixed;
    z-index: 9998;
}

.floating-cart-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    position: relative;
}

.floating-cart-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.floating-cart-icon svg {
    width: 24px;
    height: 24px;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Попап корзины */
.cart-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.cart-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-popup-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-popup-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.cart-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #95a5a6;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-popup-close:hover {
    color: #e74c3c;
}

.cart-popup-content {
    max-height: 60vh;
    overflow-y: auto;
}

/* Список товаров в попапе */
.cart-popup-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    gap: 15px;
}

.cart-popup-item:hover {
    background: #f9f9f9;
}

.item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #95a5a6;
    font-size: 12px;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.cart-popup-item .item-title {
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-popup-item .item-title:hover {
    color: #3498db;
}

.item-price {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-subtotal {
    font-weight: 600;
    color: #e74c3c;
    font-size: 16px;
}

.item-quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.item-quantity-control button {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-quantity-control button:hover {
    background: #f0f0f0;
}

.item-quantity-control input {
    width: 40px;
    height: 24px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-remove:hover {
    background: #c0392b;
}

/* Подвал корзины */
.cart-popup-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.total-amount {
    color: #e74c3c;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-actions .button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.clear-cart-btn {
    background: #95a5a6;
    color: white;
    font-size: 14px;
}

.clear-cart-btn:hover {
    background: #7f8c8d;
}

.checkout-btn {
    background: #2ecc71;
    color: white;
    font-size: 14px;
}

.checkout-btn:hover {
    background: #27ae60;
}

/* Пустая корзина */
.cart-empty-message {
    text-align: center;
    padding: 40px 20px;
}

.cart-empty-message p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.view-catalog {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.view-catalog:hover {
    background: #2980b9;
    color: white;
}

/* Попап оформления заказа */
.checkout-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.checkout-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.checkout-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #333;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.checkout-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-content h3 {
    margin-top: 0;
    color: #fff;
    border-bottom: 2px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.order-items {
    margin: 15px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.order-item-name {
    flex: 5;
}

.order-item-qty,
.order-item-price {
    flex: 1;
    text-align: right;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    text-align: right;
    font-size: 18px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

/* Уведомления */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
}

.cart-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.cart-notification.error {
    background: #e74c3c;
}

/* Адаптивность */
@media (max-width: 768px) {
    .ark-pro-floating-cart {
        bottom: 20px !important;
        right: 20px !important;
    }

    .floating-cart-icon {
        width: 50px;
        height: 50px;
    }

    .cart-popup {
        width: 350px;
        right: -10px;
    }

    .cart-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ark-pro-floating-cart {
        bottom: 15px !important;
        right: 15px !important;
    }

    .floating-cart-icon {
        width: 45px;
        height: 45px;
    }

    .cart-popup {
        width: 300px;
        right: -20px;
    }

    .cart-popup-item {
        padding: 12px;
        flex-wrap: wrap;
    }

    .item-image {
        width: 50px;
        height: 50px;
    }
}