/*
Theme Name: BaneMiner Theme
Author: hadi
Description: Custom WooCommerce theme with Tailwind
Version: 1.0
*/

/* اصلاح عرض سایت و حاشیه */
.container {
    max-width: 1380px !important;   /* عرض استاندارد */
    width: 100% !important;
    padding-right: 25px !important; /* فاصله از راست */
    padding-left: 25px !important;  /* فاصله از چپ */
    margin-right: auto !important;
    margin-left: auto !important;
}

/* در موبایل فاصله کمی کمتر باشد */
@media (max-width: 768px) {
    .container {
        padding-right: 15px !important;
        padding-left: 15px !important;
    }
}

/* کلاس مخفی کردن متن برای سئو (Screen Reader Only) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* جلوگیری از اسکرول افقی و نمایش منوی مخفی */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
}

/* =================================================
   اصلاح نهایی ماشین حساب (Grid Layout)
   ================================================= */

/* 1. کانتینر اصلی */
.calculator-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff; /* پس زمینه سفید یکدست */
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    width: 100% !important;
    max-width: 100% !important; /* اطمینان از تمام عرض بودن */
}

/* 2. حالت دسکتاپ (کنار هم) */
@media (min-width: 1024px) {
    .calculator-wrapper {
        display: grid !important;
        grid-template-columns: 1.2fr 0.8fr; /* ستون ورودی‌ها کمی پهن‌تر از نتایج */
        gap: 40px !important;
        align-items: start; /* تراز از بالا */
    }

    /* باکس ورودی‌ها */
    .miner-calculator-container {
        width: 100% !important;
        max-width: none !important;
        border: 1px solid #f0f0f0;
        padding: 30px !important;
        border-radius: 20px;
    }

    /* باکس نتایج */
    .results-container {
        display: block !important; /* همیشه نمایش داده شود تا فضا اشغال کند */
        width: 100% !important;
        max-width: none !important;
        background: #f8fafc !important; /* رنگ پس زمینه متفاوت برای تمایز */
        padding: 30px !important;
        border-radius: 20px;
        border: 2px dashed #e2e8f0; /* کادر نقطه چین شیک */
        
        /* حالت چسبان */
        position: sticky !important;
        top: 100px !important;
    }
}

/* 3. استایل ورودی‌ها (زیباسازی) */
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
    font-size: 14px;
}
.input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s ease;
}
.input-group input:focus {
    background: #fff;
    border-color: #0d9488; /* رنگ سبز کله‌غازی */
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* 4. دکمه محاسبه */
#calculateBtn {
    width: 100%;
    background: #0d9488;
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: hover 0.3s;
    margin-top: 10px;
}
#calculateBtn:hover {
    background: #0f766e;
}

/* 5. استایل نتایج */
#results-output {
    display: block !important; /* جلوگیری از مخفی شدن توسط JS */
}
.result-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}
.result-line:last-child {
    border-bottom: none;
}
.result-line strong {
    font-family: monospace;
    font-size: 18px;
    color: #0d9488;
}


/* 2. لینک‌ها و آیتم‌های منو */
footer ul li {
    font-size: 15px !important;      /* سایز فونت لینک‌ها (موبایل) */
    color: #374151 !important;       /* خاکستری تیره (خیلی خواناتر از قبل) */
    margin-bottom: 12px !important;  /* فاصله عمودی بیشتر بین لینک‌ها */
    font-weight: 500 !important;     /* کمی ضخیم‌تر */
}

/* 3. آیکون تیک دایره‌ای کنار لینک‌ها */
footer ul li svg {
    width: 20px !important;          /* آیکون بزرگتر */
    height: 20px !important;
    color: #0d9488 !important;       /* تغییر رنگ آیکون به سبز کله‌غازی (جذاب‌تر) */
    min-width: 20px;                 /* جلوگیری از جمع شدن آیکون */
}

/* 4. رفتار هاور (وقتی موس روی لینک می‌رود) */
footer ul li:hover {
    color: #dc2626 !important;       /* قرمز شدن متن هنگام هاور */
    transform: translateX(-5px);     /* کمی حرکت به سمت چپ */
}

/* 5. تنظیمات مخصوص دسکتاپ (مانیتور) */
@media (min-width: 1024px) {
    /* تیترها در دسکتاپ خیلی بزرگتر */
    footer .font-bold.text-gray-800 {
        font-size: 22px !important;
    }
    
    /* لینک‌ها در دسکتاپ بزرگتر */
    footer ul li {
        font-size: 16px !important;
    }
}

/* استایل منوی شناور موبایل */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    display: block;
}

/* فقط در دسکتاپ مخفی شود */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
}

.mobile-nav-blur-box {
    background-color: rgba(255, 255, 255, 0.9); /* سفید ۹۰ درصد */
    backdrop-filter: blur(10px); /* افکت شیشه‌ای */
    -webkit-backdrop-filter: blur(10px); /* برای سافاری */
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #374151; /* خاکستری */
    text-decoration: none;
    font-size: 10px;
    font-weight: bold;
    transition: color 0.3s;
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
}

.mobile-nav-item:hover {
    color: #dc2626; /* قرمز */
}

/* رنگ‌بندی منوی موبایل */

/* 1. واتساپ (سبز) */
.nav-whats { color: #25D366 !important; }

/* 2. اینستاگرام (صورتی مایل به قرمز) */
.nav-insta { color: #E1306C !important; }

/* 3. تماس (سبز تیره یا آبی) */
/* اگر سبز می‌خواهید این کد را بگذارید: */
.nav-call { color: #008f39 !important; }

/* 4. خانه (خاکستری تیره) */
.nav-home { color: #4b5563 !important; }

/* در حالت هاور (اگر لمس طولانی شود) */
.nav-whats:active { color: #128C7E !important; }
.nav-insta:active { color: #C13584 !important; }

/* --- اصلاح گالری تصاویر ووکامرس (نسخه CSS خالص) --- */

/* 1. کانتینر اصلی */
.woocommerce-product-gallery {
    position: relative !important;
    width: 100% !important;
}

/* 2. عکس اصلی بزرگ */
.woocommerce-product-gallery__image {
    border-radius: 1.5rem !important; /* معادل rounded-3xl */
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important; /* معادل border-gray-200 */
    margin-bottom: 1rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
}

.woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

/* 3. لیست تصاویر کوچک (افقی کردن لیست) */
.woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important; /* معادل gap-3 */
    margin-top: 35px !important;
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    list-style: none !important;
    justify-content: center !important; /* در موبایل وسط‌چین */
}

/* در دسکتاپ چپ‌چین شود */
@media (min-width: 768px) {
    .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs {
        justify-content: flex-start !important;
    }
}

/* 4. آیتم‌های عکس کوچک */
.woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li {
    width: 80px !important; /* معادل w-20 */
    height: 80px !important; /* معادل h-20 */
    flex-shrink: 0 !important;
    border-radius: 12px !important; /* معادل rounded-xl */
    overflow: hidden !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    float: none !important; /* خنثی کردن استایل ووکامرس */
    margin: 0 !important;
}

/* 5. خود عکس‌های کوچک */
.woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.6 !important;
    transition: all 0.2s ease !important;
}

/* 6. هاور و حالت فعال */
.woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img:hover,
.woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img.flex-active {
    opacity: 1 !important;
    border: 2px solid #dc2626 !important; /* رنگ قرمز (معادل red-600) */
    border-radius: 12px !important;
}

/* =========================================
   استایل ویژگی‌های محصول (سایز بزرگتر)
   ========================================= */

/* استایل کلی لیست */
ul.dina-features-ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem; /* gap-3 */
    padding: 0;
    margin: 0;
    list-style: none;
}

/* در دسکتاپ دو ستونه شود */
@media (min-width: 768px) {
    ul.dina-features-ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* استایل هر آیتم */
ul.dina-features-ul li {
    background-color: #f9fafb; /* bg-gray-50 */
    padding: 0.75rem; /* p-3 */
    border-radius: 0.75rem; /* rounded-xl */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #f3f4f6; /* border-gray-100 */
    transition: all 0.3s;
}

ul.dina-features-ul li:hover {
    border-color: #d1d5db; /* hover:border-gray-300 */
}

/* --- فونت‌ها (بخش مهم برای سایز) --- */

/* عنوان ویژگی (مثلا: مدل) */
ul.dina-features-ul li span.ftitle {
    font-weight: 700; /* bold */
    color: #111827; /* gray-900 */
    font-size: 14px; /* موبایل */
}

/* مقدار ویژگی (مثلا: M60) */
ul.dina-features-ul li span.fdesc {
    color: #374151; /* gray-700 */
    font-weight: 500; /* medium */
    font-size: 14px; /* موبایل */
    direction: ltr;
    text-align: left;
}

/* سایز فونت در دسکتاپ (بزرگتر) */
@media (min-width: 768px) {
    ul.dina-features-ul li span.ftitle {
        font-size: 16px !important; /* معادل text-base */
    }
    ul.dina-features-ul li span.fdesc {
        font-size: 16px !important; /* معادل text-base */
    }
}
