:root{
    --qct-green:#25D366;
    --qct-green-dark:#128C7E;
    --qct-text:#fff;
    --qct-radius:999px;
    --qct-action-height:44px;
    --qct-primary-width:132px;
    --qct-mobile-bar-offset:96px;
}

/* Floating WhatsApp */
.qct-whatsapp{
    position:fixed;
    right:max(22px,env(safe-area-inset-right));
    bottom:max(22px,env(safe-area-inset-bottom));
    z-index:999999;
    display:inline-flex;
    align-items:center;
    gap:9px;
    min-height:52px;
    padding:9px 17px 9px 11px;
    border-radius:var(--qct-radius);
    background:linear-gradient(135deg,var(--qct-green),var(--qct-green-dark));
    color:var(--qct-text)!important;
    text-decoration:none!important;
    font-size:15px;
    font-weight:800;
    line-height:1;
    box-shadow:0 12px 30px rgba(18,140,126,.30),0 4px 10px rgba(0,0,0,.16);
    transition:transform .2s ease,box-shadow .2s ease,filter .2s ease,bottom .2s ease;
}
.qct-whatsapp--left{left:max(22px,env(safe-area-inset-left));right:auto}
.qct-whatsapp:hover,.qct-whatsapp:focus-visible{color:#fff!important;transform:translateY(-3px) scale(1.02);box-shadow:0 16px 36px rgba(18,140,126,.34),0 6px 14px rgba(0,0,0,.18);outline:none}
.qct-whatsapp__icon{width:31px;height:31px;display:grid;place-items:center;flex:0 0 31px}
.qct-whatsapp__icon svg{width:31px;height:31px;display:block}
.qct-whatsapp__label{white-space:nowrap}
.qct-whatsapp--pulse::before{content:'';position:absolute;inset:0;border-radius:inherit;border:2px solid rgba(37,211,102,.55);animation:qctPulse 2.2s ease-out infinite;pointer-events:none}
@keyframes qctPulse{0%{transform:scale(.95);opacity:.75}70%,100%{transform:scale(1.25);opacity:0}}
/* Avoid a second theme floating WhatsApp when this plugin is enabled. */
body .ds-float-wa{display:none!important}

/* Controlled product action row */
.qct-has-quick-buy .qct-action-row{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    width:100%!important;
}
.qct-has-quick-buy .qct-action-row .qct-action-quantity{order:1;flex:0 0 auto!important;margin:0!important;min-height:var(--qct-action-height)!important;height:var(--qct-action-height)!important;display:inline-flex!important;align-items:stretch!important}
.qct-has-quick-buy .qct-action-row .qct-action-quantity .qty,
.qct-has-quick-buy .qct-action-row .qct-action-quantity button,
.qct-has-quick-buy .qct-action-row .qct-action-quantity input{min-height:var(--qct-action-height)!important;height:var(--qct-action-height)!important;box-sizing:border-box!important}
.qct-has-quick-buy .qct-action-row .qct-action-add,
.qct-has-quick-buy .qct-action-row .qct-action-quick{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    flex:0 0 var(--qct-primary-width)!important;
    width:var(--qct-primary-width)!important;
    min-width:var(--qct-primary-width)!important;
    max-width:var(--qct-primary-width)!important;
    height:var(--qct-action-height)!important;
    min-height:var(--qct-action-height)!important;
    max-height:var(--qct-action-height)!important;
    padding:0 12px!important;
    margin:0!important;
    border-radius:6px!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1!important;
    white-space:nowrap!important;
    text-align:center!important;
}
.qct-has-quick-buy .qct-action-row .qct-action-add{order:2}
.qct-has-quick-buy .qct-action-row .qct-action-quick{order:3;margin-right:10px!important;border:1px solid #111827!important;background:linear-gradient(135deg,#111827,#17223a)!important;color:#fff!important;box-shadow:0 7px 17px rgba(17,24,39,.18);animation:qctQuickBuyAttention 5.2s ease-in-out infinite;transform-origin:center;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease!important}
.qct-has-quick-buy .qct-action-row .qct-action-quick:hover,.qct-has-quick-buy .qct-action-row .qct-action-quick:focus{color:#fff!important;filter:brightness(1.08);box-shadow:0 10px 23px rgba(17,24,39,.28);animation-play-state:paused;transform:translateY(-1px)}
.qct-cart-icon,.qct-quick-buy__icon{width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 17px}
.qct-cart-icon svg,.qct-quick-buy__icon svg{width:17px;height:17px;display:block}
@keyframes qctQuickBuyAttention{0%,66%,100%{transform:translateX(0)}69%{transform:translateX(-2px) rotate(-.7deg)}72%{transform:translateX(2px) rotate(.7deg)}75%{transform:translateX(-2px) rotate(-.5deg)}78%{transform:translateX(1px) rotate(.4deg)}81%{transform:translateX(0)}}

/* Wishlist and compare remain compact squares but exactly match CTA height. */
.qct-has-quick-buy .qct-action-row .qct-secondary-wrap{order:4;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:var(--qct-action-height)!important;min-width:var(--qct-action-height)!important;max-width:var(--qct-action-height)!important;height:var(--qct-action-height)!important;min-height:var(--qct-action-height)!important;max-height:var(--qct-action-height)!important;margin:0!important;padding:0!important;box-sizing:border-box!important;flex:0 0 var(--qct-action-height)!important}
.qct-has-quick-buy .qct-action-row .qct-secondary-compare{order:5}
.qct-has-quick-buy .qct-action-row .qct-secondary-action{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;min-height:var(--qct-action-height)!important;margin:0!important;padding:0!important;box-sizing:border-box!important}
.qct-has-quick-buy .qct-action-row .qct-secondary-wrap *{box-sizing:border-box!important}

/* Stable classic WooCommerce checkout. Theme floating/block label rules are reset here. */
.qct-simplified-checkout #billing_country_field,
.qct-simplified-checkout .woocommerce-shipping-fields{display:none!important}
.qct-simplified-checkout .woocommerce-additional-fields{display:block!important;margin-top:15px!important}
.qct-simplified-checkout .woocommerce-additional-fields>h3{display:none!important}
.qct-simplified-checkout .woocommerce-billing-fields>h3{
    margin:0 0 18px!important;
    font-size:21px!important;
    line-height:1.3!important;
    font-weight:800!important;
    color:#1f2937!important;
}
.qct-simplified-checkout .woocommerce-billing-fields__field-wrapper{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:14px!important;
}
.qct-simplified-checkout #billing_first_name_field{grid-column:1!important}
.qct-simplified-checkout #billing_phone_field{grid-column:2!important}
.qct-simplified-checkout #billing_city_field{grid-column:1!important}
.qct-simplified-checkout #billing_email_field{grid-column:2!important}
.qct-simplified-checkout #billing_address_1_field{grid-column:1/-1!important}
.qct-simplified-checkout .woocommerce-billing-fields .form-row,
.qct-simplified-checkout .qct-checkout-notes .form-row,
.qct-simplified-checkout .woocommerce-additional-fields .form-row{
    float:none!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
}
.qct-simplified-checkout .woocommerce-billing-fields .form-row label,
.qct-simplified-checkout .qct-checkout-notes .form-row label,
.qct-simplified-checkout .woocommerce-additional-fields .form-row label{
    position:static!important;
    inset:auto!important;
    display:block!important;
    width:auto!important;
    height:auto!important;
    margin:0 0 6px!important;
    padding:0!important;
    transform:none!important;
    translate:none!important;
    scale:1!important;
    opacity:1!important;
    background:transparent!important;
    color:#334155!important;
    font-size:13px!important;
    line-height:1.35!important;
    font-weight:700!important;
    pointer-events:auto!important;
    clip:auto!important;
    clip-path:none!important;
    overflow:visible!important;
    white-space:normal!important;
}
.qct-simplified-checkout .woocommerce-billing-fields .woocommerce-input-wrapper,
.qct-simplified-checkout .qct-checkout-notes .woocommerce-input-wrapper,
.qct-simplified-checkout .woocommerce-additional-fields .woocommerce-input-wrapper{display:block!important;width:100%!important}
.qct-simplified-checkout .woocommerce-billing-fields input.input-text,
.qct-simplified-checkout .woocommerce-billing-fields select,
.qct-simplified-checkout .qct-checkout-notes textarea,
.qct-simplified-checkout .woocommerce-additional-fields textarea{
    position:static!important;
    width:100%!important;
    box-sizing:border-box!important;
    min-height:48px!important;
    height:48px!important;
    margin:0!important;
    padding:11px 13px!important;
    border:1px solid #cbd5e1!important;
    border-radius:8px!important;
    background:#fff!important;
    color:#172033!important;
    font-size:13px!important;
    line-height:1.35!important;
    box-shadow:none!important;
    transform:none!important;
    opacity:1!important;
}
.qct-simplified-checkout .woocommerce-billing-fields input.input-text::placeholder,
.qct-simplified-checkout .qct-checkout-notes textarea::placeholder,
.qct-simplified-checkout .woocommerce-additional-fields textarea::placeholder{color:#94a3b8!important;opacity:1!important}
.qct-simplified-checkout .woocommerce-billing-fields input.input-text:focus,
.qct-simplified-checkout .qct-checkout-notes textarea:focus,
.qct-simplified-checkout .woocommerce-additional-fields textarea:focus{
    border-color:#0b2a56!important;
    box-shadow:0 0 0 3px rgba(11,42,86,.08)!important;
    outline:0!important;
}
.qct-simplified-checkout .qct-checkout-notes{margin-top:15px!important}
.qct-simplified-checkout .qct-checkout-notes textarea,
.qct-simplified-checkout .woocommerce-additional-fields textarea{
    min-height:94px!important;
    height:94px!important;
    resize:vertical!important;
}
.qct-simplified-checkout #place_order{
    width:100%!important;
    min-height:48px!important;
    height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-weight:800!important;
}
@media(max-width:767px){
    :root{--qct-action-height:44px;--qct-primary-width:118px}
    .qct-simplified-checkout .woocommerce-billing-fields__field-wrapper{grid-template-columns:1fr!important;gap:12px!important}
    .qct-simplified-checkout #billing_first_name_field,
    .qct-simplified-checkout #billing_phone_field,
    .qct-simplified-checkout #billing_city_field,
    .qct-simplified-checkout #billing_email_field,
    .qct-simplified-checkout #billing_address_1_field{grid-column:1!important}
    .qct-simplified-checkout .woocommerce-billing-fields input.input-text{min-height:46px!important;height:46px!important;font-size:13px!important}
    .qct-whatsapp{right:max(13px,env(safe-area-inset-right));bottom:96px!important;min-height:50px;padding:8px 13px 8px 9px;font-size:14px}
    .qct-whatsapp--left{left:max(13px,env(safe-area-inset-left));right:auto}
    .qct-whatsapp__icon,.qct-whatsapp__icon svg{width:30px;height:30px}
    .qct-mobile-bar-present .qct-whatsapp{bottom:calc(var(--qct-mobile-bar-offset,96px) + env(safe-area-inset-bottom))!important}

    .qct-has-quick-buy .qct-action-row{gap:7px!important}
    .qct-has-quick-buy .qct-action-row .qct-action-add{order:2;flex:1 1 112px!important;width:auto!important;min-width:112px!important;max-width:none!important;font-size:13px!important;padding:0 9px!important}
    .qct-has-quick-buy .qct-action-row .qct-secondary-wrap{order:3!important;flex:0 0 var(--qct-action-height)!important}
    .qct-has-quick-buy .qct-action-row .qct-secondary-compare{order:4!important}
    .qct-has-quick-buy .qct-action-row .qct-action-quick{order:10!important;flex:1 0 100%!important;width:100%!important;min-width:100%!important;max-width:100%!important;margin:2px 0 0!important;font-size:13.5px!important}
    .qct-cart-icon,.qct-quick-buy__icon,.qct-cart-icon svg,.qct-quick-buy__icon svg{width:15px;height:15px;flex-basis:15px}

}

@media(max-width:370px){
    .qct-has-quick-buy .qct-action-row .qct-action-add{min-width:106px!important;font-size:12.5px!important;padding:0 7px!important}
    .qct-has-quick-buy .qct-action-row{gap:5px!important}
}

@media(prefers-reduced-motion:reduce){.qct-whatsapp--pulse::before,.qct-action-quick{animation:none!important}.qct-whatsapp,.qct-action-quick{transition:none!important}}
