/* ── Cart trigger button ────────────────────────────────────────────────── */
#custom-cart-open {
    position: static;
    background: transparent;
    color: inherit;
    padding: 6px 10px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

#custom-cart-open .cart-count {
    font-size: 13px;
    font-weight: 600;
    color: #7a277c;
    margin-top: -25px;
    background-color: #7a277c;
    min-height: 20px;
    min-width: 20px;
    border-radius: 100%;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;    transform: translateX(-4px);
}

/* ── Wrapper for button + panel (needed for dropdown positioning) ────────── */
/* Wrap both in a relative container in your header template if using mini cart */

/* ══ DRAWER MODE ════════════════════════════════════════════════════════════ */
#custom-cart-drawer:not(.custom-mini-cart-dropdown) {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: #fff;

    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99999;
    overflow-y: auto;
}

#custom-cart-drawer:not(.custom-mini-cart-dropdown).open {
    transform: translateX(0%);    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
}

/* Drawer header */
.custom-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.custom-cart-header h4 {
    margin: 0;
    font-size: 18px;
}

#custom-cart-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #333;
    line-height: 1;
    padding: 0;
}

/* ══ MINI CART DROPDOWN MODE ════════════════════════════════════════════════ */
.custom-mini-cart-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    overflow: hidden;
}

.custom-mini-cart-dropdown.open {
    display: block;
    animation: cwcFadeIn 0.18s ease;
}

@keyframes cwcFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Make the shortcode wrapper relative so dropdown aligns correctly */
/* Add position:relative to whatever element wraps [custom_woo_cart] in your header */

/* ══ SHARED CART CONTENT STYLES ═════════════════════════════════════════════ */
.woocommerce-mini-cart-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.product-thumb img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
}

.product-info {
    flex: 1;
    font-size: 14px;
    padding-right: 35px;
}

.product-info strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.3;
}

.product-price {
    color: #333333;
    font-size: 13px;
    margin-bottom: 6px;
}

/* Quantity controls */
.quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.quantity button.qty {
    width: 42px;
    height: 28px;
    background: #FFFFFF;
    color: #7a277c;
    border: none;
    border-radius: 0px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    border: 1px solid #7a277c;
}

.quantity button.qty:hover {
    background: #5c1f6b;
    color: #ffffff;
}

.quantity input.qty {
    width: 46px !important;
    padding: 0 !important;
    height: 28px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-height: auto !important;
    padding: 0;
}

/* Remove link */
a.remove {
    font-size: 18px;
    color: #c00;
    text-decoration: none;
    display: inline-block;
    line-height: 1;
}

a.remove:hover {
    color: #900;
}

/* Footer */
.mini-cart-footer {
    padding: 14px 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.mini-cart-footer strong {
    display: block;
    font-size: 15px;
    margin-bottom: 0;
}
.mini-cart-footer .button {
    display: inline-block !important;
    padding: 8px 16px !important;
    background: #7a277c !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-right: 0px !important;
    margin-top: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
    cursor: pointer !important;
    border: 2px solid #7a277c !important;
    width: 48% !important;
    text-align: center !important;
    line-height: 2.2 !important;
}
.mini-cart-footer .button:hover {
    background: #FFFFFF !important;
    color: #7a277c !important;
}

.mini-cart-footer .button:hover {
    background: #FFFFFF;
    color: #7a277c !important;
}


/* Empty cart message */
.cart-empty-msg {
    padding: 20px 15px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/**/

.woocommerce .woocommerce-mini-cart-item .quantity  button.qty {
    border-color: #7a277c;
    padding: 7px 11px;
    /* min-width: 36px; */
    /* min-height: 36px; */
    line-height: 1;    width: auto !important;

}
.woocommerce .woocommerce-mini-cart-item .quantity  input.qty {
    width: 55px!important;
    padding: 5px 5px !important;
    min-height: auto !important;
    text-align: center;
}
.custom-cart-header h4 {
    margin: 0;
    color: #7a277c;
}
.custom-cart-header button#custom-cart-close {
    top: 0;
    color: #7a277c;    padding: 0;
}
.product-price {
    font-weight: 700;
    margin-top: 6px;
    margin-bottom: 11px;
    line-height: 1.2;
}
.woocommerce-mini-cart-item  a.remove {
    font-size: 25px;
}
.mini-cart-footer strong {
    margin-bottom: 15px;
    display: inline-block;
}
.mini-cart-footer {
    padding: 20px 15px;
    background: #f2e9f2;
    /* border-top: 1px solid #ddd; */
}
body .woocommerce-mini-cart-item  a.remove {
    position: absolute;
    top: 12px;
    right: 20px;
    /* border: 2px solid #7a277c; */
    background-color: #FFFFFF !important;
    color: #7a277c!important;
    transition: all .2s !important;
    height: 22px;
    width: 22px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    font-weight: 700;
}
body .woocommerce-mini-cart-item  a.remove:hover{
        background-color: #FFFFFF !important;
    color: #7a277c!important;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wp-block-product-new {
    display: none;
}
.wp-block-woocommerce-empty-cart-block hr + h2.wp-block-heading.has-text-align-center,
.wp-block-woocommerce-empty-cart-block hr {
    display: none;
}
.woocommerce.single-product div.product form.cart div.quantity{
        height: 100% !important;
    min-height: 48px !important;

}
.woocommerce.single-product div.product form.cart div.quantity .input-text.qty.text {
    min-height: 48px !important;
}
@media(max-width:767px){
#custom-cart-open{
    margin-left: auto;
}
}

