/* ===== Shop page (is_shop) ===== */
.shop-x .shop-main{padding-top:26px}
.sp-hero-wrap{padding-top:26px}

/* hero */
.sp-hero{position:relative;overflow:hidden;isolation:isolate;border-radius:28px;padding:34px 36px 30px;color:var(--ink,#24362c);
 background:radial-gradient(110% 90% at 0% 100%,rgba(240,160,58,.16),transparent 55%),linear-gradient(160deg,#e6eadc,#d9e0cc);
 border:1px solid #d3dbc4;box-shadow:0 24px 50px -36px rgba(37,60,49,.45)}
.sp-hero::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.5;pointer-events:none;
 background:repeating-radial-gradient(ellipse at 85% 120%,transparent 0 34px,rgba(37,60,49,.045) 35px 36px)}
.sp-hero-glow{position:absolute;z-index:-1;width:420px;height:420px;left:-120px;bottom:-220px;border-radius:50%;background:radial-gradient(circle,rgba(240,160,58,.18),transparent 65%);filter:blur(10px);pointer-events:none}
.sp-hero-top{display:flex;align-items:flex-end;justify-content:space-between;gap:30px;margin-bottom:28px}
.sp-hero-text{max-width:620px}
.sp-crumbs{display:flex;gap:8px;font-size:11.5px;color:var(--muted,#6a7066);margin-bottom:14px}
.sp-crumbs a{color:var(--muted,#6a7066)}
.sp-crumbs a:hover{color:var(--ember-deep,#a8501a)}
.sp-hero .eyebrow{color:var(--ember-deep,#a8501a)}
.sp-hero h1{color:var(--forest,#253c31);margin:0 0 10px;font-size:clamp(30px,3.4vw,46px)}
.sp-hero p{margin:0;font-size:13.5px;line-height:2;color:var(--muted,#6a7066)}
.sp-stats{list-style:none;margin:0;padding:0;display:flex;gap:10px;flex-shrink:0}
.sp-stats li{min-width:108px;padding:14px 16px;border-radius:18px;background:rgba(255,255,255,.65);border:1px solid #d3dbc4;backdrop-filter:blur(6px);text-align:center}
.sp-stats b{display:block;font-size:24px;line-height:1.3;color:var(--forest,#253c31)}
.sp-stats b small{font-size:12px;font-weight:700;margin-inline-start:3px;color:var(--ember-deep,#a8501a)}
.sp-stats span{display:block;font-size:11px;color:var(--muted,#6a7066);margin-top:2px}

/* category tiles */
.sp-cats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;perspective:1100px}
.sp-cat{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 10px 14px;border-radius:18px;text-align:center;color:var(--ink,#24362c);
 background:linear-gradient(180deg,#fbfaf6,#efece2);border:1px solid rgba(255,255,255,.6);
 transform-style:preserve-3d;transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(var(--ty,0));
 transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s;box-shadow:0 10px 24px -16px rgba(0,0,0,.6)}
.sp-cat:hover,.sp-cat:focus-visible{--ty:-6px;color:var(--ink,#24362c);box-shadow:0 26px 40px -22px rgba(0,0,0,.75),0 0 0 2px var(--ember,#f0a03a)}
.sp-cat::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .3s;
 background:radial-gradient(circle at var(--gx,50%) var(--gy,0%),rgba(255,255,255,.75),transparent 55%);mix-blend-mode:soft-light}
.sp-cat:hover::after{opacity:1}
.sp-cat-art{width:100%;height:82px;display:flex;align-items:center;justify-content:center;transform:translateZ(26px);transition:transform .35s}
.sp-cat:hover .sp-cat-art{transform:translateZ(40px) scale(1.06)}
.sp-cat-art img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.sp-cat-art .icon{width:48px;height:48px;color:var(--olive,#68734b)}
.sp-cat-name{font-size:12.5px;font-weight:800;line-height:1.6;transform:translateZ(14px)}
.sp-cat-count{font-size:10.5px;color:var(--muted,#6a7066);transform:translateZ(10px)}
@media (prefers-reduced-motion:no-preference){
 .sp-cats.is-ready .sp-cat{animation:sp-rise .6s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i)*45ms)}
}
@keyframes sp-rise{from{opacity:0;transform:translateY(18px) rotateX(18deg)}}

/* toolbar */
.shop-x .sp-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 22px;padding:10px 12px 10px 16px;border-radius:16px;background:#fff;border:1px solid var(--line,#e2e4da);scroll-margin-top:120px}
.shop-x .sp-toolbar .woocommerce-result-count{margin:0;font-size:12.5px;color:var(--muted,#6a7066);float:none}

/* sidebar */
.shop-x .shop-layout{gap:28px;align-items:start}
.shop-x .shop-sidebar{position:sticky;top:120px}
.shop-x .shop-sidebar details{border:0;padding:0;margin:0}
.shop-x .shop-sidebar summary{display:none}
.shop-x .filter-widget{padding:18px 16px;margin-bottom:14px;border-radius:18px;background:#fff;border:1px solid var(--line,#e2e4da)}
.shop-x .filter-widget h3{display:flex;align-items:center;gap:8px;font-size:13.5px;margin:0 0 12px}
.shop-x .filter-widget h3::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--ember,#f0a03a);box-shadow:0 0 0 4px rgba(240,160,58,.18)}
.shop-x .category-list{list-style:none;margin:0;padding:0}
.shop-x .category-list li{margin:0}
.shop-x .category-list a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:10px;font-size:12.5px;color:var(--ink,#24362c);transition:background .2s,padding .2s}
.shop-x .category-list a:hover{background:#f6f4ec;padding-inline-start:14px;color:var(--forest,#253c31)}
.shop-x .category-list .sp-count{min-width:24px;padding:1px 7px;border-radius:999px;background:#f1f3ea;font-size:10.5px;color:var(--muted,#6a7066);text-align:center}
.shop-x .category-list a:hover .sp-count{background:var(--ember,#f0a03a);color:var(--ember-ink,#1b2a21)}
.shop-x .widget_price_filter .price_slider{margin:10px 6px 18px}
.shop-x .widget_price_filter .ui-slider{height:4px;border-radius:4px;background:#e6e8de;border:0}
.shop-x .widget_price_filter .ui-slider .ui-slider-range{background:var(--ember,#f0a03a)}
.shop-x .widget_price_filter .ui-slider .ui-slider-handle{width:16px;height:16px;top:-6px;border-radius:50%;background:#fff;border:3px solid var(--ember-hot,#e3772b);box-shadow:0 3px 8px rgba(0,0,0,.18);cursor:grab}
.shop-x .widget_price_filter .price_slider_amount{display:flex;flex-direction:column;gap:10px;font-size:12px}
.shop-x .widget_price_filter .price_slider_amount .button{width:100%;min-height:38px;padding:8px 14px;font-size:12.5px}
.shop-x .widget_price_filter .price_label{order:-1;color:var(--muted,#6a7066);text-align:center}

/* pagination */
.shop-x .woocommerce-pagination{margin-top:30px}
.shop-x .woocommerce-pagination ul.page-numbers{display:flex;justify-content:center;gap:6px;border:0;list-style:none;padding:0;margin:0}
.shop-x .woocommerce-pagination ul.page-numbers li{border:0;float:none}
.shop-x .woocommerce-pagination .page-numbers a,.shop-x .woocommerce-pagination .page-numbers span{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 10px;border-radius:999px;border:1px solid var(--line,#e2e4da);background:#fff;font-size:13px;font-weight:700;color:var(--forest,#253c31)}
.shop-x .woocommerce-pagination .page-numbers a:hover{border-color:var(--ember,#f0a03a);background:#fff6ea}
.shop-x .woocommerce-pagination .page-numbers span.current{background:var(--ember-grad,linear-gradient(135deg,#f5b45a,#f0a03a 50%,#e3772b));border-color:transparent;color:var(--ember-ink,#1b2a21)}

/* tablet */
@media (max-width:1100px){
 .sp-cats{grid-template-columns:repeat(4,minmax(0,1fr))}
 .sp-hero-top{flex-direction:column;align-items:flex-start}
}
/* mobile */
@media (max-width:900px){
 .shop-x .shop-sidebar{position:static}
 .shop-x .shop-sidebar summary{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-radius:14px;background:#fff;border:1px solid var(--line,#e2e4da);font-size:13px;list-style:none}
 .shop-x .shop-sidebar summary::-webkit-details-marker{display:none}
 .shop-x .shop-sidebar summary::after{content:"+";font-size:18px;color:var(--ember-hot,#e3772b)}
 .shop-x .shop-sidebar details[open] summary{margin-bottom:12px}
 .shop-x .shop-sidebar details[open] summary::after{content:"−"}
}
@media (max-width:700px){
 .sp-hero-wrap{padding-top:16px}
 .sp-hero{padding:22px 16px 18px;border-radius:22px}
 .sp-hero-top{margin-bottom:18px;gap:16px}
 .sp-hero p{font-size:12.5px}
 .sp-stats{width:100%}
 .sp-stats li{flex:1;min-width:0;padding:10px 6px;border-radius:14px}
 .sp-stats b{font-size:19px}
 .sp-stats span{font-size:10px}
 .sp-cats{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;margin-inline:-16px;padding:4px 16px 10px;scrollbar-width:none}
 .sp-cats::-webkit-scrollbar{display:none}
 .sp-cat{flex:0 0 112px;scroll-snap-align:start;padding:10px 8px 12px}
 .sp-cat-art{height:64px}
 .sp-cat-name{font-size:11.5px}
 .shop-x .sp-toolbar{padding:10px;border-radius:14px}
}
.shop-x .woocommerce-products-header{display:none}
@media (max-width:900px){.shop-x .shop-layout{gap:16px}.shop-x .shop-content{row-gap:0}}
/* price range: two tidy chips (از … تا …) instead of the mixed-direction sentence */
.shop-x .widget_price_filter .price_label{direction:rtl;display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:0;color:transparent}
.shop-x .widget_price_filter .price_label span{display:inline-flex;flex-direction:column;align-items:center;flex:1;padding:6px 8px;border-radius:10px;background:#f6f4ec;font-size:12px;font-weight:800;color:var(--forest,#253c31);white-space:nowrap}
.shop-x .widget_price_filter .price_label span::before{font-size:10px;font-weight:400;color:var(--muted,#6a7066)}
.shop-x .widget_price_filter .price_label .from::before{content:"از"}
.shop-x .widget_price_filter .price_label .to::before{content:"تا"}
/* compact hero: whole card visible at first glance */
.sp-hero-wrap{padding-top:10px}
.shop-x .shop-main{padding-top:22px}
.sp-hero{padding:20px 30px 22px}
.sp-crumbs{margin-bottom:8px}
.sp-hero .eyebrow{margin-bottom:6px}
.sp-hero h1{margin-bottom:6px;font-size:clamp(28px,3vw,40px)}
.sp-hero p{line-height:1.85}
.sp-hero-top{margin-bottom:16px}
.sp-stats li{padding:10px 14px;border-radius:16px}
.sp-stats b{font-size:21px}
.sp-cats{gap:10px}
.sp-cat{padding:8px 8px 10px;gap:2px;border-radius:16px}
.sp-cat-art{height:58px}
@media (max-width:700px){.sp-hero-wrap{padding-top:10px}.sp-hero{padding:16px 16px 16px}.sp-cat-art{height:56px}}

/* price range chips: stacked rows that always fit the card */
.shop-x .widget_price_filter .price_label{flex-direction:column;align-items:stretch;gap:6px}
.shop-x .widget_price_filter .price_label span{flex-direction:row;justify-content:space-between;min-width:0;white-space:normal;padding:7px 10px}

/* sort dropdown */
.sp-sort{position:relative;z-index:5;border:0;padding:0;margin:0;border-radius:0;background:none}
.sp-sort summary{display:flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border-radius:999px;background:#f1f3ea;border:1px solid transparent;font-size:12.5px;color:var(--forest,#253c31);cursor:pointer;list-style:none;user-select:none;transition:border-color .2s,background .2s}
.sp-sort summary::-webkit-details-marker{display:none}
.sp-sort summary:hover,.sp-sort[open] summary{border-color:var(--ember,#f0a03a);background:#fff6ea}
.sp-sort-label{color:var(--muted,#6a7066)}
.sp-sort summary b{font-weight:800}
.sp-sort summary svg{transition:transform .2s;color:var(--ember-hot,#e3772b)}
.sp-sort[open] summary svg{transform:rotate(180deg)}
.sp-sort-menu{position:absolute;inset-inline-end:0;top:calc(100% + 8px);min-width:190px;margin:0;padding:6px;list-style:none;border-radius:16px;background:#fff;border:1px solid var(--line,#e2e4da);box-shadow:0 24px 50px -20px rgba(20,41,46,.35)}
.sp-sort-menu a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border-radius:10px;font-size:13px;color:var(--ink,#24362c)}
.sp-sort-menu a:hover{background:#f6f4ec;color:var(--forest,#253c31)}
.sp-sort-menu a.is-on{font-weight:800;color:var(--ember-deep,#a8501a);background:#fff6ea}
.sp-sort-menu a.is-on::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--ember,#f0a03a)}
@media (max-width:700px){
 .shop-x .sp-toolbar{flex-wrap:nowrap;gap:8px}
 .shop-x .sp-toolbar .woocommerce-result-count{font-size:11.5px}
 .sp-sort summary{padding:6px 12px}
 .sp-sort-label{display:none}
}

/* mobile: all 12 planner categories visible at once in a 3-column grid
   instead of a sideways strip that hid most of them */
@media (max-width:700px){
 .sp-cats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:visible;scroll-snap-type:none;margin-inline:0;padding:2px 0 0}
 .sp-cat{flex:none;padding:8px 4px 9px;border-radius:14px}
 .sp-cat-art{height:46px}
 .sp-cat-art .icon{width:36px;height:36px}
 .sp-cat-name{font-size:11.5px;line-height:1.5}
 .sp-cat-count{font-size:10px}
}
