/* =========================================================
   نسخه موبایل — اپ‌مانند، کارت‌های رنگی، شیت‌های کشویی
   ========================================================= */
body.is-mobile { background: #f6f2ec; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.m-top { position: sticky; top: 0; z-index: 100; background: rgba(246,242,236,.94); backdrop-filter: blur(14px); padding: 10px 14px 10px; padding-top: calc(10px + env(safe-area-inset-top)); }
.m-top-row { display: flex; align-items: center; gap: 10px; }
.m-logo { font-family: var(--display); font-size: 25px; line-height: 1; display: flex; align-items: center; gap: 7px; }
.m-logo .sun { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd98a, var(--sun) 60%, var(--sun-deep)); display: grid; place-items: center; font-size: 17px; color: #7a4300; box-shadow: 0 0 0 4px var(--sun-soft); }
.m-icon-btn { width: 42px; height: 42px; border-radius: 14px; border: 0; background: #fff; font-size: 19px; position: relative; display: grid; place-items: center; box-shadow: 0 2px 8px -4px rgba(0,0,0,.15); margin-right: auto; }
.m-icon-btn + .m-icon-btn { margin-right: 0; }
.m-icon-btn .cnt { position: absolute; top: -5px; left: -5px; background: var(--sale); color: #fff; font-size: 11px; font-weight: 800; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; }
.m-search { margin-top: 10px; position: relative; }
.m-search input { width: 100%; height: 46px; border-radius: 16px; border: 0; background: #fff; padding: 0 44px 0 14px; box-shadow: 0 4px 14px -8px rgba(0,0,0,.2); outline: none; font-size: 15px; }
.m-search .ico { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); }

/* هیرو اسلایدی */
.m-hero { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 14px 4px; scrollbar-width: none; }
.m-hero::-webkit-scrollbar, .m-chips::-webkit-scrollbar, .m-stories::-webkit-scrollbar, .m-hscroll::-webkit-scrollbar { display: none; }
.m-banner { flex: 0 0 88%; scroll-snap-align: center; height: 190px; border-radius: 24px; position: relative; overflow: hidden; color: #fff; display: flex; align-items: flex-end; padding: 18px; }
.m-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,6,2,.8), transparent 70%); }
.m-banner div { position: relative; z-index: 2; }
.m-banner b { font-family: var(--display); font-weight: 400; font-size: 26px; display: block; line-height: 1.2; }
.m-banner span { font-size: 13px; opacity: .9; }

/* استوری دسته‌بندی‌ها */
.m-stories { display: flex; gap: 14px; overflow-x: auto; padding: 16px 14px 6px; scrollbar-width: none; }
.m-story { flex: 0 0 auto; width: 68px; text-align: center; font-size: 12px; font-weight: 600; }
.m-story .ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--sun), var(--sale), #8b5cf6, var(--sun)); margin-bottom: 5px; }
.m-story .ring div { width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 3px solid #fff; display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.m-story .ring img { width: 100%; height: 100%; object-fit: cover; }
.m-story.on .ring { background: var(--ink); }

.m-sec { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 10px; }
.m-sec h3 { margin: 0; font-size: 18px; font-weight: 800; }
.m-sec a { font-size: 13px; color: var(--sun-deep); font-weight: 700; }

/* شگفت‌انگیز افقی */
.m-deals { margin: 6px 14px; border-radius: 24px; background: linear-gradient(135deg, #e5383b, #9d1229); padding: 14px 0 14px 0; }
.m-deals-head { color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 14px 10px; }
.m-deals-head b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.m-hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.m-hscroll > * { flex: 0 0 150px; scroll-snap-align: start; }

/* چیپ‌های فیلتر */
.m-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 12px; scrollbar-width: none; position: sticky; top: 118px; z-index: 50; background: #f6f2ec; }
.m-chip { flex: 0 0 auto; border: 0; background: #fff; border-radius: 30px; padding: 8px 15px; font-size: 13.5px; font-weight: 600; box-shadow: 0 2px 8px -5px rgba(0,0,0,.25); }
.m-chip.on { background: var(--ink); color: #fff; }
.m-chip.filter { background: var(--sun); color: #2a1700; }

/* گرید کارت‌های رنگی */
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px; }
.mc { border-radius: 22px; overflow: hidden; position: relative; background: var(--tint, #fff); padding: 7px; transition: transform .2s; box-shadow: 0 6px 18px -12px rgba(0,0,0,.35); }
.mc:active { transform: scale(.97); }
.mc-media { position: relative; aspect-ratio: 4/5; border-radius: 17px; overflow: hidden; background: rgba(255,255,255,.5); }
.mc-media img { width: 100%; height: 100%; object-fit: cover; }
.mc-off { position: absolute; top: 8px; right: 8px; }
.mc-season { position: absolute; bottom: 8px; right: 8px; background: rgba(255,255,255,.92); border-radius: 20px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; }
.mc-fav { position: absolute; top: 7px; left: 7px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 15px; }
.mc-fav.on { color: var(--sale); }
.mc-body { padding: 8px 5px 3px; }
.mc-title { font-weight: 700; font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mc-type { font-size: 11px; color: var(--ink-2); opacity: .75; }
.mc-foot { display: flex; align-items: end; justify-content: space-between; margin-top: 3px; }
.mc .price-new { font-size: 14.5px; }
.mc .price-old { font-size: 11.5px; }
.mc-dots { display: flex; gap: 2px; padding-bottom: 4px; }
.mc-dots .dot { width: 11px; height: 11px; }
.m-more { display: block; margin: 16px auto; }

/* ناوبری پایین */
.m-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; background: #fff; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.25); border-radius: 22px 22px 0 0; }
.m-bottom button { border: 0; background: none; font-size: 11px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; position: relative; }
.m-bottom button i { font-style: normal; font-size: 22px; line-height: 1.2; transition: transform .2s; }
.m-bottom button.on { color: var(--ink); }
.m-bottom button.on i { transform: translateY(-2px); }
.m-bottom button.on::before { content: ""; position: absolute; top: -6px; width: 26px; height: 4px; border-radius: 4px; background: var(--sun); }
.m-bottom .cnt { position: absolute; top: 0; left: calc(50% - 22px); background: var(--sale); color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; }

/* شیت پایین (فیلتر، دسته‌ها) */
.sheet-wrap { position: fixed; inset: 0; z-index: 700; background: rgba(20,14,6,.5); opacity: 0; pointer-events: none; transition: .25s; }
.sheet-wrap.open { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 26px 26px 0 0; max-height: 88vh; overflow: auto; padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.sheet-wrap.open .sheet { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: #ddd; margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 10px; }
.sheet .f-list { margin-bottom: 14px; }

/* جزئیات محصول موبایل: تمام‌صفحه */
.pd-mob-wrap { position: fixed; inset: 0; z-index: 600; background: #fff; transform: translateY(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); overflow: auto; overscroll-behavior: contain; }
.pd-mob-wrap.open { transform: none; }
.pdm-gal { position: relative; background: var(--tint, #f1ebe2); }
.pdm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pdm-track::-webkit-scrollbar { display: none; }
.pdm-track img { flex: 0 0 100%; aspect-ratio: 4/5; object-fit: cover; scroll-snap-align: center; }
.pdm-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 3; }
.pdm-top button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 18px; box-shadow: 0 4px 12px -6px rgba(0,0,0,.3); }
.pdm-dots { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.pdm-dots span { width: 7px; height: 7px; border-radius: 7px; background: rgba(255,255,255,.6); transition: .3s; }
.pdm-dots span.on { width: 22px; background: #fff; }
.pdm-body { background: #fff; border-radius: 26px 26px 0 0; margin-top: -22px; position: relative; padding: 20px 16px 120px; }
.pdm-body .pd-title { font-size: 21px; }
.pdm-buy { position: fixed; bottom: 0; left: 0; right: 0; z-index: 610; background: #fff; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; box-shadow: 0 -10px 24px -14px rgba(0,0,0,.3); transform: translateY(120%); transition: .35s; }
.pd-mob-wrap.open ~ .pdm-buy, .pdm-buy.open { transform: none; }
.pdm-buy .btn { flex: 1; height: 52px; }
.size-table-wrap { overflow-x: auto; }
