/* Slide-out Cart Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    visibility: visible;
    opacity: 1;
}

.slide-out-cart {
    position: fixed;
    top: 0;
    right: -450px;
    /* Slightly wider for better layout */
    width: 450px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.slide-out-cart.active {
    right: 0;
}

.slide-out-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid #f5f5f5;
}

.slide-out-cart-title {
    font-size: 28px;
    font-family: 'Playfair Display', serif;
    color: #1a1a1a;
}

.slide-out-cart-close {
    background: none;
    border: none;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    color: #1a1a1a;
    padding: 0;
}

.widget_shopping_cart_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.woocommerce-mini-cart {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none !important;
}

/* Item styling */
.woocommerce-mini-cart-item {
    display: flex;
    align-items: flex-start;
    padding: 25px 30px;
    border-bottom: 1px solid #f9f9f9;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    gap: 20px;
}

.woocommerce-mini-cart-item a img {
    width: 100px !important;
    height: 100px !important;
    object-fit: contain;
    /* Contain to show full product */
    margin: 0 !important;
    float: none !important;
    border-radius: 4px;
    background: #f9f9f9;
}

.mini-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 5px;
}

.mini-cart-item-title {
    color: #1a1a1a;
    font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
    /* Correct font */
    font-size: 14px;
    font-weight: 400 !important;
    /* Regular weight as requested */
    line-height: 1.4;
    margin-bottom: 4px;
    text-decoration: none;
    padding-right: 35px;
    /* Space for close button */
    display: block;
}

.mini-cart-item-price {
    color: #1a1a1a;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 12px;
    margin-bottom: 12px;
}

.quantity-input-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    width: fit-content;
}

.quantity-input-wrapper button {
    background: none;
    border: none;
    width: 30px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.quantity-input-wrapper button:hover {
    background: #f5f5f5;
    color: #000;
}

.quantity-input-wrapper input {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    background: none;
    text-align: center;
    font-size: 15px;
    color: #333;
    padding: 0;
    -moz-appearance: textfield;
}

.quantity-input-wrapper input::-webkit-outer-spin-button,
.quantity-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce-mini-cart-item .remove {
    position: absolute;
    right: 30px;
    top: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    color: #ccc;
    font-size: 24px;
    font-weight: 300;
    text-decoration: none !important;
    border-radius: 50%;
}

.woocommerce-mini-cart-item .remove:hover {
    background: none;
    color: #ff0000;
}

.woocommerce-mini-cart__total {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
}

.woocommerce-mini-cart__total strong {
    font-weight: 400;
}

.woocommerce-mini-cart__total .amount {
    font-weight: 400;
    font-size: 18px;
}

.woocommerce-mini-cart__buttons {
    padding: 0 30px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.woocommerce-mini-cart__buttons .button {
    width: 100%;
    text-align: center;
    padding: 16px !important;
    background: #000000 !important;
    color: #ffffff !important;
    text-transform: none;
    border-radius: 0;
    margin: 0;
    border: none;
    font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400 !important;
    letter-spacing: 0.5px;
    transition: opacity 0.3s;
}

.woocommerce-mini-cart__buttons .button:hover {
    background: #000000 !important;
    opacity: 0.8;
}

body.cart-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .slide-out-cart {
        width: 100%;
        right: -100%;
    }
}