/* Slide-out Cart Sidebar Styles */
.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px; /* Initially hidden */
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 1000000;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

/* Sidebar Header */
.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-sidebar-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

.cart-sidebar-close {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.cart-sidebar-close:hover {
    color: #F48721;
}

/* Sidebar Body (Items List) */
.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.cart-sidebar-item:last-child {
    border-bottom: none;
}

.cart-sidebar-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.cart-sidebar-item-info {
    flex: 1;
}

.cart-sidebar-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-sidebar-item-price {
    font-size: 14px;
    color: #666;
}

.cart-sidebar-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.cart-sidebar-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 2px 10px;
}

.cart-sidebar-qty-selector button {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0 5px;
}

.cart-sidebar-qty-selector input {
    width: 30px;
    text-align: center;
    border: none;
    font-size: 14px;
    font-weight: 600;
}

.cart-sidebar-item-remove {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: #ccc;
    font-size: 18px;
    transition: color 0.2s;
}

.cart-sidebar-item-remove:hover {
    color: #F48721;
}

/* Recommendations Section */
.cart-sidebar-recommendations {
    background: #f9f9f9;
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-sidebar-recommendations h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

/* Sidebar Footer */
.cart-sidebar-footer {
    padding: 25px 20px;
    background: #fff;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.cart-sidebar-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.cart-sidebar-total-price {
    font-size: 20px;
    color: #F48721;
}

.btn-sidebar-checkout {
    display: block;
    width: 100%;
    background: #F48721;
    color: #fff;
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-sidebar-checkout:hover {
    filter: brightness(90%);
    color: #fff;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Floating Cart Card (Large Screens Only) */
.floating-cart-card {
    padding-top: 10px;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: var(--primary_color);
 
    z-index: 999998;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid var(--primary_color);
    border-right: none;
    min-width: 80px;
}

.floating-cart-card p {
    color: var(--primary_color);
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .floating-cart-card {
        display: none !important;
    }
}



.floating-cart-card .cart-icon-wrapper {
    position: relative;
    font-size: 24px;
}

.floating-cart-card .total-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #F48721;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid #1a1a1a;
    font-weight: 700;
}

.floating-cart-card:hover .total-cart-count {
    border-color: #F48721;
}

.floating-cart-card .cart-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    background-color: #F48721;
    padding: 10px;
    border-radius: 0px 0 8px 8px;
    color: #fff;
    font-size: 18px;
    width: 100%;
    text-align: center;
    display: block;
}

.floating-cart-card .cart-text span:first-child {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.floating-cart-card .cart-text .total-cart-amount {
    font-size: 13px;
    font-weight: 800;
}

/* Flying Image Animation */
.flying-img {
    position: fixed;
    border-radius: 50%;
    border: 2px solid #F48721;
    z-index: 9999999;
    pointer-events: none;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.42, 0, 0.58, 1);
}

.cart-shake {
    animation: cartShake 0.5s ease;
}

@keyframes cartShake {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
