/*
Theme Name: Samen Fast
Theme URI: https://samen-shop.local
Author: Asmary IT
Version: 1.0.0
*/

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

html, body {
    font-family: 'Vazirmatn', sans-serif !important;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

/* اسکرول‌بار نرم و مخفی برای اسلایدرها */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom Horizontal Scrollbar for Categories */
[class*="overflow-x-auto"], .category-scroll-wrapper {
    scrollbar-width: thin !important;
    scrollbar-color: #16a34a #f1f5f9 !important;
    padding-bottom: 6px;
}
[class*="overflow-x-auto"]::-webkit-scrollbar, .category-scroll-wrapper::-webkit-scrollbar {
    height: 5px !important;
    display: block !important;
}
[class*="overflow-x-auto"]::-webkit-scrollbar-track, .category-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 8px;
}
[class*="overflow-x-auto"]::-webkit-scrollbar-thumb, .category-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #16a34a !important;
    border-radius: 8px;
}

/* Global Mobile Fixes */
@media (max-width: 640px) {
    .container, body {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: clip !important;
    }
    .single-product-container {
        padding-bottom: 90px !important;
    }
}

/* ======================================================== */
/* اصلاح نهایی چیدمان موبایل، اسکرول دسته‌ها و منوی پایین   */
/* ======================================================== */
@media (max-width: 768px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip !important;
    }

    body {
        padding-bottom: 95px !important;
    }

    main, .site-main, .content-area, .woocommerce, .woocommerce-page {
        padding-bottom: 85px !important;
    }

    /* نوار اسکرول تمیز دسته‌ها بدون اسکرول‌بار مرورگر */
    .no-scrollbar::-webkit-scrollbar {
        display: none !important;
    }
    .no-scrollbar {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* جلوگیری از برش یا افتادن تصویر در صفحه تکی */
    .single-product img {
        max-height: 250px !important;
        width: auto !important;
        margin: 0 auto !important;
        object-fit: contain !important;
    }

    /* اطمینان از قرارگیری دکمه روی لایه مناسب و نرفتن پشت منو */
    .single-product button,
    .single-product .single_add_to_cart_button {
        position: relative !important;
        z-index: 10 !important;
        margin-bottom: 15px !important;
    }

    /* نوار ثابت پایین */
    .bottom-nav, nav.fixed.bottom-0, .fixed.bottom-0 {
        z-index: 50 !important;
    }
}

/* Fix bottom navigation spacing */
@media (max-width: 768px) {
}
/* استایل کارت‌های روش ارسال در صفحه تسویه حساب */
ul#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 1rem 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

ul#shipping_method li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

ul#shipping_method li:hover {
    border-color: #10b981;
    background-color: #f0fdf4;
}

ul#shipping_method li input[type="radio"] {
    margin-left: 0.75rem;
    accent-color: #059669;
    width: 1.1rem;
    height: 1.1rem;
}

ul#shipping_method li label {
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0;
}
/* دکمه شناور بله ه */
.samen-bale-float {
    position: fixed;
    bottom: 54px;          /* در دسکتاپ نزدیک‌تر به گوشه ولی کاملاً داخل صفحه */
    left: 300px;            /* فاصله استاندارد از لبه */
    z-index: 999;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.samen-bale-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;      /* مرکزچین عمودی */
    justify-content: center;  /* مرکزچین افقی */
    flex-shrink: 0;           /* جلوگیری از له شدن دایره */
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.35);
    border: 2px solid #ffffff;
    box-sizing: border-box;   /* مهم: بوردر داخل ابعاد حساب شود */
    overflow: hidden;         /* لوگو هرگز از دایره بیرون نزند */
}

/* آیکون داخل دایره */
.samen-bale-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.samen-bale-float:hover {
    transform: scale(1.06);  /* اسکیل کل دکمه، نه جدا شدن آیکون */
}

.samen-bale-tooltip {
    background-color: #1e293b;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    margin-left: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
}

.samen-bale-float:hover .samen-bale-tooltip {
    opacity: 1;
    visibility: visible;
}

/* موبایل */
@media (max-width: 768px) {
    .samen-bale-float {
        bottom: 80px;
        left: 16px;
    }
    .samen-bale-icon {
        width: 46px;
        height: 46px;
    }
    .samen-bale-icon svg {
        width: 24px;
        height: 24px;
    }
    .samen-bale-tooltip {
        display: none;
    }
}
/* دکمه همبرگری هدر */
#samen-hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* لایه تاریک پس‌زمینه */
#samen-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#samen-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* کشوی منو (از سمت راست باز می‌شود) */
.samen-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    /* مخفی در بیرون صفحه */
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.samen-drawer.open {
    right: 0;
}

/* هدر کشو */
.samen-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.samen-drawer-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #222;
}

#samen-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* بدنه و لیست دسته‌بندی‌ها */
.samen-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.samen-drawer-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.samen-drawer-categories li {
    border-bottom: 1px solid #f1f1f1;
}

.samen-drawer-categories li a {
    display: block;
    padding: 12px 0;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.samen-drawer-categories li a:hover {
    color: #e52d27;
    /* رنگ سازمانی سایت شما */
}
/* چسبان کردن هدر موبایل */
@media (max-width: 768px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 9999;
        background: #fff;
        /* رنگ زمینه هدر، تا محو دیده نشود */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}
.site-header,
header.sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
}
html, body {
  overflow-x: clip;
}
