/* =========================================
   RESET & BASE STYLES
   ========================================= */
:root {
    --bofb-primary: #2ecc71;
    --bofb-text-title: #2d3436;
    --bofb-text-price: #2ecc71;
    --bofb-text-desc: #636e72;
}

.bofb-wrapper {
    direction: rtl !important;
    font-family: inherit !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-bottom: 120px !important;
    min-height: 100vh !important;
}

.bofb-wrapper * {
    box-sizing: border-box !important;
    outline: none !important;
}

/* =========================================
   1. تب‌های بالا (شیشه‌ای)
   ========================================= */
.bofb-tabs-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding: 15px 20px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    margin: 0 !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
}

.bofb-tab-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 18px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 50px !important;
    color: #555 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.bofb-tab-item.active {
    background: var(--bofb-primary) !important;
    color: #fff !important;
    border-color: var(--bofb-primary) !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4) !important;
}

.bofb-tab-icon-wrapper svg {
    width: 100% !important;
    height: 100% !important;
    fill: currentColor !important;
    display: block !important;
}

/* =========================================
   2. گرید محصولات
   ========================================= */
.bofb-tabs-content { padding: 25px !important; }

.products-grid {
    display: grid !important;
    gap: 25px !important;
    width: 100% !important;
    align-items: stretch !important;
}

@media (max-width: 767px) { .products-grid { grid-template-columns: 1fr !important; } }
@media (min-width: 768px) { .products-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (min-width: 1600px) { .products-grid { grid-template-columns: repeat(3, 1fr) !important; } }

/* =========================================
   3. کارت محصول
   ========================================= */
.product-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    margin: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    transition: box-shadow 0.3s ease !important;
}

/* استاتیک (بدون حرکت) فقط سایه */
.product-card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15) !important;
    border-color: var(--bofb-primary) !important;
    transform: none !important; 
}

.prod-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    gap: 22% !important;
}

.prod-img {
    width: 30% !important;
    height: 100% !important;
    min-width: 120px !important;
    border-radius: 12px !important;
    object-fit: cover !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    filter: drop-shadow(2px 7px 5px rgba(0, 0, 0, 0.5)) !important;
}

.prod-details {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex: 1 !important;
    text-align: right !important;
}

.prod-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--bofb-text-title) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.prod-desc-box {
    padding: 10px 20px !important;
    font-size: 13px !important;
    color: var(--bofb-text-desc) !important;
    line-height: 1.6 !important;
    background: rgba(255,255,255,0.3) !important;
    text-align: right !important;
}
.prod-desc-box p { margin: 0 !important; }

/* =========================================
   4. لیست متغیرها
   ========================================= */
.vars-list {
    padding: 5px 20px 20px 20px !important;
    background: transparent !important;
    flex: 1 !important;
}

.var-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 0 !important;
    border-bottom: 1px dashed rgba(0,0,0,0.1) !important;
    gap: 15px !important;
}
.var-row:last-child { border-bottom: none !important; }

.var-info-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.var-thumb {
    width: 20% !important;
    height: 20% !important;
    min-width: 50px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    margin: 0 !important;
    border: none !important;
    filter: drop-shadow(2px 7px 5px rgba(0, 0, 0, 0.5)) !important;
}

.var-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    text-align: right !important;
}

.var-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--bofb-text-title) !important;
    margin: 0 !important;
    text-align: center !important;
}

.var-price {
    font-size: 13px !important;
    color: var(--bofb-text-desc) !important;
    margin-top: 4px !important;
}
.var-price bdi { color: var(--bofb-text-price) !important; font-weight: bold !important; }

/* =========================================
   5. کنترلر تعداد
   ========================================= */
.qty-control {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    height: 32px !important;
    width: 90px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.qty-btn {
    width: 28px !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: var(--bofb-text-title) !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    transition: background 0.2s !important;
}
.qty-btn:hover { background-color: rgba(0,0,0,0.05) !important; }

.qty-minus { border-right: 1px solid rgba(0,0,0,0.1) !important; }
.qty-plus { border-left: 1px solid rgba(0,0,0,0.1) !important; }

.qty-input {
    flex: 1 !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--bofb-text-title) !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }

/* =========================================
   6. فوتر چسبان
   ========================================= */
.sticky-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.6) !important;
    padding: 15px 30px !important;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.1) !important;
    z-index: 99999 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.total-section { display: flex !important; flex-direction: column !important; }
.total-label { font-size: 12px !important; color: #888 !important; text-align: center !important; }
.total-price { font-size: 22px !important; font-weight: 800 !important; color: var(--bofb-text-price) !important; }

.action-buttons { display: flex !important; gap: 12px !important; }

/* استایل دکمه‌ها - دقیقاً مطابق طراحی */
.btn,
.template-mgr-btn {
    position: relative !important;
    width: auto !important;
    height: 50px !important;
    padding: 0 25px !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    background: hsla(0, 0%, 0%, 0.89) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 30px !important;
    color: #222121 !important;
    z-index: 1 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    overflow: hidden !important;
    transition: 0.8s !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    cursor: pointer !important;
}

.btn:hover,
.template-mgr-btn:hover {
    letter-spacing: 3px !important;
}

/* Gradient shine effect */
.btn::before,
.template-mgr-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 50% !important;
    height: 100% !important;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.308), transparent) !important;
    transform: skewX(45deg) translateX(0) !important;
    transition: 0.8s !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.btn:hover::before,
.template-mgr-btn:hover::before {
    transform: skewX(45deg) translateX(200%) !important;
}

/* Neon glow effects - با box-shadow */
.btn-primary {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 0 0 0 rgba(255, 31, 113, 0) !important;

    background-color: #059212 !important;
}

.btn-primary:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 -50px 0 0 rgba(255, 31, 113, 0.1),
                0 0 5px #059212,
                0 0 15px #059212,
                0 0 30px #05921365,
                0 0 60px #05921346 !important;
}

.btn-secondary {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 0 0 0 rgba(43, 210, 255, 0) !important;
    background-color: #FF9013 !important;
}

.btn-secondary:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 50px 0 0 rgba(43, 210, 255, 0.1),
                0 0 5px #FF9013,
                0 0 15px #FF9013,
                0 0 30px #ff911386,
                0 0 60px #ff911352 !important;
}

.template-mgr-btn {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 0 0 0 rgba(30, 255, 69, 0) !important;
    background-color: #ffd900 !important;
}

.template-mgr-btn:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 -50px 0 0 rgba(30, 255, 69, 0.1),
                0 0 5px #FFD700,
                0 0 15px #FFD700,
                0 0 30px #ffd9007a,
                0 0 60px #ffd9002f !important;
}

.btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    flex-shrink: 0 !important;
}
.btn-icon img {
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}
.btn-icon svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    fill: currentColor !important;
}

/* =========================================
   7. نوتیفیکیشن‌ها (وسط چین)
   ========================================= */
.bofb-toast-container {
    position: fixed !important;
    top: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important; /* وسط چین افقی */
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
}

.bofb-toast {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 4px solid #2ecc71 !important; /* نوار رنگی پایین */
    padding: 12px 30px !important;
    border-radius: 50px !important; /* کاملا گرد (کپسولی) */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #444 !important;
    min-width: auto !important;
    white-space: nowrap !important;
    animation: bofb-slideDown 0.3s ease forwards !important;
    text-align: center !important;
}
.bofb-toast.error { border-bottom-color: #e74c3c !important; }

@keyframes bofb-slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* =========================================
   8. مودال‌های کاستوم (مخفی پیش‌فرض)
   ========================================= */
.bofb-custom-modal-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    background: rgba(0,0,0,0.4) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 100000 !important;
    display: none; /* مهم: مخفی */
    align-items: center !important;
    justify-content: center !important;
}

.bofb-custom-modal {
    background: #fff !important;
    padding: 30px !important;
    border-radius: 20px !important;
    width: 90% !important;
    max-width: 400px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    text-align: center !important;
    animation: bofb-popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative !important;
}

@keyframes bofb-popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.bofb-modal-title { font-size: 18px !important; font-weight: 800 !important; margin-bottom: 10px !important; color: #2d3436 !important; }
.bofb-modal-desc { font-size: 14px !important; color: #636e72 !important; margin-bottom: 20px !important; }

.bofb-modal-input {
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #dfe6e9 !important;
    border-radius: 10px !important;
    margin-bottom: 25px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    background: #f9f9f9 !important;
}

.bofb-modal-actions { display: flex !important; gap: 10px !important; justify-content: center !important; }

.bofb-btn-confirm {
    position: relative !important;
    width: auto !important;
    height: 45px !important;
    background: #1eff4491 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 0 0 0 rgba(30, 255, 69, 0) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: none !important;
    border-right: none !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    color: #000000 !important;
    padding: 10px 25px !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    flex: 1 !important;
    font-size: 14px;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    letter-spacing: 1px !important;
    overflow: hidden !important;
    transition: 0.8s !important;
    z-index: 1 !important;
}

.bofb-btn-confirm:hover {
    letter-spacing: 3px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 -50px 0 0 rgba(30, 255, 69, 0.1),
                0 0 5px #1eff45,
                0 0 15px #1eff45,
                0 0 30px #1eff45,
                0 0 60px #1eff45 !important;
}

/* Gradient shine */
.bofb-btn-confirm::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 50% !important;
    height: 100% !important;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.15), transparent) !important;
    transform: skewX(45deg) translateX(0) !important;
    transition: 0.8s !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.bofb-btn-confirm:hover::before {
    transform: skewX(45deg) translateX(200%) !important;
}

.bofb-btn-cancel {
    position: relative !important;
    width: auto !important;
    height: 45px !important;
    background: #ff1f7181 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 0 0 0 rgba(255, 31, 113, 0) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: none !important;
    border-right: none !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    color: #000000 !important;
    padding: 10px 25px !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    flex: 1 !important;
    letter-spacing: 1px !important;
    overflow: hidden !important;
    transition: 0.8s !important;
    z-index: 1 !important;
}

.bofb-btn-cancel:hover {
    letter-spacing: 3px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                inset 0 50px 0 0 rgba(255, 31, 113, 0.1),
                0 0 5px #ff1f71,
                0 0 15px #ff1f71,
                0 0 30px #ff1f71,
                0 0 60px #ff1f71 !important;
}

/* Gradient shine */
.bofb-btn-cancel::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 50% !important;
    height: 100% !important;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.15), transparent) !important;
    transform: skewX(45deg) translateX(0) !important;
    transition: 0.8s !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.bofb-btn-cancel:hover::before {
    transform: skewX(45deg) translateX(200%) !important;
}

/* موبایل */
@media (max-width: 600px) {
    .prod-img { width: 30% !important; height: 100% !important; min-width: 100px !important; }
    .sticky-footer { flex-direction: column !important; gap: 12px !important; padding: 15px 20px !important; }
    .action-buttons { width: 100% !important; }
    .btn { flex: 1 !important; }
    .total-section { width: 100% !important; flex-direction: row !important; justify-content: space-between !important; border-bottom: 1px solid rgba(0,0,0,0.05) !important; padding-bottom: 10px !important; }
    
    .template-mgr-btn {
        position: absolute !important;
        top: -45px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: #00000091 !important;
        color: #fff !important;
        padding: 6px 16px !important;
        border-radius: 30px !important;
        font-size: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    }
}