/* Sidebar Cart Styles */

/* Sidebar Container */
.sidebar-cart {
    position: fixed;
    top: 0;
    right: -400px; /* Hidden by default */
    width: 400px;
    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;
    padding: 30px 20px;
    opacity: 0;
    pointer-events: none;
}

/* 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;
    color: #333333;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 2.8rem;
    cursor: pointer;
    color: #999999;
    transition: color 0.3s ease;
}

.close-sidebar:hover {
    color: #333333;
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
    margin-left: 15px;
    position: relative;
}

.cart-item-title {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    color: #333333;
    line-height: 1.2;
}

.cart-item-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.cart-item-title a:hover {
    color: var(--theme_color);
}

.cart-item-prices {
    margin-bottom: 10px;
}

.regular-price {
    text-decoration: line-through;
    color: #888888;
    margin-right: 10px;
    font-size: 1.5rem;
}

.sale-price {
    color: var(--theme_color) !important;
    font-weight: bold;
    font-size: 1.6rem;
}

.price {
    color: #555555;
    font-weight: bold;
    font-size: 1.6rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button {
    width: 32px;
    height: 32px;
    background: #f7f7f7;
    border: 1px solid #dddddd;
    color: #333333;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    margin: 0 5px;
    border-radius: 4px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.cart-item-quantity button:hover {
    background: #e0e0e0;
    border-color: #cccccc;
}

.cart-item-quantity .qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 1.6rem;
    color: #333333;
}

.remove-cart-item {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    color: #000;
    transition: color 0.3s ease;
}

.remove-cart-item:hover {
    color: var(--subtheme_color);
}

/* Sidebar Footer */
.sidebar-cart-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
}
.sidebar-cart-footer .go-to-cart {
    margin-bottom: 0.5rem!important;
}
.sidebar-cart-footer a.buy-now {
    color: white!important;
    background: var(--subtheme_color)!important;
}
.sidebar-cart-footer a {
    padding: 1em!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;
}

.go-to-cart, .buy-now {
    width: 100%;
    margin-bottom: 10px; /* Space between buttons */
    padding: 1.2rem 0;
    text-align: center;
    background: var(--theme_color) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    font-size: 1.6rem;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    transition: all 0.3s;
}
.go-to-cart:hover, .buy-now:hover{
    filter: brightness(110%);
}

.go-to-cart:hover {
    background: #c62828;
}

.buy-now {
    background: #43a047;
}

.buy-now:hover {
    background: #388e3c;
}

/* 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;
    }

    .cart-item-image img {
        width: 60px;
        height: 60px;
    }

    .cart-item-title {
        font-size: 1rem;
    }

    .sidebar-cart-footer .button {
        font-size: 0.9rem;
        padding: 10px 0;
    }

    .footer-loader img {
        width: 20px;
        height: 20px;
    }

    .go-to-cart,
    .buy-now {
        font-size: 0.9rem;
        padding: 10px 0;
    }
}

/* Loader Spinner */
.miniloader {
    border: 4px solid rgba(0, 0, 0, 0.1); /* Light gray */
    border-top-color: #333333; /* Dark gray */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

/* Spin Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.empty-cart {
    text-align: center;
    padding: 20px;
    padding-top: 50rem;
}

.empty-cart h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.empty-cart p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #555;
}

.empty-cart .shop-now-button {
    background-color: #0071a1; /* WooCommerce blue */
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.empty-cart .shop-now-button:hover {
    background-color: #005f7a;
}
.cart-item-attributes {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: #555555;
}

.cart-item-attributes .attribute {
    display: block;
    margin-bottom: 4px;
}
