/* Mini Cart Container */
.mini-cart-wrapper {
    padding: 1rem;
    background: var(--color-gray-200);
    border-radius: var(--br-5xs);
}

/* Header Styles */
.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-whitesmoke);
}

/* Products List */
.mini-cart-products {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* padding-right: 1.5rem;*/
}

.mini-cart-products::-webkit-scrollbar {
    display: none;
}

/* Cart Item */
.mini-cart-item {
    display: flex;
	align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

/* Product Image */
.item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--br-5xs);
}

/* Product Details */
.item-details {
    flex: 1;
    /* padding-right: 1.5rem; */
}

.item-details h5 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-sm);
}

/* Hide default number input spinners */
.mini-cart-qty::-webkit-outer-spin-button,
.mini-cart-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mini-cart-qty[type=number] {
    -moz-appearance: textfield;
}

/* Custom Quantity Wrapper */
.quantity-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-whitesmoke);
    border-radius: 4px;
    overflow: hidden;
    background: transparent;
}

.mini-cart-qty {
    width: 40px;
    border: none;
    text-align: center;
    background: transparent;
    color: var(--color-white);
    padding: 0.25rem;
    margin: 0;
}

/* Quantity Buttons */
.quantity-btn {
    background: transparent;
    border: none;
    color: var(--color-whitesmoke);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.quantity-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Remove Button */
.remove {
    position: relative;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    font-size: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FF4757;
    border-radius: 50%;
    transition: all 0.1s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.2);
}

.remove:hover {
    background: #FF6B81;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 3px 6px rgba(255, 71, 87, 0.3);
}

.remove:active {
    transform: translateY(-50%) scale(0.95);
    background: #FF4757;
}

/* Cart Footer */
.mini-cart-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-whitesmoke);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Footer Buttons */
.mini-cart-buttons {
    display: flex;
    gap: 1rem;
}

.mini-cart-buttons .button {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    border-radius: var(--br-5xs);
    font-size: var(--font-size-sm);
    transition: opacity 0.3s;
}

.checkout {
    /*background: var(--color-white);*/
    /*color: var(--color-black);*/
}

a.button.checkout {
    background-color: #55f5ff !important;
}

.button:hover {
    opacity: 0.9;
}

/* Empty Cart Message */
.empty-cart-message {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-gray-3);
}

/* Processing States */
.mini-cart-item.processing {
    opacity: 0.7;
    pointer-events: none;
}

.mini-cart-item.processing .mini-cart-qty {
    background: rgba(255, 255, 255, 0.1);
}

.mini-cart-item.processing .quantity-wrapper {
    opacity: 0.7;
    pointer-events: none;
}

.remove.processing {
    pointer-events: none;
    animation: pulse 1.5s infinite;
    background: rgba(255, 71, 87, 0.5);
}

.add_to_cart_button.processing {
    pointer-events: none;
    opacity: 0.5;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.mini-cart-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    min-width: fit-content;
}

/* Show dropdown when cart icon is clicked (using :focus-within) */
.cart-icon-wrapper:focus-within .mini-cart-dropdown:not(:has(.empty-cart-message)) {
    display: block;
}

/* Always hide dropdown when cart is empty */
.mini-cart-dropdown:has(.empty-cart-message) {
    display: none !important;
}

/* Hide "View Cart" button in the mini cart */
.added_to_cart.wc-forward {
    display: none !important;
}

.cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #f77366;
    color: white;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide badge when empty */
.cart-count:empty,
.cart-count[style*="display: none"] {
    display: none !important;
}

@media (max-width: 768px) {
	.cart-icon-wrapper.mobile-active-icon .mini-cart-dropdown {
         display: block;
     }
	
    .mini-cart-dropdown {
        max-width: min-content;
        /* height: 220px; */
        overflow: auto;
    }
    .cta_buttons a{
        width: 100%;
    }
    /*.mini-cart-products{*/
    /*    max-height: 200px;*/
    /*}*/
}

