.cart-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 1;
    display: block;
    transition: opacity 300ms;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1319px;
}

.cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    
}

.cart-modal-box {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    right: 80px;
    top: 80px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.cart-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cart-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.cart-modal-close:hover {
    background-color: #f0f0f0;
}

.cart-modal-body {
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.cart-modal-content {
    padding: 20px;
}

.cart-modal-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.cart-modal-item:last-child {
    border-bottom: none;
}

.cart-modal-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cart-modal-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-modal-item-details {
    flex: 1;
    min-width: 0;
}

.cart-modal-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-modal-item-details .price {
    margin: 0 0 3px 0;
    font-size: 13px;
    color: #666;
}

.cart-modal-item-details .retail-price {
    margin: 0;
    font-size: 11px;
    color: #999;
}

.cart-modal-item-total {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-right: 30px;
}

.cart-modal-remove {
    position: absolute;
    top: 10px;
    right: 0;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.cart-modal-remove:hover {
    background-color: #f0f0f0;
    color: #ff4444;
}

.cart-modal-divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.cart-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cart-modal-clear {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 0;
    transition: color 0.2s;
}

.cart-modal-clear:hover {
    color: #ff4444;
}

.cart-modal-total {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.cart-modal-checkout-btn {
    display: block;
    width: 100%;
    background: #0078d7;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.cart-modal-checkout-btn:hover {
    background: #005a9e;
    color: white;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header__basket__btn {
    position: relative;
}

.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cart-notification.error {
    background: #ff4444;
}

.inline-notification-container {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    z-index: 10010;
    pointer-events: none;
    width: 100%;
    max-width: 100%;
    padding: 20px;
}
.inline-notification-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 460px;
    width: calc(100% - 40px);
    padding: 16px 18px;
    text-align: center;
    transition: transform 200ms ease-out, opacity 200ms ease-out;
    transform: translateY(-6px);
    opacity: 0;
    pointer-events: auto;
    position: relative;
}
.inline-notification-box.show {
    transform: translateY(0);
    opacity: 1;
}
.inline-notification-box.success {
    border-left: 4px solid #4CAF50;
}
.inline-notification-box.error {
    border-left: 4px solid #ff4444;
}
.inline-notification-box.info {
    border-left: 4px solid #0078d7;
}
.inline-notification-box p { margin: 0; color: #333; font-size: var(--fs-2) }

.inline-notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.inline-notification-close:hover { background: rgba(0,0,0,0.04); }

@media (max-width: 768px) {
    .cart-modal-wrapper {
        padding: 10px;
        padding-top: 70px;
    }
    
    .cart-modal-box {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .cart-modal-header {
        padding: 15px;
    }
    
    .cart-modal-content {
        padding: 15px;
    }
    
    .cart-modal-item {
        padding: 12px 0;
    }
    
    .cart-modal-item-image {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .cart-modal-item-details h4 {
        font-size: 13px;
    }
    
    .cart-modal-item-details .price {
        font-size: 12px;
    }
    
    .cart-modal-item-total {
        font-size: 13px;
        margin-right: 25px;
    }
}

.add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header__basket__btn.loading-count {
    position: relative;
}
.header__basket__btn.loading-count::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #0078d7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10001;
}
