/* Sidebar Cart Styles */

/* Sidebar Container */
.sidebar-cart {
    position: fixed;
    top: 0;
    right: -450px; /* Hidden by default */
    width: 450px;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    /* overflow-y: auto; */
    transition: all 0.4s ease;
    z-index: 10000;
    color: var(--title);
    padding: 30px 20px;
    opacity: 0;
    pointer-events: none; 
    background-size: cover;
    background-repeat: no-repeat;
}

.sidebar-cart-content{
    max-height: 75vh;
    overflow-y: auto;
}
/* Active State */
.sidebar-cart.active {
    right: 0;
    opacity: 1;
    pointer-events: all;
}

/* Overlay */
.sidebar-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9999;
}

.sidebar-cart-overlay.active {
    display: block;
}

/* Header */
.sidebar-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-cart-header h2 {
    font-size: 2.5rem; 
    font-family: "Jost", sans-serif;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 2.8rem;
    cursor: pointer; 
    transition: color 0.3s ease;
}

.close-sidebar:hover { 
}

/* Cart Items */
.sidebar-cart .cart-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    /* border-bottom: 1px solid #f0f0f0; */
}

.sidebar-cart .cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.sidebar-cart .cart-item-details {
    flex: 1;
    margin-left: 15px;
    position: relative;
}

.sidebar-cart .cart-item-title {
    font-size: 1.6rem;
    width: 93%;
    font-weight: 500;
    margin: 0 0 8px 0; 
    line-height: 1.3;
    font-family: "Jost", sans-serif;
}

.sidebar-cart .cart-item-title a {
    text-decoration: none; 
    transition: color 0.3s ease;
} 

.sidebar-cart .cart-item-prices {
    margin-bottom: 7px;
}

.sidebar-cart .regular-price {
    text-decoration: line-through; 
    margin-right: 10px;
    font-size: 14px;
}

.sidebar-cart .sale-price {
    /* color: #e53935; */
    font-weight: bold;
    font-size: 16px;
}

.sidebar-cart .price { 
    font-weight: 500;
    font-size: 16px;
}
.sidebar-cart .cart-item-prices bdi{
    font-weight: 500;
}

.sidebar-cart .cart-item-quantity {
    display: flex;
    align-items: center;
}

.sidebar-cart .cart-item-quantity button {
    width: 25px;
    height: 25px;
    /* background: #333; */
    background-color: transparent;
    border: 1px solid #dddddd;
    color: var(--title);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin: 0 5px;
    border-radius: 4px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.sidebar-cart .cart-item-quantity button:hover {
    background: #e0e0e0;
    border-color: #cccccc;
}

.sidebar-cart .cart-item-quantity .qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 1.4rem;
    color: var(--title);
}

.sidebar-cart .remove-cart-item {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    /* color: #ff4d4d; */
    transition: color 0.3s ease;
}

.sidebar-cart .remove-cart-item:hover {
    /* color: #cc0000; */
}

/* Sidebar Footer */
.sidebar-cart-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    bottom: 0px;
    right: 0rem;
    left: 0rem; 
    padding: 1rem 2rem 1.5rem; 
}
.sidebar-cart-footer .subtotal{
    margin: 1rem 0;
}
.sidebar-cart-footer .subtotal .ndesc{
    opacity: .7;
    font-size: 14px;
}

.sidebar-cart-footer .go-to-cart {
    margin-bottom: 0.5rem!important;
}
 
 
.footer-loader {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
}

.footer-loader img {
    width: 25px;
    height: 25px;
    animation: rotate 1s linear infinite;
}

.sidebar-cart .go-to-cart,
.sidebar-cart .buy-now { 
    font-size: 1.6rem;
}

.sidebar-cart .go-to-cart:hover { 
}

.sidebar-cart .buy-now { 
}

.sidebar-cart .buy-now:hover { 
}

/* Corner Loader Styles (if still used elsewhere) */
.corner-loader {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    z-index: 10000;
}

.corner-loader img {
    width: 100%;
    height: 100%;
    animation: rotate 1s linear infinite;
}
/* Responsive Design */
@media (max-width: 480px) {
    .sidebar-cart {
        width: 100%;
    }



    .corner-loader {
        top: 10px;
        right: 10px;
        width: 25px;
        height: 25px;
    }

    .sidebar-cart .cart-item-image img {
        width: 60px;
        height: 60px;
    }

    .sidebar-cart .cart-item-title {
        font-size: 15px;
    }
    
    .sidebar-cart .sidebar-cart-footer .button {
        font-size: 14px;
        padding: 10px 0;
    }

    .sidebar-cart .footer-loader img {
        width: 20px;
        height: 20px;
    }

    .sidebar-cart .sidebar-cart-footer .go-to-cart,
    .sidebar-cart .sidebar-cart-footer .buy-now {
        font-size: 14px;
        padding: 10px 0;
        line-height: 2.6rem;
    }
    .sidebar-cart-content{
        max-height: 68vh;
    }
    .sidebar-cart .cart-item{
        padding-bottom: 10px;
    }
    .sidebar-cart-footer .subtotal{
        font-size: 15px;
    }
 
    .sidebar-cart .empty-cart p{
        font-size: 15px;
    }
}

/* Loader Spinner */
.miniloader {
    border: 3px solid rgba(0, 0, 0, 0.3); 
    border-top-color: #ffffff; 
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

/* Spin Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.sidebar-cart .empty-cart {
    text-align: center;
    padding: 20px;
}

.sidebar-cart .empty-cart h2 { 
    font-size: 2rem;
    margin-bottom: 10px;
}

.sidebar-cart .empty-cart p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #555;
}

.sidebar-cart .empty-cart .shop-now-button {
    background-color: var(--primary); /* WooCommerce blue */
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar-cart .empty-cart .shop-now-button:hover { 
}

.sidebar-cart .cart-item-attributes {
    margin-bottom: 6px;
    font-size: 13px; 
}

.sidebar-cart .cart-item-attributes .attribute {
    display: block;
    opacity: .7;
    margin-bottom: 0px;
}
