/*
Theme Name: Weee
Author: Hadi Karimi
Version: 2.1
*/
:root {
    --primary-color: #007bff;
    --bg-color: #fcfcfc;
    --text-color: #333;
    --header-bg: #ffffff;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: Tahoma, Arial, sans-serif; }
body { direction: rtl; background: var(--bg-color); color: var(--text-color); overflow-x: hidden; padding-bottom: 70px; }
.weee-container { width: 100%; max-width: 100%; }

/* Header */
.weee-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: var(--header-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.hamburger-menu, .notification-bell { cursor: pointer; display: flex; align-items: center; justify-content: center; color: #333; }
.site-title a { text-decoration: none; color: #333; font-size: 20px; font-weight: bold; letter-spacing: 1px; }

/* Notification */
.notification-bell { position: relative; }
.notif-text { display: none; position: absolute; right: 0; top: 40px; background: #333; color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.notif-text.show { display: block; }

/* Side Menu - FIX */
.weee-side-menu {
    position: fixed !important;
    top: 0 !important;
    right: -320px;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 99999 !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.weee-side-menu.active { right: 0; }
.close-menu { display: flex; align-items: center; gap: 10px; background: #f8f9fa; color: #333; padding: 20px; cursor: pointer; font-weight: bold; border-bottom: 1px solid #eee; }
.menu-content ul { list-style: none; }
.menu-content ul li { border-bottom: 1px solid #f1f1f1; }
.menu-content ul li a { display: block; padding: 15px 20px; text-decoration: none; color: #444; font-size: 14px; }
.weee-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.4); z-index: 99998; opacity: 0; visibility: hidden; transition: 0.3s; }
.weee-overlay.active { opacity: 1; visibility: visible; }

/* Footer & Bottom Nav */
.weee-footer { background: #fff; padding: 30px 20px; text-align: center; margin-top: 50px; border-top: 1px solid #eee; }
.copyright { margin-top: 20px; font-size: 13px; color: #888; }

.sticky-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; box-shadow: 0 -2px 15px rgba(0,0,0,0.08); display: flex; justify-content: space-around; padding: 10px 0; z-index: 999; }
.sticky-bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #666; font-size: 11px; gap: 5px; }
.sticky-bottom-nav .nav-item svg { color: #555; }
/* --- Weee Homepage Styles (Version 3) --- */
.weee-section { margin: 25px 0; padding: 0 15px; }
.weee-section-title { display: flex; align-items: center; margin-bottom: 15px; }
.weee-section-title h3 { font-size: 16px; font-weight: bold; color: var(--text-color); margin: 0; }
.weee-section-title::before { content: ''; display: inline-block; width: 6px; height: 18px; background: var(--primary-color); margin-left: 8px; border-radius: 3px; }

/* Hero Slider (CSS Scroll Snap) */
.weee-hero-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; padding: 10px 15px; margin: 0 -15px; }
.weee-hero-slider::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 90%; scroll-snap-align: center; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.hero-slide img { width: 100%; height: 180px; object-fit: cover; display: block; }
.hero-slide .slide-content { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; padding: 15px; }
.hero-slide h3 { margin: 0; font-size: 16px; }

/* Categories Grid (3x3) */
.weee-categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #444; background: #fff; padding: 10px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.cat-img { width: 60px; height: 60px; border-radius: 50%; background: #f5f5f5; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card span { font-size: 12px; text-align: center; font-weight: bold; }

/* Product Carousel */
.weee-product-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; padding: 5px 15px 15px 15px; margin: 0 -15px; }
.weee-product-carousel::-webkit-scrollbar { display: none; }
.product-card { flex: 0 0 42%; scroll-snap-align: start; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.product-card a { text-decoration: none; color: inherit; }
.product-card img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 10px; }
.product-card h4 { font-size: 12px; margin: 0 0 8px 0; line-height: 1.4; height: 33px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card .price { font-size: 13px; font-weight: bold; color: var(--primary-color); direction: rtl; }
.product-card .price del { color: #999; font-size: 11px; margin-left: 5px; font-weight: normal; }

/* Blog Grid (2x2) */
.weee-blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.blog-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.blog-card a { text-decoration: none; color: inherit; }
.blog-img { width: 100%; height: 100px; background: #eee; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card h4 { font-size: 12px; padding: 10px; margin: 0; line-height: 1.5; }
/* --- Weee Homepage Styles (Version 3) --- */
.weee-section { margin: 25px 0; padding: 0 15px; }
.weee-section-title { display: flex; align-items: center; margin-bottom: 15px; }
.weee-section-title h3 { font-size: 16px; font-weight: bold; color: var(--text-color); margin: 0; }
.weee-section-title::before { content: ''; display: inline-block; width: 6px; height: 18px; background: var(--primary-color); margin-left: 8px; border-radius: 3px; }

/* Hero Slider (CSS Scroll Snap) */
.weee-hero-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; padding: 10px 15px; margin: 0 -15px; }
.weee-hero-slider::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 90%; scroll-snap-align: center; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.hero-slide img { width: 100%; height: 180px; object-fit: cover; display: block; }
.hero-slide .slide-content { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; padding: 15px; }
.hero-slide h3 { margin: 0; font-size: 16px; }

/* Categories Grid (3x3) */
.weee-categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #444; background: #fff; padding: 10px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.cat-img { width: 60px; height: 60px; border-radius: 50%; background: #f5f5f5; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card span { font-size: 12px; text-align: center; font-weight: bold; }

/* Product Carousel */
.weee-product-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; padding: 5px 15px 15px 15px; margin: 0 -15px; }
.weee-product-carousel::-webkit-scrollbar { display: none; }
.product-card { flex: 0 0 42%; scroll-snap-align: start; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.product-card a { text-decoration: none; color: inherit; }
.product-card img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 10px; }
.product-card h4 { font-size: 12px; margin: 0 0 8px 0; line-height: 1.4; height: 33px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card .price { font-size: 13px; font-weight: bold; color: var(--primary-color); direction: rtl; }
.product-card .price del { color: #999; font-size: 11px; margin-left: 5px; font-weight: normal; }

/* Blog Grid (2x2) */
.weee-blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.blog-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.blog-card a { text-decoration: none; color: inherit; }
.blog-img { width: 100%; height: 100px; background: #eee; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card h4 { font-size: 12px; padding: 10px; margin: 0; line-height: 1.5; }
/* ==================================================
   Weee Home Page Mobile Styles (Redesigned)
================================================== */
.weee-home-main { overflow-x: hidden; background: #f8f9fa; padding-bottom: 80px; }

/* 1. Slider */
.weee-home-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 20px; scrollbar-width: none; padding: 15px 15px 0 15px;}
.weee-home-slider::-webkit-scrollbar { display: none; }
.weee-slide { flex: 0 0 100%; scroll-snap-align: start; padding-left: 10px; box-sizing: border-box; }
.weee-slide:last-child { padding-left: 0; }
.weee-slide img { width: 100%; border-radius: 16px; height: auto; object-fit: cover; aspect-ratio: 21/9; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }

/* 2. Categories 3x3 */
.weee-home-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 0 15px 25px 15px; }
.weee-cat-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #333; gap: 8px; }
.weee-cat-card img { width: 75px; height: 75px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; background: #fff; padding: 3px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);}
.weee-cat-card .img-placeholder { width: 75px; height: 75px; border-radius: 50%; background: #cbd5e1; border: 2px dashed #94a3b8; }
.weee-cat-card span { font-size: 12px; text-align: center; font-weight: bold; color:#1e293b;}

/* 3. Product Sliders */
.weee-home-products { margin-bottom: 25px; background: #fff; padding: 20px 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;}
.weee-section-title { padding: 0 15px 15px 15px; }
.weee-section-title h3 { margin: 0; font-size: 17px; color: #0f172a; font-weight: 800;}
.weee-product-scroll { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 15px; gap: 15px; scrollbar-width: none; margin: 0; list-style: none;}
.weee-product-scroll::-webkit-scrollbar { display: none; }
.weee-product-scroll li.product { flex: 0 0 160px; scroll-snap-align: start; margin: 0; border: 1px solid #f1f5f9; border-radius: 12px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); background:#fff; position: relative;}
.weee-product-scroll li.product img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; }
.weee-product-scroll li.product .woocommerce-loop-product__title { font-size: 13px; line-height: 1.5; margin-bottom: 8px; color:#333; }
.weee-product-scroll li.product .price { font-size: 14px; font-weight: bold; color: #ef4444; display:block;}
.weee-product-scroll li.product .price del { font-size: 11px; color: #94a3b8; margin-right: 5px; font-weight:normal;}
.weee-product-scroll li.product .button { display: block; text-align: center; background: var(--weee-main-color, #0ea5e9); color: #fff; padding: 8px; border-radius: 8px; font-size: 12px; margin-top: 12px; text-decoration: none; font-weight:bold;}
.weee-product-scroll li.product .onsale { position: absolute; top: 10px; right: 10px; background: #ef4444; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: bold; z-index:9;}

/* 4. Blog Posts 2x2 */
.weee-home-blog { padding: 20px 15px; background: #fff; margin-bottom: 20px; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;}
.weee-blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.weee-blog-card { text-decoration: none; color: #333; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background:#f8fafc; box-shadow: 0 2px 4px rgba(0,0,0,0.02);}
.weee-blog-thumb img { width: 100%; height: 110px; object-fit: cover; display: block; }
.weee-blog-card h4 { font-size: 12px; padding: 12px; margin: 0; line-height: 1.6; color:#0f172a; font-weight:bold; text-align: justify;}

/* 5. Widgets */
.weee-home-widgets { padding: 20px 15px; background: #f1f5f9; margin-bottom:20px; border-radius: 16px; margin: 0 15px;}
.weee-widget { margin-bottom: 15px; }
.weee-widget-title { font-size: 15px; font-weight: bold; margin-bottom: 10px; color:#1e293b; }
/* ==================================================
   Weee Shop Page & Filters Styles
================================================== */
.weee-shop-main { background: #f8f9fa; padding-bottom: 80px; min-height: 100vh;}

/* Shop Toolbar */
.weee-shop-toolbar { background: #fff; padding: 15px; border-bottom: 1px solid #e2e8f0; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.02);}
.weee-shop-title { font-size: 18px; font-weight: 800; color: #0f172a; margin: 0 0 15px 0;}
.weee-shop-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px;}
.weee-btn-filter { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border: 1px solid #cbd5e1; padding: 8px 15px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: bold; color: #334155; flex: 1;}
.weee-ordering select { background: #f8fafc; border: 1px solid #cbd5e1; padding: 8px; border-radius: 8px; font-family: inherit; font-size: 12px; outline: none;}

/* Products Grid Override for Shop Page */
.weee-shop-products { padding: 0 15px;}
.weee-shop-products ul.products { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 15px; margin: 0; padding: 0; list-style: none;}
.weee-shop-products ul.products li.product { width: 100%; margin: 0; border: 1px solid #f1f5f9; border-radius: 12px; padding: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); position: relative; display: flex; flex-direction: column; justify-content: space-between;}
.weee-shop-products ul.products li.product img { width: 100%; border-radius: 8px; margin-bottom: 10px;}
.weee-shop-products ul.products li.product .woocommerce-loop-product__title { font-size: 13px; line-height: 1.5; margin-bottom: 8px; color:#333; }
.weee-shop-products ul.products li.product .price { font-size: 14px; font-weight: bold; color: #ef4444; margin-bottom: 10px;}
.weee-shop-products ul.products li.product .button { display: block; text-align: center; background: var(--weee-main-color, #0ea5e9); color: #fff; padding: 8px; border-radius: 8px; font-size: 12px; text-decoration: none; font-weight:bold; margin-top: auto;}

/* Pagination */
.weee-pagination { padding: 20px 0; text-align: center; }
.weee-pagination ul.page-numbers { display: flex; justify-content: center; gap: 5px; list-style: none; padding: 0; margin: 0;}
.weee-pagination ul.page-numbers li a, .weee-pagination ul.page-numbers li span { display: block; width: 35px; height: 35px; line-height: 35px; text-align: center; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; color: #334155; font-weight: bold; text-decoration: none;}
.weee-pagination ul.page-numbers li span.current { background: var(--weee-main-color, #0ea5e9); color: #fff; border-color: var(--weee-main-color, #0ea5e9);}

/* Filter Panel (Off-canvas) */
.weee-filter-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); z-index: 9998; opacity: 0; visibility: hidden; transition: 0.3s ease; backdrop-filter: blur(2px);}
.weee-filter-panel { position: fixed; top: 0; right: -320px; width: 300px; max-width: 80%; height: 100vh; background: #fff; z-index: 9999; transition: 0.3s ease; display: flex; flex-direction: column; box-shadow: -5px 0 15px rgba(0,0,0,0.1);}
.weee-filter-panel.open { right: 0; }
.weee-filter-overlay.open { opacity: 1; visibility: visible; }
.weee-filter-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e2e8f0; background: #f8fafc;}
.weee-filter-header h3 { margin: 0; font-size: 16px; font-weight: 800; color: #0f172a;}
.weee-filter-close { background: none; border: none; font-size: 20px; font-weight: bold; color: #64748b; padding: 0;}
.weee-filter-content { padding: 20px; flex-grow: 1; overflow-y: auto;}
.weee-filter-group { margin-bottom: 20px;}
.weee-filter-group label { display: block; font-size: 13px; font-weight: bold; color: #334155; margin-bottom: 8px;}
.weee-filter-group input[type="text"], .weee-filter-group select { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 13px; background:#f8fafc; outline:none; box-sizing:border-box;}
.weee-btn-submit-filter { width: 100%; background: var(--weee-main-color, #0ea5e9); color: #fff; border: none; padding: 12px; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: bold; margin-top: 10px;}
/* ==================================================
   Weee Bottom Navigation Fix (V4.1)
================================================== */
body {
    padding-bottom: 75px !important; /* جلوگیری از رفتن محتوا زیر فوتر */
}
.weee-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 12px 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 12px) !important;
    z-index: 99999 !important;
    border-top: 1px solid #f1f5f9;
}
.weee-bottom-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: bold !important;
    gap: 5px !important;
    transition: all 0.2s ease;
}
.weee-bottom-nav .nav-item svg {
    width: 24px !important;
    height: 24px !important;
}
.weee-bottom-nav .nav-item:hover,
.weee-bottom-nav .nav-item:active {
    color: var(--weee-main-color, #0ea5e9) !important;
}