/* ========================================================
   1. FRONTEND FORM CORE STYLES (Your Original CSS)
   ======================================================== */
.wqo-form-container { background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); padding: 24px; margin: 20px 0; transition: all 0.3s ease; border: 1px solid #f0f0f0; }
.wqo-form-container h3 { margin-top: 0; font-size: 1.2rem; color: #333; margin-bottom: 16px; }
.wqo-form-group { margin-bottom: 16px; position: relative; }
.wqo-form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: #555; }

.wqo-form-group input, .wqo-form-group textarea, .wqo-form-group select { 
    width: 100%; 
    border: 1px solid var(--wqo-btn-bg) !important; 
    border-radius: 8px; 
    transition: all 0.3s; 
    font-size: 1rem; 
    box-sizing: border-box; 
    min-height: 45px; 
}

.wqo-form-container input[type="email"], .wqo-form-container input[type="date"], .wqo-form-container input[type="search"], .wqo-form-container input[type="number"], .wqo-form-container input[type="text"], .wqo-form-container input[type="tel"], .wqo-form-container input[type="url"], .wqo-form-container input[type="password"], .wqo-form-container textarea, .wqo-form-container select {
    padding: 0px 15px 0px 35px !important;
}
.wqo-form-container textarea { padding: 12px 15px 12px 35px !important; min-height: 80px; }

.wqo-form-group input:focus, .wqo-form-group textarea:focus { box-shadow: none !important; border: 2px solid var(--wqo-btn-bg) !important; outline: none; }

.wqo-input-icon { position: absolute; top: 13px; left: 10px; color: var(--wqo-btn-bg); display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; pointer-events: none; }
.wqo-input-icon svg { width: 100%; height: 100%; }

.wqo-btn { width: 100%; background: var(--wqo-btn-bg) !important; color: var(--wqo-btn-text) !important; border: none; padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: background 0.3s ease; display: flex; justify-content: center; align-items: center; gap: 8px; }
.wqo-btn:hover { background: var(--wqo-btn-hover) !important; color: var(--wqo-btn-text) !important; }
.wqo-btn:disabled { background: #999 !important; cursor: not-allowed; }
.wqo-btn svg { width: 20px; height: 20px; }

.wqo-notice { padding: 10px; border-radius: 6px; margin-bottom: 15px; display: none; font-size: 0.9rem; }
.wqo-error { background: #fee; border: 1px solid #fcc; color: #c00; }
.wqo-price-preview { font-size: 0.9rem; color: #666; margin-bottom: 15px; padding: 10px; background: #f9f9f9; border-radius: 6px; }

@media (max-width: 480px) { .wqo-form-container { padding: 16px; } }

/* ========================================================
   2. BUNDLE WIDGET UI (Header, Slots, Wrapper)
   ======================================================== */
.wqo-bundle-wrapper { background: #fff; border: 1px solid var(--wqo-bundle-bg, #1d2327); border-radius: 4px; margin-bottom: 20px; overflow: hidden; font-family: var(--wqo-font-family); }
.wqo-bundle-header { background: var(--wqo-bundle-bg, #1d2327); color: var(--wqo-bundle-color, #ffffff); padding: 12px 15px; font-weight: 500; font-size:16px; display:flex; align-items:center; gap:8px; }
.wqo-bundle-slots { display: flex; align-items: center; padding: 20px 15px; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
.wqo-bundle-slot { width: 90px; height: 90px; background: #f5f5f5; border: 1px solid #eaeaea; border-radius: 6px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; background-size: cover; background-position: center; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.wqo-bundle-slot:hover { border-color: var(--wqo-btn-bg, #2271b1); }
.wqo-plus { font-size: 28px; color: #ccc; font-weight:300; }
.wqo-slot-separator { font-weight: bold; color: #1d2327; font-size:16px; margin: 0 5px; }
.wqo-free-badge { position: absolute; top: -10px; right: -10px; font-size: 11px; padding: 4px 8px; border-radius: 4px; font-weight: bold; z-index: 2; }

/* ========================================================
   3. BUNDLE POPUP MODAL & PRODUCTS
   ======================================================== */
.wqo-modal { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.7); z-index: 99999999 !important; display: none; align-items: center; justify-content: center; font-family: var(--wqo-font-family); }
.wqo-modal-content { background: #fff; width: 95%; max-width: 700px; height: 85vh; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.wqo-modal-header { padding: 15px 20px; border-bottom: 1px solid #f0f0f1; display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 18px; color:#1d2327; }
.wqo-modal-close { cursor: pointer; font-size: 28px; line-height: 1; color:#a7aaad; }
.wqo-modal-close:hover { color:#d63638; }
.wqo-modal-search { padding: 15px 20px; border-bottom: 1px solid #f0f0f1; background:#fff; display: flex; flex-direction: column; gap: 10px; }
.wqo-modal-search input { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size:14px; box-sizing:border-box; outline:none; }
.wqo-modal-search input:focus { border-color:var(--wqo-btn-bg, #2271b1); }

.wqo-modal-products { padding: 20px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; align-content: start; grid-auto-rows: max-content; }
.wqo-bundle-product-card { border: 1px solid #eaeaea; border-radius: 6px; cursor: pointer; transition: 0.2s; background:#fff; overflow:hidden; display: flex; flex-direction: column; min-height: 220px; }
.wqo-bundle-product-card:hover { border-color: var(--wqo-btn-bg, #2271b1); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.wqo-bpc-img { text-align:center; padding-top: 15px; flex-shrink: 0; }
.wqo-bpc-img img { max-width: 100%; height: 120px; object-fit: contain; }
.wqo-bpc-info { padding: 10px 15px 15px; text-align: left; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.wqo-bpc-info h5 { margin: 0 0 8px; font-size: 13px; color:#333; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-weight:400; flex-grow: 1; }
.wqo-bpc-price { color: var(--wqo-btn-bg, #d63638); font-weight: 700; font-size: 14px; line-height: 1.5 !important; padding-bottom: 2px; }

/* ========================================================
   4. TAGS FILTER (Scroll Horizontal & Clear Button)
   ======================================================== */
.wqo-tags-filter-wrap { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 5px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wqo-tags-filter-wrap::-webkit-scrollbar { display: none; }
.wqo-tag-filter-btn { display: flex; align-items: center; justify-content: center; align-content: center; flex-wrap: wrap; flex-shrink: 0; background: #f1f1f1; color: #555; border: 1px solid #ddd; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; transition: 0.2s; user-select: none; white-space: nowrap; }
.wqo-tag-filter-btn:hover { background: #e5e5e5; }
.wqo-tag-filter-btn.active { background: var(--wqo-bundle-bg, #1d2327); color: var(--wqo-bundle-color, #ffffff); border-color: var(--wqo-bundle-bg, #1d2327); }
.wqo-tag-clear-btn { flex-shrink: 0; background: #fff4f4; color: #d63638; border: 1px solid #f5c6cb; padding: 6px 12px; border-radius: 20px; font-size: 14px; font-weight: 900; cursor: pointer; transition: 0.2s; user-select: none; white-space: nowrap; display: none; align-items: center; justify-content: center; }
.wqo-tag-clear-btn:hover { background: #d63638; color: #fff; }

/* ========================================================
   5. UPSELL WIDGET STYLES
   ======================================================== */
.wqo-upsell-box { font-family: var(--wqo-font-family); background: #fffcf5; border: 2px dashed #f5c6cb; padding: 15px; margin-bottom: 15px; border-radius: 6px; cursor: pointer; transition: 0.3s; }
.wqo-upsell-box:hover { border-color: var(--wqo-btn-bg, #d63638); background: #fff4f4; }
.wqo-upsell-title { display: block; color: var(--wqo-btn-bg, #d63638); font-weight: 700; margin-bottom: 5px; font-size: 15px; line-height: 1.2; }
.wqo-upsell-desc { font-size: 13px; color: #333; line-height: 1.4; display: block; }
.wqo-upsell-img-wrap { border: 2px solid transparent; transition: all 0.3s ease; position: relative; }
input#wqo-upsell-checkbox:checked + .wqo-upsell-img-wrap { border-color: var(--wqo-btn-bg, #d63638); box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 8px; }
.wqo-upsell-img-wrap.wqo-oos-active::after { content: "✖"; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); color: #ff4d4d; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900; z-index: 10; }
.wqo-upsell-img-wrap.wqo-oos-active img { filter: grayscale(100%) brightness(60%); }
.wqo-upsell-oos-text { display: none; color: #d63638; font-size: 13px; font-weight: 700; margin-top: 8px; padding: 6px 10px; background: #fff4f4; border: 1px dashed #d63638; border-radius: 4px; text-align: center; }

/* ========================================================
   6. COUPON SYSTEM STYLES
   ======================================================== */
.wqo-coupon-trigger { text-align: center; margin: 15px 0; font-size: 14px; cursor: pointer; color: var(--wqo-input-color); text-decoration: underline; transition: 0.3s; }
.wqo-coupon-trigger:hover { color: var(--wqo-btn-bg, #000); }
.wqo-coupon-wrap { display: none; margin-bottom: 15px; position: relative; }
.wqo-coupon-input-group { display: flex; align-items: stretch; gap: 5px; }
.wqo-coupon-input-group input { flex-grow: 1; margin: 0 !important; border-radius: 4px; border: 1px solid #ddd; padding: 10px 15px; font-size: var(--wqo-font-size-input) !important; text-transform: uppercase; color: var(--wqo-input-color) !important; }
.wqo-coupon-input-group input:focus { border-color: var(--wqo-btn-bg, #000); outline: none; }
.wqo-coupon-btn { background-color: var(--wqo-btn-bg, #000) !important; color: var(--wqo-btn-text, #ffffff) !important; border: none; border-radius: 4px; padding: 0 20px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.wqo-coupon-btn:hover { background-color: var(--wqo-btn-hover, #333) !important; color: var(--wqo-btn-hover-text, var(--wqo-btn-text, #ffffff)) !important; }
.wqo-coupon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.wqo-coupon-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wqo-coupon-msg { display: none; font-size: 13px; margin-top: 5px; text-align: left; }
.wqo-coupon-msg.success { color: #46b450; display: block; }
.wqo-coupon-msg.error { color: #d63638; display: block; }

/* ========================================================
   7. STICKY BUTTON (MOBILE)
   ======================================================== */
#wqo-sticky-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; background: #ffffff; padding: 12px 15px; box-shadow: 0 -2px 10px rgba(0,0,0,0.08); z-index: 999999; transform: translateY(100%); transition: transform 0.3s ease-in-out; box-sizing: border-box; }
#wqo-sticky-wrapper.wqo-show { transform: translateY(0); }
#wqo-sticky-btn { display: block; width: 100%; background: var(--wqo-sticky-bg); color: var(--wqo-sticky-text); text-align: center; padding: 15px; font-family: var(--wqo-font-family); font-weight: var(--wqo-font-weight-btn); font-size: var(--wqo-font-size-btn); text-transform: uppercase; border-radius: 4px; box-sizing: border-box; cursor: pointer; text-decoration: none; border: none; }
@media (min-width: 769px) { #wqo-sticky-wrapper { display: none !important; } }

/* Validation Error Styles */
#wqo-form .wqo-error-field, #wqo-form .wqo-error-field:focus, #wqo-form .wqo-error-field:focus-visible, #wqo-form .wqo-error-field:active { 
    box-shadow: 0 0 6px #ff000073 !important; 
    border-color: #ff0000 !important; 
    outline: none !important; 
    transition: box-shadow 0.3s ease, border-color 0.3s ease; 
}