/* ==========================================================
   نقش‌دست — بهینه‌سازی موبایل (آخرین فایل استایل)
   ========================================================== */

/* ---------- ابعاد اثر (همه‌ی اندازه‌ها) ---------- */
.dims{margin:16px 0;border-radius:22px;background:linear-gradient(135deg,var(--blush),#f6ecff);padding:14px 16px;box-shadow:0 0 0 1px var(--blush-2) inset}
.dims-t{display:flex;align-items:center;gap:8px;font-weight:800;font-size:14.5px;margin-bottom:10px}
.dims-t span{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#fff;font-size:16px}
.dims-t small{margin-inline-start:auto;color:var(--muted);font-weight:500;font-size:12px}
.dims-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:8px}
.dims-g>div{background:#fff;border-radius:16px;padding:10px 6px;text-align:center;box-shadow:0 6px 14px -12px rgba(214,90,133,.8)}
.dims-g b{display:block;font-size:22px;font-weight:800;line-height:1.4;color:var(--accent-d)}
.dims-g small{display:block;color:var(--ink-2);font-size:12.5px}
.dims-g.one>div b{font-size:16px}

/* ---------- موبایل ---------- */
@media (max-width:860px){
  html,body{overflow-x:clip}
  body.page-product{padding-bottom:150px}
  input,select,textarea{font-size:16px}          /* جلوگیری از زوم خودکار iOS */

  /* مسیر صفحه: یک خط، قابل اسکرول */
  .crumbs{flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;scrollbar-width:none;padding-top:12px;font-size:12.5px}
  .crumbs::-webkit-scrollbar{display:none}
  .crumbs b{overflow:hidden;text-overflow:ellipsis;max-width:46vw}

  /* چیدمان صفحه‌ی محصول: گالری، بعد کارت اطلاعات */
  .pdp{display:flex;flex-direction:column;gap:14px;padding:0;background:none;border:0;box-shadow:none;border-radius:0;margin-top:6px}
  .pdp-gallery{width:100%}
  .pdp-gallery .zoom{aspect-ratio:1/1;max-height:64vh;border-radius:28px;border:0;background:#fff!important;box-shadow:0 14px 30px -24px rgba(214,90,133,.7),0 0 0 1px var(--blush-2)}
  .pdp-gallery .zoom img{object-fit:contain;padding:10px}
  .thumbs{gap:8px;padding:2px 2px 6px;margin-top:10px;scroll-snap-type:x proximity}
  .thumbs button{flex:0 0 58px;border-radius:14px;scroll-snap-align:start}
  .g-nav{width:36px;height:36px}
  .pdp-info{background:#fff;border-radius:28px;padding:18px 16px;box-shadow:0 14px 30px -26px rgba(214,90,133,.7),0 0 0 1px var(--blush-2)}
  .pdp-cat{padding:2px 12px;border-radius:999px;background:var(--accent-l);font-size:12.5px}
  .pdp-info h1{font-size:21px;line-height:1.6;margin:8px 0 4px}
  .pdp-short{font-size:14px;margin:0}
  .dims{margin:14px 0}
  .specs-chips{grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
  .specs-chips li{padding:8px 12px;border-radius:14px}
  .specs-chips b{font-size:13.5px}

  /* جعبه‌ی خرید */
  .buy-box{padding:14px;border-radius:22px}
  .buy-price .now{font-size:26px}
  .buy-row{flex-direction:row;align-items:stretch;gap:10px}
  .buy-row .qty{align-self:stretch;flex:none}
  .buy-row .btn{min-height:50px;padding-inline:14px;font-size:15px;white-space:nowrap}
  .buy-box .perks{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 0;padding:0;list-style:none;justify-content:flex-start}
  .buy-box .perks li{font-size:12px;padding:4px 10px;border-radius:999px;background:#fff;box-shadow:0 0 0 1px var(--line)}

  /* نوار خرید چسبان: فقط وقتی دکمه‌ی اصلی دیده نمی‌شود */
  .sticky-buy{transition:transform .25s,opacity .25s;border-radius:22px 22px 0 0;padding:10px 14px}
  .sticky-buy.hide{transform:translateY(120%);opacity:0;pointer-events:none}
  .sticky-buy .btn{min-height:46px;padding-inline:22px;border-radius:999px}

  /* تب‌ها */
  .tabs{border-radius:26px;margin-top:16px}
  .tab-heads{scrollbar-width:none}
  .tab-heads::-webkit-scrollbar{display:none}
  .tab-heads button{flex:1 0 auto;padding:14px 16px;font-size:14px}
  .tab-body{padding:16px;font-size:14.5px;line-height:2}
  .spec-table th{width:36%;font-size:13.5px;padding:10px 12px}
  .spec-table td{font-size:14px;padding:10px 12px}

  /* بخش‌های ویژه (اتاق، اندازه‌ی واقعی، داستان …) */
  .room,.ndx,.tr-wrap,.photowall,.story-card{max-width:100%;overflow:hidden}
  .room-stage,.tr-stage,.ph-stage{max-width:100%}
  img,svg,canvas,video{max-width:100%}

  /* کارت‌های مشابه */
  .hscroll .pcard{flex-basis:158px}
  .sec-head h2{font-size:19px}

  /* هدر ثابت و بازتر */
  .toasts{bottom:calc(76px + env(safe-area-inset-bottom))}
}

@media (max-width:380px){
  .specs-chips{grid-template-columns:1fr}
  .dims-g b{font-size:19px}
  .buy-row .btn{font-size:14px}
}
