/* 1. БАЗОВЫЙ КОНТЕЙНЕР */
.mycart-wrapper {
    position: relative;
    font-family: Arial, sans-serif;
}

/* 2. ВЫПЛЫВАЮЩАЯ ПАНЕЛЬ */
.mycart-panel {
    position: fixed;
    right: 0;
    top: 80px; 
    width: 450px;
    height: auto; 
    max-height: 85vh; 
    background: #ffffff !important;
    border: 1px solid #ccc !important;
    z-index: 999999;
    box-shadow: -5px 5px 20px rgba(0,0,0,0.3);
    border-radius: 8px 0 0 8px;
    display: flex; 
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mycart-wrapper.is-open .mycart-panel {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

/* 3. ШАПКА КОРЗИНЫ */
.mycart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f4f4f4 !important;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 0 0 0;
}

.mycart-title { color: #000 !important; font-weight: bold; text-transform: uppercase; margin: 0; }
.mycart-hide-btn { background: #fff; border: 1px solid #999; color: #333 !important; cursor: pointer; padding: 5px 10px; border-radius: 4px; }

/* 4. КНОПКА ОТКРЫТИЯ (АДАПТИВНАЯ) */
.mycart-opener-btn {
    min-width: 250px; /* Ширина для ПК */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
}

/* ИКОНКА-ЭМОДЗИ */
.mycart-opener-btn .mycart-icon {
    font-size: 32px !important; 
    line-height: 1 !important;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

/* Текст и Сумма (Белый по умолчанию) */
.mycart-opener-btn span,
.mycart-opener-btn b {
    color: #ffffff !important; 
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s ease;
}

/* ИНВЕРСИЯ ПРИ НАВЕДЕНИИ */
.mycart-opener-btn:hover span {
    color: #b11b21 !important;
}

.mycart-opener-btn:hover b,
.mycart-opener-btn:hover .mycart-price-total {
    color: #000000 !important;
}

.mycart-opener-btn:hover .mycart-icon {
    transform: scale(1.1);
}

/* --- АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ --- */
@media (max-width: 768px) {
    .mycart-opener-btn {
        min-width: auto !important; /* Убираем 250px на мобильных */
        gap: 8px;
        padding: 5px 5px;
    }
    
    .mycart-opener-btn .mycart-icon {
        font-size: 24px !important; /* Уменьшаем эмодзи */
    }

    .mycart-opener-btn span {
        display: none; /* Скрываем слово "Корзина:", оставляем только иконку и цену */
    }

    .mycart-opener-btn b {
        font-size: 14px !important; /* Чуть меньше шрифт для цены */
    }
}

/* 5. СПИСОК ТОВАРОВ И ПОДСВЕТКА */
.mycart-body { 
    overflow-y: auto; 
    padding: 0 15px; 
    background: #fff !important; 
    flex-grow: 1;
}

.mycart-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.5s ease;
}

.mycart-item.new-arrival {
    animation: singleHighlight 3s ease-out forwards !important;
}

@keyframes singleHighlight {
    0% { background-color: transparent; }
    15% { background-color: rgba(177, 27, 33, 0.25); }
    80% { background-color: rgba(177, 27, 33, 0.1); }
    100% { background-color: transparent; }
}

.mycart-item-name {
    color: #333 !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

/* 6. ФУТЕР ПАНЕЛИ */
.mycart-footer { 
    padding: 15px; 
    border-top: 2px solid #eee; 
    background: #fff !important; 
}

.mycart-total-row { display: flex; justify-content: space-between; margin-bottom: 15px; color: #000 !important; font-size: 16px; }
.mycart-total-row strong { color: #b11b21 !important; font-size: 20px; }

.mycart-checkout-btn {
    display: block;
    background: #b11b21 !important;
    color: #fff !important;
    text-align: center;
    padding: 15px;
    text-decoration: none !important;
    font-weight: bold;
    border-radius: 4px;
}

/* 7. УПРАВЛЕНИЕ КОЛИЧЕСТВОМ */
.mycart-controls { display: flex; align-items: center; gap: 10px; }
.mycart-qty-box { display: flex; border: 1px solid #ccc; background: #fff; }
.mycart-qty-box button { width: 25px; height: 28px; background: #eee; border: none; cursor: pointer; color: #000 !important; }
.mycart-qty-input { width: 35px; border: none; text-align: center; color: #000 !important; font-size: 13px; }
.mycart-del-btn { color: #b11b21 !important; border: none; background: none; cursor: pointer; text-decoration: underline; font-size: 11px; padding: 0; }

.mycart-item-price { text-align: right; min-width: 90px; }
.mycart-price-one { color: #888 !important; font-size: 11px; }
.mycart-price-total { color: #b11b21 !important; font-weight: bold; font-size: 15px; }

/* 8. АНИМАЦИИ */
.mycart-opener-btn.bump {
    animation: cart-bump 0.4s ease-out;
}
@keyframes cart-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mycart-empty { padding: 40px; text-align: center; color: #666 !important; }