/* =====================================================================
   v1.9.4 — بازبینی کامل موبایل (اندازه‌ی فونت، باکس‌ها، فاصله‌ها، لمس‌پذیری)
   این فایل آخر از همه بارگذاری می‌شود و فقط روی صفحه‌های کوچک اثر دارد.
   ===================================================================== */

/* ---------- تبلت: دسته‌ها ۳ ستون ---------- */
@media (min-width:701px) and (max-width:1100px){
  html body .fd-cats{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ---------- موبایل (≤700px) ---------- */
@media (max-width:700px){

  /* --- پایه --- */
  html body{font-size:15px;line-height:1.85}
  html body .fd-container,html body .fd-wrap{width:calc(100% - 28px)}
  html body .fd-section{padding:26px 0}
  html body .fd-sec-tight{padding:22px 0}
  html body h1{font-size:1.5rem}
  html body h2{font-size:1.25rem}
  html body h3{font-size:1.05rem}

  /* جلوگیری از زوم خودکار iOS و لمس‌پذیری بهتر */
  html body input:not([type=checkbox]):not([type=radio]):not([type=range]),
  html body select,html body textarea{font-size:16px;min-height:44px}
  html body textarea{min-height:96px}
  html body .fd-btn,html body .woocommerce a.button,html body .woocommerce button.button{min-height:44px;padding:10px 18px;font-size:.9rem}
  html body .fd-btn-sm{min-height:38px;padding:7px 14px;font-size:.82rem}
  html body .fd-btn-lg{padding:12px 18px;font-size:.92rem}

  /* --- نوار بالا و هدر --- */
  html body .fd-topbar{font-size:.74rem}
  html body .fd-topbar-in{min-height:32px;padding-block:4px;text-align:center;line-height:1.6}
  html body .fd-topbar-msg{gap:6px;min-width:0}
  html body .fd-header-in{padding:6px 12px;min-height:58px;gap:6px}
  html body .fd-logo img{height:36px}
  html body .fd-hact-icon,html body .fd-hact{padding:0;width:40px;height:40px;justify-content:center}
  html body .fd-menu-toggle{width:40px;height:40px}

  /* --- نوار پایین و دکمه‌ی بازگشت به بالا --- */
  html body{padding-bottom:60px}
  html body .fd-mbar{padding:4px 2px calc(4px + env(safe-area-inset-bottom))}
  html body .fd-mbar a,html body .fd-mbar button{font-size:.66rem;gap:1px;padding:4px 0;line-height:1.5}
  html body .fd-mbar svg{width:22px;height:22px}

  /* --- هیرو صفحه‌ی اصلی --- */
  html body .fd-hero2{padding:18px 0 92px}
  html body .fd-hero2-in{gap:18px}
  html body .fd-hero2-art{min-height:0;height:250px}
  html body .fd-art-stack{height:240px;width:min(280px,86%)}
  html body .fd-art-glow{width:240px;height:240px}
  html body .fd-art-cap{font-size:.62rem;padding:16px 6px 6px}
  html body .fd-pill{font-size:.74rem;padding:4px 12px;margin-bottom:10px}
  html body .fd-hero2 h1{font-size:clamp(1.4rem,6.2vw,1.75rem);line-height:1.65;margin-bottom:10px}
  html body .fd-hero2-sub{font-size:.88rem;line-height:1.9;margin-bottom:16px}
  html body .fd-hero2 .fd-hero-btns{gap:8px;margin-bottom:16px;flex-wrap:nowrap}
  html body .fd-hero2 .fd-hero-btns .fd-btn{flex:1 1 0;min-width:0;white-space:nowrap;padding:11px 8px;font-size:.86rem;gap:6px}
  html body .fd-hero2 .fd-hero-btns .fd-btn svg{width:15px;height:15px}
  html body .fd-hero2-search{padding:4px 4px 4px 4px;gap:4px;border-radius:8px}
  html body .fd-hero2-search svg{margin-inline:10px 0;width:18px;height:18px}
  html body .fd-hero2-search input{padding:8px 4px;text-overflow:ellipsis}
  html body .fd-hero2-search .fd-btn{min-height:40px;padding:8px 16px;font-size:.84rem;flex:none}
  html body .fd-hero2-tags{flex-wrap:nowrap;overflow-x:auto;gap:6px;margin-top:12px;font-size:.74rem;white-space:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html body .fd-hero2-tags::-webkit-scrollbar{display:none}
  html body .fd-hero2-tags a{padding:1px 10px;flex:none}
  html body .fd-hero2-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px;padding-top:16px}
  html body .fd-hero2-stats div{min-width:0;padding:10px 8px;border-radius:8px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12)}
  html body .fd-hero2-stats b{font-size:1.4rem;line-height:1.5}
  html body .fd-hero2-stats span{font-size:.76rem}

  /* --- مزیت‌ها --- */
  html body .fd-perks2{margin-top:-60px}
  html body .fd-perks2-card{padding:4px}
  html body .fd-perk2{padding:12px 14px;gap:12px}
  html body .fd-perk2+.fd-perk2{border-top:1px solid var(--fd-line)}
  html body .fd-perk2 .fd-ico-box{width:42px;height:42px}
  html body .fd-perk2 b{font-size:.9rem}
  html body .fd-perk2 small{font-size:.74rem;line-height:1.7}

  /* --- سرتیتر بخش‌ها --- */
  html body .fd-sh{margin-bottom:20px}
  html body .fd-sh-k{font-size:.72rem;padding:2px 12px;margin-bottom:8px}
  html body .fd-sh h2{font-size:1.2rem;margin-bottom:4px}
  html body .fd-sh h2::after{width:44px;height:3px;margin-top:8px}
  html body .fd-sh p{font-size:.86rem;margin-top:6px}

  /* --- دسته‌بندی‌ها: کارت عمودی و هم‌اندازه --- */
  html body .fd-cats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  html body .fd-cat{flex-direction:column;justify-content:flex-start;text-align:center;gap:8px;padding:14px 8px 12px;min-height:118px}
  html body .fd-cat-ico{width:46px;height:46px}
  html body .fd-cat-ico svg{width:24px;height:24px}
  html body .fd-cat b{font-size:.84rem;line-height:1.65}
  html body .fd-cat small{font-size:.72rem;display:block}

  /* --- کاشی‌های بنتو --- */
  html body .fd-bento{gap:12px}
  html body .fd-tile{padding:18px;min-height:0;border-radius:8px}
  html body .fd-tile-ico{width:48px;height:48px;margin-bottom:12px}
  html body .fd-tile h3{font-size:1.1rem;margin:0 0 6px}
  html body .fd-tile p{font-size:.84rem;line-height:1.85;margin-bottom:12px}
  html body .fd-tile-go{font-size:.84rem}

  /* --- تب‌ها و ردیف کتاب‌ها --- */
  html body .fd-tabbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:4px;padding:4px;margin-bottom:18px}
  html body .fd-tabbar::-webkit-scrollbar{display:none}
  html body .fd-tab{flex:1 0 auto;white-space:nowrap;padding:8px 14px;font-size:.82rem}
  html body .fd-books-row{gap:10px}
  html body ul.products.fd-books.fd-books-row>li.product,
  html body .fd-books-row>li.product{width:152px!important;min-width:152px!important;max-width:152px!important}

  /* --- پیشنهاد ویژه --- */
  html body .fd-sale2,html body .fd-sale{padding:20px 16px;gap:14px}
  html body .fd-sale2-cover,html body .fd-sale-cover{width:118px}
  html body .fd-sale2 h2{font-size:1.2rem}
  html body .fd-sale2-au{font-size:.84rem}
  html body .fd-sale2 .fd-sale-price{font-size:1.15rem;margin:6px 0 12px}

  /* --- خدمات --- */
  html body .fd-svc-grid{gap:12px}
  html body .fd-svc{padding:16px}
  html body .fd-svc-ico{width:50px;height:50px;margin-bottom:10px}
  html body .fd-svc h3{font-size:.98rem}
  html body .fd-svc p{font-size:.84rem;margin-bottom:12px}
  html body .fd-svc-foot{padding-top:10px}

  /* --- مراحل: ۲ ستون فشرده --- */
  html body .fd-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 10px}
  html body .fd-step{padding:0 4px}
  html body .fd-step-ico{width:62px;height:62px;margin-bottom:12px}
  html body .fd-step-ico svg{width:26px;height:26px}
  html body .fd-step-n{width:24px;height:24px;font-size:.74rem;inset-inline-start:calc(50% + 14px)}
  html body .fd-step h3{font-size:.92rem;margin-bottom:4px}
  html body .fd-step p{font-size:.78rem;line-height:1.8}

  /* --- نویسندگان --- */
  html body .fd-authors{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  html body .fd-author{padding:10px 4px}
  html body .fd-author img{width:62px;height:62px}
  html body .fd-author b{font-size:.78rem}
  html body .fd-author small{font-size:.68rem}

  /* --- مقاله‌ها --- */
  html body .fd-posts,html body .fd-posts-2{gap:14px}
  html body .fd-post-body{padding:14px}
  html body .fd-post-body h3{font-size:.96rem;line-height:1.75}
  html body .fd-post-body p{font-size:.84rem;line-height:1.85}
  html body .fd-post-cat{font-size:.68rem}
  html body .fd-post-meta{font-size:.74rem;gap:10px}

  /* --- بنر دعوت به اقدام --- */
  html body .fd-cta2,html body .fd-cta{padding:22px 16px;gap:14px;flex-direction:column;align-items:stretch}
  html body .fd-cta2 h2{font-size:1.15rem;line-height:1.7}
  html body .fd-cta2 p{font-size:.86rem}
  html body .fd-cta2 .fd-btn,html body .fd-cta .fd-btn{width:100%}

  /* --- هدر صفحه‌های داخلی --- */
  html body .fd-ph-in{padding-block:18px 20px}
  html body .fd-page-head.fd-ph h1{font-size:1.35rem;line-height:1.55}
  html body .fd-page-head.fd-ph .fd-ph-desc{font-size:.84rem;line-height:1.9}
  html body .fd-ph-eyebrow{font-size:.72rem;padding:3px 10px}
  html body .fd-ph .fd-breadcrumb ol{font-size:.74rem;padding:4px 10px;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  html body .fd-ph .fd-breadcrumb ol::-webkit-scrollbar{display:none}
  html body .fd-ph-chips li{font-size:.72rem;padding:3px 10px}
  html body .fd-ph-pills a{font-size:.78rem;padding:6px 12px}
  html body .fd-ph-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  html body .fd-ph-btn{justify-content:center;padding:10px 8px;font-size:.8rem;min-height:42px}

  /* --- محتوای صفحه‌ها و نوشته‌ها --- */
  html body .fd-content{font-size:.94rem;line-height:1.95}
  html body .fd-content h2{font-size:1.25rem;margin-top:1.4em}
  html body .fd-content h3{font-size:1.08rem}
  html body .fd-content table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  html body .fd-content iframe,html body .fd-content video{max-width:100%}
  html body .woocommerce-pagination ul li a,html body .woocommerce-pagination ul li span{min-width:38px;height:38px;padding:0 8px}

  /* --- فروشگاه --- */
  html body .fd-toolbar{padding:8px 10px;gap:6px}
  html body .fd-filter-btn{min-height:40px;padding:8px 14px;font-size:.84rem}
  html body ul.products{gap:10px 8px}
  html body .fd-bc-media{margin:5px 5px 0;padding:10px 8px 8px}
  html body .fd-bc-body{padding:8px 10px 12px}
  html body .fd-bc-title{font-size:.8rem;line-height:1.7;height:3.4em;min-height:3.4em;max-height:3.4em}
  html body .fd-bc-author{font-size:.7rem}
  html body .fd-bc .price,html body .fd-bc-price{font-size:.9rem}
  html body .fd-bc .button,html body .fd-bc a.add_to_cart_button{min-height:38px;padding:7px 8px;font-size:.76rem}
  html body .fd-badges{top:8px;inset-inline-start:8px;font-size:.68rem}

  /* --- صفحه‌ی تک‌کتاب --- */
  html body .fd-single-media{max-width:300px;padding:14px}
  html body .product_title,html body .fd-single-title{font-size:1.3rem;line-height:1.65}
  html body .fd-single-price .price{font-size:1.4rem}
  html body .fd-buybox{padding:12px}
  html body .woocommerce-tabs ul.tabs{display:flex!important;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html body .woocommerce-tabs ul.tabs::-webkit-scrollbar{display:none}
  html body .woocommerce-tabs ul.tabs li{flex:none}
  html body .woocommerce-tabs ul.tabs li a{white-space:nowrap;padding:9px 12px!important;font-size:.82rem}
  html body .fd-specs th,html body .fd-specs td{padding:9px 10px;font-size:.84rem;line-height:1.8}
  html body .fd-specs th{width:38%}
  html body .fd-sticky-atc{padding:8px 12px}
  html body .fd-cmp-bar{padding:8px 12px}

  /* --- سبد، پرداخت، حساب کاربری --- */
  html body .woocommerce-MyAccount-content{padding:16px 12px}
  html body .woocommerce table.shop_table_responsive tr td,
  html body .woocommerce table.shop_table_responsive tr th{padding:9px 12px!important;font-size:.86rem}
  html body .woocommerce .cart-collaterals .cart_totals{padding:14px 12px}
  html body .woocommerce-message,html body .woocommerce-info,html body .woocommerce-error{padding:12px 14px;font-size:.86rem}
  html body .fd-modal-box{padding:18px 14px}

  /* --- فرم‌های صفحه‌های تماس/درباره --- */
  html body .fdc-card{border-radius:8px}
  html body .fda-intro,html body .fda-sec{gap:14px}
}

/* ---------- گوشی‌های خیلی کوچک (≤380px) ---------- */
@media (max-width:380px){
  html body .fd-hero2 h1{font-size:1.35rem}
  html body .fd-hero2 .fd-hero-btns .fd-btn{font-size:.8rem;padding:10px 6px}
  html body .fd-hero2-stats b{font-size:1.25rem}
  html body .fd-cats{gap:8px}
  html body .fd-cat b{font-size:.8rem}
  html body ul.products.fd-books.fd-books-row>li.product,
  html body .fd-books-row>li.product{width:140px!important;min-width:140px!important;max-width:140px!important}
  html body .fd-steps{gap:16px 8px}
  html body .fd-step-ico{width:54px;height:54px}
  html body .fd-authors{grid-template-columns:repeat(2,minmax(0,1fr))}
  html body .fd-mbar a,html body .fd-mbar button{font-size:.62rem}
}

/* ---------- افقی گوشی ---------- */
@media (max-width:900px) and (orientation:landscape) and (max-height:480px){
  html body .fd-hero2-art{height:200px}
  html body .fd-art-stack{height:190px}
}
