/* Folmart Quick Shop v1.3.1 */

/* ── Baloo Da 2 Font ── */
@import url('https://fonts.googleapis.com/css2?family=Baloo+Da+2:wght@400;500;600;700;800&display=swap');

/* ── Hide WC "View Cart" button after add to cart ── */
.woocommerce ul.products li.product .added_to_cart,
ul.products li.product .added_to_cart { display: none !important; }

/* ── Hide WC default buttons (all cases) ── */
.woocommerce ul.products li.product .fqs-trigger-btn ~ a.button,
.woocommerce ul.products li.product .fqs-trigger-btn ~ .added_to_cart,
.added_to_cart.wc-forward,
.loop-add-to-cart-btn.button.product_type_simple.add_to_cart_button,
.loop-add-to-cart-btn.button.product_type_variable.add_to_cart_button,
.products .product.outofstock .loop-add-to-cart-btn.button.product_type_variable,
.products .product.outofstock .loop-add-to-cart-btn.button.product_type_simple {
    display: none !important;
}

/* ── Hide Add to Cart & Select Options buttons on all product cards ── */
.woocommerce ul.products li.product a.button.add_to_cart_button,
.woocommerce ul.products li.product a.button.product_type_simple,
.woocommerce ul.products li.product a.button.product_type_variable,
.woocommerce ul.products li.product a.button.product_type_grouped,
.woocommerce ul.products li.product a.button.product_type_external,
.woocommerce ul.products li.product .added_to_cart,
ul.products li.product a.add_to_cart_button,
ul.products li.product a.ajax_add_to_cart,
ul.products li.product .button[data-product_id] {
    display: none !important;
}

/* ── Hide WooCommerce success/added-to-cart notices ── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-message {
    display: none !important;
}

/* ── Trigger Button ── */
.fqs-trigger-btn {
    display: block !important;
    width: 100% !important;
    margin-top: 6px !important;
    background: #16A851 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 9px 16px !important;
    font-family: 'Baloo Da 2', cursive !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: 0.04em !important;
    cursor: pointer !important;
    transition: background 0.18s, box-shadow 0.18s !important;
    box-shadow: 0 3px 10px rgba(22,168,81,0.28) !important;
    text-align: center !important;
    line-height: 1.4 !important;
}
.fqs-trigger-btn:hover {
    background: #119e46 !important;
    box-shadow: 0 5px 16px rgba(22,168,81,0.4) !important;
}

/* ── Overlay ── */
.fqs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,6,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.fqs-overlay.fqs-active {
    opacity: 1;
    pointer-events: all;
}

/* ── Popup — NO jump: transform শুধু opacity-র সাথে, translateY নেই ── */
.fqs-popup {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    padding: 24px 22px 20px;
    position: relative;
    opacity: 0;
    /* scale শুধু — কোনো translateY নেই যেন jump না হয় */
    transform: scale(0.96);
    transition: transform 0.22s ease, opacity 0.22s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    font-family: 'Baloo Da 2', cursive;
    max-height: 88vh;
    overflow-y: auto;
    /* content shift prevent করতে */
    will-change: transform, opacity;
}
.fqs-overlay.fqs-active .fqs-popup {
    transform: scale(1);
    opacity: 1;
}

/* ── Close ── */
.fqs-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 30px; height: 30px;
    background: #f0ebe0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
    padding: 0;
    font-family: 'Baloo Da 2', cursive;
}
.fqs-close:hover { background: #e0d8c8; color: #1a1a1a; }

/* ── Header ── */
.fqs-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.fqs-img {
    width: 76px; height: 76px;
    background: #fff8e8;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fqs-img img { width: 100%; height: 100%; object-fit: cover; }
.fqs-info { flex: 1; min-width: 0; }
.fqs-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 6px;
    word-break: break-word;
    font-family: 'Baloo Da 2', cursive;
}
.fqs-price-row { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.fqs-price {
    font-size: 19px; font-weight: 700; color: #1a1a1a;
    font-family: 'Baloo Da 2', cursive;
}
.fqs-price ins { text-decoration: none; }
.fqs-old-price { font-size: 13px; color: #bbb; font-family: 'Baloo Da 2', cursive; }
.fqs-old-price del { text-decoration: line-through; }
.fqs-stock {
    font-size: 11px; font-weight: 600;
    margin-top: 5px;
    padding: 2px 9px;
    border-radius: 50px;
    display: inline-block;
    font-family: 'Baloo Da 2', cursive;
}
.fqs-stock.in-stock  { background: #e8f8ee; color: #1a8a44; }
.fqs-stock.out-stock { background: #fde8e8; color: #c0392b; }

/* ── FOMO Box ── */
.fomo-box {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #f0f7ff;
    border: 1px solid #0A3174;
    border-radius: 10px;
    padding: 8px 12px;
    color: #0A3174;
    font-weight: 500;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,49,120,0.08);
    /* smooth fade — no layout jump */
    transition: opacity 0.35s ease;
    font-family: 'Baloo Da 2', cursive;
}
.fomo-emoji {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}
.fomo-box span#fqsFomoText {
    margin: 0;
    font-size: 15px !important;
    font-family: 'Baloo Da 2', cursive;
    line-height: 1.3;
}
.fomo-box span#fqsFomoText strong {
    font-size: 15px !important;
}

/* ── Divider ── */
.fqs-divider { border: none; border-top: 1.5px solid #f0ebe0; margin: 4px 0 12px; }

/* ── Section Label ── */
.fqs-section-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em; color: #bbb;
    text-transform: uppercase; margin-bottom: 9px;
    font-family: 'Baloo Da 2', cursive;
}

/* ── Variations ── */
.fqs-variations-wrap { margin-bottom: 14px; }
.fqs-variations { display: flex; flex-direction: column; gap: 7px; }
.fqs-variation {
    border: 2px solid #ede7d8;
    border-radius: 11px;
    padding: 10px 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.16s;
    background: #fff;
    user-select: none;
    font-family: 'Baloo Da 2', cursive;
}
.fqs-variation:hover { border-color: #f5c518; background: #fffcf0; }
.fqs-variation.fqs-selected { border-color: #1a1a1a; background: #1a1a1a; }
.fqs-variation.fqs-oos { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.fqs-var-radio {
    width: 19px; height: 19px;
    border-radius: 50%;
    border: 2px solid #d0c8b8;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; flex-shrink: 0;
    transition: all 0.16s; color: transparent;
}
.fqs-variation.fqs-selected .fqs-var-radio { background: #f5c518; border-color: #f5c518; color: #1a1a1a; }
.fqs-var-label { flex: 1; font-size: 13px; font-weight: 500; color: #333; font-family: 'Baloo Da 2', cursive; }
.fqs-variation.fqs-selected .fqs-var-label { color: #fff; }
.fqs-var-price { font-size: 13px; font-weight: 700; color: #1a1a1a; font-family: 'Baloo Da 2', cursive; }
.fqs-variation.fqs-selected .fqs-var-price { color: #f5c518; }

/* ── Action Row ── */
.fqs-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.fqs-qty {
    display: flex; align-items: center;
    background: #f5f0e8;
    border-radius: 50px;
    padding: 4px;
    flex-shrink: 0;
}
.fqs-qty-btn {
    width: 34px; height: 34px;
    border: none; background: transparent;
    border-radius: 50%; font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #333; transition: background 0.14s;
    line-height: 1; padding: 0;
    font-family: 'Baloo Da 2', cursive;
}
.fqs-qty-btn:hover { background: #e8e0cc; }
.fqs-qty-num {
    width: 30px; text-align: center;
    font-size: 15px; font-weight: 700;
    color: #1a1a1a; user-select: none;
    font-family: 'Baloo Da 2', cursive;
}

/* ── Add to Cart Button ── */
.fqs-add-btn {
    flex: 1;
    background: #f5c518;
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    font-family: 'Baloo Da 2', cursive;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.fqs-add-btn:hover:not(:disabled) { background: #e8b800; box-shadow: 0 5px 18px rgba(245,197,24,0.38); }
.fqs-add-btn.fqs-adding { background: #f0ebe0; color: #999; cursor: wait; }
.fqs-add-btn.fqs-added  { background: #1a1a1a; color: #f5c518; }
.fqs-add-btn.fqs-error  { background: #fde8e8; color: #c0392b; }
.fqs-add-btn:disabled   { cursor: not-allowed; opacity: 0.55; }

/* ── View Link ── */
.fqs-view-link {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; width: 100%; border: none; background: none;
    color: #bbb; font-family: 'Baloo Da 2', cursive;
    font-size: 12px; font-weight: 500;
    cursor: pointer; padding: 5px;
    text-decoration: none; transition: color 0.14s;
}
.fqs-view-link:hover { color: #1a1a1a; }

/* ── Toast ── */
.fqs-toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: #fff;
    padding: 11px 24px;
    border-radius: 50px;
    font-family: 'Baloo Da 2', cursive;
    font-size: 13px; font-weight: 500;
    z-index: 9999999;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    transition: transform 0.3s ease;
    pointer-events: none;
    max-width: 88vw;
    text-align: center;
}
.fqs-toast.fqs-toast-show { transform: translateX(-50%) translateY(0); }
.fqs-toast.fqs-toast-error { background: #c0392b; }
.fqs-toast .fqs-hl { color: #f5c518; }

/* Body lock */
.fqs-body-lock { overflow: hidden !important; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .fqs-popup { padding: 22px 16px 18px; border-radius: 18px; max-width: 100%; }
    .fqs-img { width: 64px; height: 64px; }
    .fqs-name { font-size: 15px; }
    .fqs-price { font-size: 17px; }
    .fqs-qty-btn { width: 30px; height: 30px; }
    .fqs-qty-num { width: 26px; font-size: 14px; }
    .fqs-add-btn { font-size: 12px; padding: 11px 12px; }
    .fomo-box span#fqsFomoText { font-size: 15px !important; }
    .fomo-box span#fqsFomoText strong { font-size: 15px !important; }
}
@media (max-width: 360px) {
    .fqs-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
