
/* =========================================================
   GROOKFIT Purchase Controls
   IMPORTANT: This file intentionally does NOT style WooCommerce
   variation/swatches/selectors. The theme owns those completely.
   ========================================================= */

.woocommerce div.product form.cart .gfse-purchase-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px !important;
    gap:8px !important;
    align-items:stretch !important;
    width:100% !important;
    margin:12px 0 0 !important;
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button,
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn,
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
    box-sizing:border-box !important;
    float:none !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:48px !important;
    min-height:48px !important;
    margin:0 !important;
    padding:0 10px !important;
    border-radius:11px !important;
    font-family:inherit !important;
    font-size:14px !important;
    font-weight:600 !important;
    line-height:1 !important;
    text-align:center !important;
    white-space:nowrap !important;
    text-decoration:none !important;
    box-shadow:none !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button{
    background:#fff !important;
    color:#090909 !important;
    border:1px solid #fff !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
    background:#111 !important;
    color:#fff !important;
    border:1px solid rgba(255,255,255,.30) !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
    width:48px !important;
    min-width:48px !important;
    max-width:48px !important;
    padding:0 !important;
    background:#111 !important;
    color:#fff !important;
    border:1px solid rgba(255,255,255,.30) !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn .gfse-heart{
    display:block !important;
    margin:0 !important;
    padding:0 !important;
    color:#fff !important;
    font-size:19px !important;
    line-height:1 !important;
    font-style:normal !important;
    font-family:"Font Awesome 6 Free","Font Awesome 6 Pro",sans-serif !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn .gfse-heart.fa-regular{
    font-weight:400 !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn .gfse-heart.fa-solid{
    font-weight:900 !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button:hover{
    background:#ededed !important;
    color:#000 !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn:hover,
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn:hover{
    background:#1c1c1c !important;
    color:#fff !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions .is-loading{
    opacity:.55 !important;
    pointer-events:none !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions .is-variation-locked{
    opacity:.45 !important;
    cursor:not-allowed !important;
}

.gfse-quick-buy-btn .gfse-qb-icon{
    display:inline-block !important;
    margin-right:7px !important;
    font-size:17px !important;
    line-height:1 !important;
}

@media(max-width:767px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px !important;
        gap:6px !important;
        margin-top:10px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button,
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        height:46px !important;
        min-height:46px !important;
        padding:0 6px !important;
        font-size:13px !important;
        border-radius:9px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
        width:44px !important;
        min-width:44px !important;
        max-width:44px !important;
        height:46px !important;
        min-height:46px !important;
        border-radius:9px !important;
    }
}

@media(max-width:360px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px !important;
        gap:5px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button,
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        font-size:12px !important;
        padding:0 4px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
        width:42px !important;
        min-width:42px !important;
        max-width:42px !important;
    }
}

/* Optional sticky purchase bar: independent of variation styling. */
.gfse-sticky-purchase{
    position:fixed;
    left:50%;
    bottom:76px;
    transform:translate(-50%,20px);
    width:min(560px,calc(100% - 20px));
    display:flex;
    gap:7px;
    padding:7px;
    background:rgba(10,10,10,.96);
    border:1px solid rgba(255,255,255,.12);
    border-radius:12px;
    box-shadow:0 12px 40px rgba(0,0,0,.35);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    opacity:0;
    pointer-events:none;
    transition:.22s ease;
    z-index:9998;
}
.gfse-sticky-purchase.is-visible{
    opacity:1;
    pointer-events:auto;
    transform:translate(-50%,0);
}
.gfse-sticky-cart,.gfse-sticky-buy{
    flex:1 1 0;
    min-width:0 !important;
    height:44px !important;
    min-height:44px !important;
    margin:0 !important;
    padding:0 10px !important;
    border-radius:9px !important;
    font-family:inherit !important;
    font-size:13px !important;
    font-weight:600 !important;
    line-height:1 !important;
}
.gfse-sticky-cart{background:#fff !important;color:#000 !important;border:1px solid #fff !important}
.gfse-sticky-buy{background:#151515 !important;color:#fff !important;border:1px solid rgba(255,255,255,.22) !important}
@media(max-width:767px){
    .gfse-sticky-purchase{
        bottom:70px;
        width:calc(100% - 18px);
        padding:6px;
        gap:6px;
        border-radius:11px;
    }
}


/* =========================================================
   v1.1.1 — Keep Add to Cart visually unchanged after AJAX
   ========================================================= */

.woocommerce div.product form.cart .gfse-purchase-actions{
    column-gap:10px !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button.added,
.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button.is-added{
    background:#fff !important;
    background-color:#fff !important;
    color:#090909 !important;
    border-color:#fff !important;
    box-shadow:none !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button::before,
.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button::after{
    content:none !important;
    display:none !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button.added::before,
.woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button.added::after{
    content:none !important;
    display:none !important;
}

@media(max-width:767px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        column-gap:10px !important;
        row-gap:0 !important;
    }
}

@media(max-width:360px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        column-gap:8px !important;
    }
}


/* v1.1.2 — Sticky purchase buttons are dim/disabled until a valid variation. */
.gfse-sticky-purchase .gfse-sticky-cart.is-variation-locked,
.gfse-sticky-purchase .gfse-sticky-buy.is-variation-locked,
.gfse-sticky-purchase .gfse-sticky-cart:disabled,
.gfse-sticky-purchase .gfse-sticky-buy:disabled{
    opacity:.38 !important;
    cursor:not-allowed !important;
    pointer-events:none !important;
    filter:saturate(.35) !important;
}
.gfse-sticky-purchase .gfse-sticky-cart.is-variation-locked,
.gfse-sticky-purchase .gfse-sticky-cart:disabled{
    background:#252525 !important;
    color:rgba(255,255,255,.55) !important;
    border-color:#353535 !important;
}
.gfse-sticky-purchase .gfse-sticky-buy.is-variation-locked,
.gfse-sticky-purchase .gfse-sticky-buy:disabled{
    background:#111 !important;
    color:rgba(255,255,255,.55) !important;
    border-color:rgba(255,255,255,.14) !important;
}


/* =========================================================
   v1.1.3 — Dynamic variation validation notice
   ========================================================= */
.gfse-variation-notice{
    display:flex !important;
    align-items:center !important;
    gap:9px !important;
    width:100% !important;
    box-sizing:border-box !important;
    margin:8px 0 9px !important;
    padding:9px 12px !important;
    border:1px solid rgba(255,255,255,.16) !important;
    border-radius:9px !important;
    background:rgba(20,20,20,.94) !important;
    color:rgba(255,255,255,.92) !important;
    box-shadow:0 6px 20px rgba(0,0,0,.22) !important;
    backdrop-filter:blur(8px) !important;
    -webkit-backdrop-filter:blur(8px) !important;
    font-family:inherit !important;
    font-size:12.5px !important;
    font-weight:500 !important;
    line-height:1.35 !important;
    letter-spacing:.1px !important;
    animation:gfseNoticeIn .18s ease-out !important;
    z-index:50 !important;
}

.gfse-notice-icon{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 18px !important;
    width:18px !important;
    height:18px !important;
    border-radius:50% !important;
    background:rgba(255,255,255,.10) !important;
    color:rgba(255,255,255,.85) !important;
    font-size:11px !important;
    font-weight:700 !important;
}

.gfse-notice-text{
    min-width:0 !important;
}

@keyframes gfseNoticeIn{
    from{opacity:0;transform:translateY(-3px);}
    to{opacity:1;transform:translateY(0);}
}

@media(max-width:767px){
    .gfse-variation-notice{
        margin:7px 0 8px !important;
        padding:8px 10px !important;
        border-radius:8px !important;
        font-size:12px !important;
    }
}


/* =========================================================
   v1.1.3 — Dynamic required-option notice
   ========================================================= */
.gfse-variation-notice{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    position:relative !important;
    width:100% !important;
    box-sizing:border-box !important;
    margin:8px 0 !important;
    padding:8px 10px !important;
    border:1px solid rgba(255,255,255,.13) !important;
    border-radius:9px !important;
    background:rgba(18,18,18,.96) !important;
    color:rgba(255,255,255,.88) !important;
    box-shadow:0 5px 18px rgba(0,0,0,.22) !important;
    backdrop-filter:blur(8px) !important;
    -webkit-backdrop-filter:blur(8px) !important;
    font-size:12px !important;
    line-height:1.35 !important;
    font-weight:500 !important;
    z-index:100 !important;
    animation:gfseNoticeIn .16s ease-out !important;
}

.gfse-notice-icon{
    flex:0 0 17px !important;
    width:17px !important;
    height:17px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid rgba(255,255,255,.20) !important;
    border-radius:50% !important;
    color:rgba(255,255,255,.78) !important;
    font-size:10px !important;
    font-weight:700 !important;
}

.gfse-notice-text{
    flex:1 1 auto !important;
    min-width:0 !important;
}

.gfse-notice-close{
    flex:0 0 auto !important;
    width:20px !important;
    height:20px !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    background:transparent !important;
    color:rgba(255,255,255,.55) !important;
    font-size:18px !important;
    line-height:18px !important;
    cursor:pointer !important;
}

@keyframes gfseNoticeIn{
    from{opacity:0;transform:translateY(-3px)}
    to{opacity:1;transform:translateY(0)}
}

/* Dimmed means unavailable, but KEEP CLICKABLE so the warning can appear. */
body.single-product form.cart.variations_form.gfse-no-valid-variation
.gfse-purchase-actions > .single_add_to_cart_button,
body.single-product form.cart.variations_form.gfse-no-valid-variation
.gfse-purchase-actions > .gfse-quick-buy-btn,
body.single-product form.cart.variations_form.gfse-no-valid-variation
.gfse-purchase-actions > .gfse-wishlist-btn,
body.single-product form.cart.variations_form.gfse-no-valid-variation
~ .gfse-sticky-purchase .gfse-sticky-cart,
body.single-product form.cart.variations_form.gfse-no-valid-variation
~ .gfse-sticky-purchase .gfse-sticky-buy{
    pointer-events:auto !important;
}

@media(max-width:767px){
    .gfse-variation-notice{
        margin:7px 0 !important;
        padding:8px 9px !important;
        font-size:11.5px !important;
        border-radius:8px !important;
    }
}


/* =========================================================
   v1.1.4 — Floating website notice
   ========================================================= */
.gfse-variation-notice{
    position:fixed !important;
    top:88px !important;
    left:50% !important;
    transform:translateX(-50%) translateY(-8px) !important;
    width:min(390px,calc(100vw - 28px)) !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
    gap:9px !important;
    margin:0 !important;
    padding:10px 12px !important;
    border:1px solid rgba(255,255,255,.16) !important;
    border-radius:12px !important;
    background:rgba(15,15,15,.96) !important;
    color:#fff !important;
    box-shadow:0 12px 34px rgba(0,0,0,.42) !important;
    backdrop-filter:blur(14px) !important;
    -webkit-backdrop-filter:blur(14px) !important;
    font-family:inherit !important;
    font-size:12.5px !important;
    font-weight:500 !important;
    line-height:1.35 !important;
    z-index:2147483000 !important;
    animation:gfseFloatNoticeIn .2s ease-out forwards !important;
}

.gfse-notice-icon{
    flex:0 0 19px !important;
    width:19px !important;
    height:19px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid rgba(255,255,255,.22) !important;
    border-radius:50% !important;
    background:rgba(255,255,255,.08) !important;
    color:#fff !important;
    font-size:10px !important;
    font-weight:700 !important;
}

.gfse-notice-text{
    flex:1 1 auto !important;
    min-width:0 !important;
}

.gfse-notice-close{
    flex:0 0 22px !important;
    width:22px !important;
    height:22px !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    background:transparent !important;
    color:rgba(255,255,255,.55) !important;
    font-size:19px !important;
    line-height:20px !important;
    cursor:pointer !important;
}

@keyframes gfseFloatNoticeIn{
    from{opacity:0;transform:translateX(-50%) translateY(-8px)}
    to{opacity:1;transform:translateX(-50%) translateY(0)}
}

@media(max-width:767px){
    .gfse-variation-notice{
        top:76px !important;
        width:calc(100vw - 24px) !important;
        padding:9px 11px !important;
        border-radius:11px !important;
        font-size:12px !important;
    }
}

/* Locked controls are dim, but clickable so the website notice can appear. */
.gfse-sticky-purchase .gfse-sticky-cart.is-variation-locked,
.gfse-sticky-purchase .gfse-sticky-buy.is-variation-locked,
.woocommerce div.product form.cart .gfse-purchase-actions .is-variation-locked{
    pointer-events:auto !important;
    opacity:.42 !important;
    cursor:pointer !important;
    filter:saturate(.45) !important;
}


/* =========================================================
   v1.1.5 — Quick Buy icon/text spacing
   Keeps the button itself unchanged; centers the icon + label
   as one balanced group with equal visual padding.
   ========================================================= */
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    padding-left:10px !important;
    padding-right:10px !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn .gfse-qb-icon{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    margin:0 !important;
    padding:0 !important;
    flex:0 0 auto !important;
    width:20px !important;
    height:20px !important;
    font-size:18px !important;
    line-height:1 !important;
}

.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn > span:last-child{
    display:inline-block !important;
    margin:0 !important;
    padding:0 !important;
    flex:0 0 auto !important;
}

@media(max-width:767px){
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        gap:7px !important;
        padding-left:8px !important;
        padding-right:8px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn .gfse-qb-icon{
        width:19px !important;
        height:19px !important;
        font-size:17px !important;
    }
}

/* =========================================================
   v1.2.10 — Correct purchase row layout
   The quantity control is INSIDE .gfse-purchase-actions.
   Keep variation/swatches completely untouched.
   ========================================================= */

/* Desktop: quantity + Add to Cart + Quick Buy + Wishlist on ONE row */
@media(min-width:768px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        display:grid !important;
        grid-template-columns:150px minmax(0,1fr) minmax(0,1fr) 48px !important;
        gap:8px !important;
        align-items:center !important;
        width:100% !important;
        margin-top:0 !important;
        margin-bottom:17px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .quantity{
        grid-column:1 !important;
        grid-row:1 !important;
        width:150px !important;
        margin:0 !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button{
        grid-column:2 !important;
        grid-row:1 !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        grid-column:3 !important;
        grid-row:1 !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
        grid-column:4 !important;
        grid-row:1 !important;
        width:48px !important;
        min-width:48px !important;
        max-width:48px !important;
    }
}

/* Mobile: restore the compact 3-button row.
   Quantity remains available but is not shown beside the buttons. */
@media(max-width:767px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        display:grid !important;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px !important;
        gap:6px !important;
        align-items:center !important;
        width:100% !important;
        margin-top:0 !important;
        margin-bottom:17px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .quantity{
        display:none !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button,
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        grid-row:1 !important;
        height:46px !important;
        min-height:46px !important;
        padding:0 6px !important;
        font-size:13px !important;
        border-radius:9px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button{
        grid-column:1 !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        grid-column:2 !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
        grid-column:3 !important;
        grid-row:1 !important;
        width:44px !important;
        min-width:44px !important;
        max-width:44px !important;
        height:46px !important;
        min-height:46px !important;
        border-radius:9px !important;
    }
}

@media(max-width:360px){
    .woocommerce div.product form.cart .gfse-purchase-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px !important;
        gap:5px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .single_add_to_cart_button,
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        font-size:12px !important;
        padding:0 4px !important;
    }

    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-wishlist-btn{
        width:42px !important;
        min-width:42px !important;
        max-width:42px !important;
    }
}

/* Requested sticky-bar offset above the mobile bottom navigation. */
.gfse-sticky-purchase{
    bottom:87px !important;
}


/* v1.2.17 — Quick Buy fit correction.
   Keep the lightning icon and label INSIDE the button on narrow desktop
   product columns; do not alter variation/swatches. */
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
    box-sizing:border-box !important;
    overflow:hidden !important;
    flex-wrap:nowrap !important;
    white-space:nowrap !important;
    gap:6px !important;
    padding:0 12px !important;
    text-indent:0 !important;
}
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn .gfse-qb-icon{
    flex:0 0 18px !important;
    width:18px !important;
    min-width:18px !important;
    max-width:18px !important;
    margin:0 !important;
    padding:0 !important;
    text-align:center !important;
}
.woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn > span:last-child{
    flex:0 1 auto !important;
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
}
@media(min-width:768px){
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        min-width:0 !important;
        padding-left:10px !important;
        padding-right:10px !important;
    }
}
@media(max-width:767px){
    .woocommerce div.product form.cart .gfse-purchase-actions > .gfse-quick-buy-btn{
        padding-left:8px !important;
        padding-right:8px !important;
        gap:6px !important;
    }
}
