/*
Theme Name: ایمن‌ باند (Chakosh)
Description: قالب فروشگاهی فارسی و راست‌چین برای ابزارآلات، دستکش و چسب؛ سازگار با ووکامرس، اسلایدر صفحه اول، لیست تخفیف/پرفروش/جدید، آرشیوهای یکسان و سامانه صدور پیش‌فاکتور و فاکتور فروش A4 با پرینت.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: chakosh
Tags: rtl-language-support, e-commerce, custom-logo, custom-menu
*/

/* ---------- پایه ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
:root {
  --ink: #1b1813;
  --muted: #6f665a;
  --paper: #f5f1e8;
  --card: #fffdf7;
  --line: #e5decd;
  --accent: #e2551a;
  --accent-2: #b23f0d;
  --deep: #20262b;
  --ok: #1e7a4f;
  --bad: #b3362a;
  --r: 12px;
  --shadow: 0 16px 38px rgba(27, 24, 19, 0.1);
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    400 16px/1.9 Vazirmatn,
    tahoma,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  line-height: 1.4;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
}
ul,
ol {
  margin: 0;
  padding: 0;
}
button {
  font: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--accent);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
}
.skip-link:focus {
  inset-inline-start: 8px;
}
.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}
.site-main {
  min-height: 60vh;
}

/* ---------- دکمه‌ها (گوشه‌بریده — امضای صنعتی قالب) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 13px 26px;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  transition: 0.2s;
  clip-path: polygon(
    12px 0,
    100% 0,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    0 100%,
    0 12px
  );
}
.btn:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}
.btn-ink {
  background: var(--ink);
}
.btn-ink:hover {
  background: #000;
}
.btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}
.btn-mini {
  padding: 8px 16px;
  font-size: 0.82rem;
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- نوار بالا و هدر ---------- */
.topbar {
  background: var(--ink);
  color: #efe9dc;
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  gap: 12px;
}
.topbar-note {
  display: flex;
  align-items: center;
  gap: 7px;
}
.topbar .ico {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.topbar-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  direction: ltr;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s;
}
.site-header.is-stuck {
  box-shadow: 0 10px 30px rgba(27, 24, 19, 0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline-end: 8px;
}
.brand .custom-logo {
  max-height: 46px;
  width: auto;
}
.brand-mark {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}
.brand-mark .ico {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}
.brand-text b {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
}
.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}
.main-nav {
  margin-inline-start: auto;
}
.main-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
}
.main-nav a {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  inset-inline: 14px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.25s;
}
.main-nav a:hover::after {
  transform: scaleX(1);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: 0.2s;
}
.icon-btn:hover {
  border-color: var(--line);
  background: #fff;
}
.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.cart-btn:hover {
  border-color: var(--accent);
}
.cart-count {
  position: absolute;
  top: -7px;
  inset-inline-start: -7px;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border-radius: 99px;
}
.js-menu-toggle {
  display: none;
}
.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}
.mobile-panel .menu {
  list-style: none;
  padding: 10px 24px;
}
.mobile-panel .menu a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-weight: 600;
}

/* ---------- پوشش جستجو ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(27, 24, 19, 0.94);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}
body.search-open .search-overlay {
  opacity: 1;
  visibility: visible;
}
.search-box {
  width: min(680px, 90vw);
  transform: translateY(18px);
  transition: 0.3s;
}
body.search-open .search-box {
  transform: none;
}
.search-box .search-form {
  display: flex;
  border-bottom: 3px solid var(--accent);
}
.search-box input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  padding: 14px 4px;
  outline: none;
}
.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.search-box button {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 0 10px;
}
.search-hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-top: 14px;
}
.js-search-close {
  position: absolute;
  top: 22px;
  inset-inline-start: 22px;
  color: #fff;
}

/* ---------- پیام‌های ووکامرس ---------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  list-style: none;
  margin: 0 0 22px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.woocommerce-message {
  background: #e8f4ec;
  border: 1px solid #bfe0cb;
  color: var(--ok);
}
.woocommerce-info {
  background: #eef2f5;
  border: 1px solid #d2dee6;
}
.woocommerce-error {
  background: #fbeceb;
  border: 1px solid #eec5c0;
  color: var(--bad);
}
.woocommerce-message::before {
  content: "✓";
  font-weight: 900;
}

/* ---------- اسلایدر ---------- */
.hero {
  position: relative;
  height: min(78vh, 620px);
  min-height: 440px;
  background: var(--deep);
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s;
}
.hero-slide.is-in {
  opacity: 1;
  visibility: visible;
}
.hero-slide .slide-media {
  position: absolute;
  inset: 0;
}
.hero-slide .slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
.hero-slide.is-in .slide-media img {
  transform: scale(1);
}
.hero-slide .slide-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    270deg,
    rgba(27, 24, 19, 0.78) 22%,
    rgba(27, 24, 19, 0.25) 68%,
    rgba(27, 24, 19, 0.05)
  );
}
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.slide-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  margin-bottom: 20px;
  clip-path: polygon(
    8px 0,
    100% 0,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    0 100%,
    0 8px
  );
}
.hero-slide.is-in .slide-badge {
  animation: rise 0.6s 0.1s both;
}
.slide-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.35;
  max-width: 640px;
  margin-bottom: 14px;
  text-wrap: balance;
}
.hero-slide.is-in .slide-title {
  animation: rise 0.6s 0.22s both;
}
.slide-sub {
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  font-size: 1.02rem;
  margin-bottom: 28px;
}
.hero-slide.is-in .slide-sub {
  animation: rise 0.6s 0.34s both;
}
.slide-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-slide.is-in .slide-cta {
  animation: rise 0.6s 0.46s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-ui {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  bottom: 0;
}
.hero-ui .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 26px;
}
.hero-count {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-count::before {
  content: "";
  width: 44px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
}
.hero-count b {
  color: var(--accent);
}
.hero-nav {
  display: flex;
  gap: 10px;
}
.hero-nav button,
.hero-dots button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(27, 24, 19, 0.25);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(3px);
  transition: 0.2s;
}
.hero-nav button:hover,
.hero-dots button.is-on {
  background: var(--accent);
  border-color: var(--accent);
}
.hero-dots {
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.hero-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
}
.hero-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}
.hero-progress i.run {
  animation: heroBar 6s linear forwards;
}
@keyframes heroBar {
  to {
    width: 100%;
  }
}

/* ---------- نوار متحرک ---------- */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: #f1ead9;
  border-block: 1px solid #2c271f;
  padding: 12px 0;
}
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marq 26s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-inline-end: 26px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.marquee-track span::after {
  content: "◆";
  color: var(--accent);
  font-size: 0.6rem;
}
@keyframes marq {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- نوار خدمات ---------- */
.services {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.services .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.service {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px 10px;
  border-inline-start: 1px dashed var(--line);
}
.service:first-child {
  border-inline-start: 0;
}
.service-ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fdeee4;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.service b {
  display: block;
  font-size: 0.95rem;
}
.service small {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- سربرگ بخش‌ها ---------- */
.sec {
  padding: 64px 0;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.sec-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 900;
  position: relative;
  padding-inline-start: 18px;
}
.sec-title::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 6px;
  bottom: 6px;
  width: 5px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
.sec-title em {
  font-style: normal;
  color: var(--accent);
}
.sec-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}
.sec-link:hover {
  color: var(--accent);
}
.sec-link .ico {
  width: 16px;
  height: 16px;
}

/* ---------- دو پنل دسته‌بندی ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.duo-item {
  position: relative;
  min-height: 380px;
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.duo-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
  z-index: -1;
}
.duo-item:hover img {
  transform: scale(1.05);
}
.duo-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(27, 24, 19, 0.82),
    rgba(27, 24, 19, 0.05) 60%
  );
  z-index: -1;
}
.duo-num {
  position: absolute;
  top: 18px;
  inset-inline-start: 22px;
  font-size: 3.4rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.16);
  line-height: 1;
}
.duo-body {
  position: relative;
  color: #fff;
  padding: 26px;
}
.duo-body h3 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 6px;
}
.duo-body p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.duo-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}
.duo-go .ico {
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
}
.duo-item:hover .duo-go .ico {
  transform: translateX(-6px);
}
.duo-count {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  padding: 2px 12px;
  font-size: 0.75rem;
  margin-inline-start: 8px;
}

/* ---------- کارت محصول ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 20px;
}
.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.25s;
}
.pcard:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: #d8cfba;
}
.pcard-media {
  position: relative;
  display: block;
  aspect-ratio: 1/1;
  background: #efe9db;
  overflow: hidden;
}
.pcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.pcard:hover .pcard-media img {
  transform: scale(1.06);
}
.pcard-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 5px 12px;
  clip-path: polygon(
    7px 0,
    100% 0,
    100% calc(100% - 7px),
    calc(100% - 7px) 100%,
    0 100%,
    0 7px
  );
}
.pcard-oos {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: #5a544a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
}
.noimg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #c9bfa8;
}
.noimg .ico {
  width: 52px;
  height: 52px;
  stroke-width: 1.2;
}
.pcard-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.pcard-cat {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.pcard-cat a:hover {
  color: var(--accent);
}
.pcard-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.65;
}
.pcard-title a:hover {
  color: var(--accent);
}
.pcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.price,
.pcard-price {
  font-weight: 800;
  font-size: 1.02rem;
}
.price del,
.pcard-price del {
  opacity: 0.45;
  font-weight: 500;
  font-size: 0.8em;
  text-decoration: line-through;
  margin-inline-end: 6px;
}
.price ins,
.pcard-price ins {
  text-decoration: none;
  color: var(--accent);
}
.pcard .button,
.add_to_cart_button {
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 8px;
  transition: 0.2s;
}
.pcard .button:hover,
.add_to_cart_button:hover {
  background: var(--accent);
  color: #fff;
}
.added_to_cart {
  font-size: 0.8rem;
  color: var(--ok);
  font-weight: 700;
}

/* ---------- بخش تخفیف‌های ویژه (تیره) ---------- */
.sale {
  background: var(--deep);
  color: #f0ebe0;
  position: relative;
}
.sale::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(255, 255, 255, 0.025) 14px 15px
  );
}
.sale .sec-title {
  color: #fff;
}
.sale .sec-link {
  color: rgba(255, 255, 255, 0.65);
}
.sale-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  position: relative;
}
.sale-hero {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.sale-hero .pcard-media {
  aspect-ratio: 16/10;
}
.sale-hero .pct {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 1.3rem;
  padding: 10px 16px;
  border-radius: 14px;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}
.sale-hero-body {
  padding: 20px 24px 24px;
}
.sale-hero-body .price {
  font-size: 1.3rem;
}
.sale-countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.js-countdown {
  display: flex;
  gap: 6px;
  direction: ltr;
}
.js-countdown b {
  background: var(--ink);
  color: #fff;
  min-width: 34px;
  text-align: center;
  border-radius: 7px;
  padding: 3px 6px;
  font-weight: 800;
}
.sale-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sale-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  transition: 0.2s;
  color: #f0ebe0;
}
.sale-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-4px);
}
.sale-item img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
}
.sale-item .pcard-price del {
  opacity: 0.4;
}
.sale-item .pcard-price {
  color: #fff;
  margin-inline-start: auto;
  text-align: left;
  white-space: nowrap;
}
.sale-item small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  display: block;
}

/* ---------- پرفروش‌ترین‌ها (ردیف اسکرولی) ---------- */
.rank-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 22px;
  scrollbar-width: none;
}
.rank-row::-webkit-scrollbar {
  display: none;
}
.rank-row .pcard {
  min-width: 252px;
  scroll-snap-align: start;
  position: relative;
}
.rank-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.rank-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.rank-n {
  position: absolute;
  bottom: 6px;
  inset-inline-end: 10px;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px #ddd3bd;
  pointer-events: none;
  z-index: 2;
}
.rank-row .pcard:hover .rank-n {
  -webkit-text-stroke-color: var(--accent);
}

/* ---------- جدیدترین‌ها + خرید سازمانی ---------- */
.newer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 30px;
  align-items: start;
}
.nlist {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.nitem {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px dashed var(--line);
  transition: 0.2s;
}
.nitem:last-child {
  border-bottom: 0;
}
.nitem:hover {
  background: #fbf7ee;
}
.nitem img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
}
.nitem h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 2px;
}
.nitem:hover h3 {
  color: var(--accent);
}
.nitem small {
  color: var(--muted);
  font-size: 0.75rem;
}
.nitem .pcard-price {
  margin-inline-start: auto;
  white-space: nowrap;
}
.nitem .add_to_cart_button {
  flex: none;
}
.org {
  background: var(--accent);
  color: #fff;
  border-radius: var(--r);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 26px),
    calc(100% - 26px) 100%,
    0 100%
  );
}
.org::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0 12px,
    rgba(255, 255, 255, 0.06) 12px 13px
  );
}
.org-body {
  position: relative;
}
.org h3 {
  font-size: 1.5rem;
  font-weight: 900;
}
.org p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.94rem;
}
.org-tel {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 900;
  direction: ltr;
  justify-content: flex-end;
  margin: 18px 0 22px;
}
.org-tel .ico {
  width: 26px;
  height: 26px;
}
.org .btn {
  background: var(--ink);
}
.org .btn:hover {
  background: #000;
}

/* ---------- مجله ---------- */
.mag-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 26px;
  align-items: start;
}
.mag-big {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.mag-big img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}
.mag-big-body {
  padding: 22px 26px 26px;
}
.mag-big h3 {
  font-size: 1.4rem;
  font-weight: 900;
}
.mag-big h3 a:hover {
  color: var(--accent);
}
.mrow {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.mrow:last-child {
  border: 0;
}
.mrow img {
  width: 88px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
}
.mrow h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.7;
}
.mrow h4 a:hover {
  color: var(--accent);
}
.mrow time {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- آرشیو (دسته/برچسب/جستجو) ---------- */
.arch-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  padding: 52px 0 40px;
}
.arch-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 16px,
    rgba(27, 24, 19, 0.025) 16px 17px
  );
}
.arch-head .container {
  position: relative;
}
.arch-kicker {
  display: inline-block;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin: 14px 0 4px;
}
.arch-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 8px;
}
.arch-desc {
  color: var(--muted);
  max-width: 640px;
}
.arch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 22px;
  flex-wrap: wrap;
}
.arch-count {
  font-size: 0.9rem;
  color: var(--muted);
}
.woocommerce-ordering select {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  outline: none;
}
.rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.rrow {
  display: flex;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  transition: 0.2s;
  align-items: center;
}
.rrow:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.rrow-thumb {
  width: 190px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
}
.rrow.is-product .rrow-thumb {
  width: 110px;
  height: 110px;
}
.rrow-body {
  flex: 1;
  min-width: 0;
}
.rrow-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.rrow-meta a {
  color: var(--accent);
  font-weight: 700;
}
.rrow h3 {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0 0 6px;
}
.rrow h3 a:hover {
  color: var(--accent);
}
.rrow p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rrow-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: none;
}
.rrow-side .ico {
  color: #b9ae97;
  transition: 0.2s;
}
.rrow:hover .rrow-side .ico {
  color: var(--accent);
  transform: translateX(-4px);
}
.rrow.is-product .add_to_cart_button {
  margin-inline-start: 0;
}

/* ---------- صفحه‌بندی ---------- */
.pnum ul {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 44px 0 0;
}
.pnum a,
.pnum span {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.pnum .current {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.pnum a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- تکی (نوشته و محصول با یک زبان) ---------- */
.crumbs {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.crumbs a:hover {
  color: var(--accent);
}
.crumbs .sep {
  margin: 0 8px;
  color: #c6bca6;
}
.single-wrap {
  max-width: 880px;
  margin-inline: auto;
}
.single-head {
  padding: 46px 0 30px;
}
.post-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.post-cats a {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
}
.entry-title {
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  font-weight: 900;
  text-wrap: balance;
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}
.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.entry-meta .ico {
  width: 15px;
  height: 15px;
}
.entry-thumb {
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 34px;
}
.entry-thumb img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.entry-content {
  font-size: 1.05rem;
  line-height: 2.15;
  color: #2b2720;
}
.entry-content h2 {
  font-size: 1.55rem;
  margin-top: 1.6em;
  padding-inline-start: 14px;
  border-inline-start: 4px solid var(--accent);
}
.entry-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5em;
}
.entry-content a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  background: #fff;
  border-inline-start: 4px solid var(--accent);
  border-radius: 10px;
  color: var(--muted);
}
.entry-content img {
  border-radius: 12px;
}
.entry-content figure {
  margin: 1.8em 0;
}
.entry-content figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 10px 14px;
}
.entry-content th {
  background: #f2ecdd;
}
.entry-content pre {
  background: var(--ink);
  color: #f1ead9;
  padding: 18px;
  border-radius: 12px;
  overflow: auto;
  direction: ltr;
  text-align: left;
}
.entry-content code {
  background: #eee6d4;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}
.aligncenter {
  margin-inline: auto;
}
.alignright {
  float: right;
  margin: 0 0 1em 1.4em;
}
.alignleft {
  float: left;
  margin: 0 1.4em 1em 0;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 34px 0 0;
}
.tags a {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: 0.2s;
}
.tags a:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.author-box {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  margin-top: 38px;
}
.author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.author-box b {
  font-size: 1.05rem;
}
.author-box p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 4px 0 0;
}

/* ---------- دیدگاه‌ها ---------- */
.cblock {
  margin-top: 56px;
}
.cblock h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cblock h2 em {
  font-style: normal;
  color: var(--accent);
}
.clist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 34px;
}
.comment {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}
.comment .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
}
.cmeta b {
  font-size: 0.95rem;
}
.cmeta time {
  font-size: 0.75rem;
  color: var(--muted);
  margin-inline-start: 10px;
}
.cbody {
  font-size: 0.95rem;
  margin-top: 6px;
}
.comment-form label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.comment-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  outline: none;
  transition: 0.2s;
}
.comment-form :is(input, textarea, select):focus {
  border-color: var(--accent);
}
.comment-form .submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 13px 30px;
  border-radius: 10px;
  font-weight: 800;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}
.comment-form .submit:hover {
  background: var(--accent-2);
}
.comment-form-rating select {
  max-width: 160px;
}
.comment-notes,
.logged-in-as {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- تکی محصول ---------- */
.p-top {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  padding: 40px 0 10px;
  align-items: start;
}
.p-gallery {
  position: sticky;
  top: 100px;
}
.pg-main {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
}
.pg-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pg-thumbs button {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0.55;
  transition: 0.2s;
  background: #fff;
}
.pg-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-thumbs button.is-on {
  opacity: 1;
  border-color: var(--accent);
}
.p-cats {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.p-cats a {
  color: var(--accent);
  font-weight: 700;
}
.p-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
}
.p-rating {
  color: #e8a417;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.p-rating small {
  color: var(--muted);
  font-size: 0.8rem;
}
.p-price {
  margin: 16px 0 6px;
}
.p-price .price {
  font-size: 1.7rem;
  font-weight: 900;
}
.p-stock {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.p-stock .in {
  color: var(--ok);
}
.p-stock .out {
  color: var(--bad);
}
.p-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  border-inline-start: 3px solid var(--line);
  padding-inline-start: 14px;
  margin-bottom: 20px;
}
.p-summary form.cart {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.p-summary .quantity input {
  width: 88px;
  text-align: center;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  outline: none;
}
.p-summary .quantity input:focus {
  border-color: var(--accent);
}
.single_add_to_cart_button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 14px 36px;
  font-weight: 800;
  border-radius: 10px;
  font-size: 1rem;
  transition: 0.2s;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}
.single_add_to_cart_button:hover {
  background: var(--accent-2);
}
.p-feats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}
.p-feats span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.p-feats .ico {
  width: 18px;
  height: 18px;
  color: var(--ok);
}
.p-meta {
  font-size: 0.83rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.p-meta a {
  color: var(--accent);
}
.p-section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  margin-top: 44px;
}
.p-section > h2,
.related > h2 {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 24px;
  position: relative;
  padding-inline-start: 16px;
}
.p-section > h2::before,
.related > h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  bottom: 5px;
  width: 5px;
  background: var(--accent);
}
.specs {
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 20px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.spec-row:last-child {
  border: 0;
}
.spec-row span:first-child {
  color: var(--muted);
  font-weight: 600;
  flex: none;
}
.related {
  padding: 44px 0 64px;
}

/* ---------- فوتر ---------- */
.site-footer {
  background: var(--ink);
  color: #d9d2c2;
  margin-top: 70px;
}
.f-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 60px 0 40px;
}
.f-brand .brand-text b {
  color: #fff;
  font-size: 1.6rem;
}
.f-brand .brand-text small {
  color: #8d8574;
}
.f-brand p {
  font-size: 0.9rem;
  color: #a49b88;
  margin-top: 14px;
  max-width: 300px;
}
.f-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.f-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 34px;
  height: 3px;
  background: var(--accent);
}
.f-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}
.f-col a:hover {
  color: var(--accent);
}
.f-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.f-contact .ico {
  width: 17px;
  height: 17px;
  color: var(--accent);
  margin-top: 5px;
}
.f-bottom {
  border-top: 1px solid #2c271f;
  padding: 18px 0;
  font-size: 0.82rem;
  color: #8d8574;
}
.f-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.f-bottom b {
  color: #cfc7b4;
}

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1080px) {
  .main-nav {
    display: none;
  }
  .js-menu-toggle {
    display: grid;
  }
  body.nav-open .mobile-panel {
    display: block;
  }
  .services .container {
    grid-template-columns: 1fr 1fr;
  }
  .service {
    border: 0;
  }
  .sale-grid,
  .newer-grid,
  .mag-grid {
    grid-template-columns: 1fr;
  }
  .p-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .p-gallery {
    position: static;
  }
}
@media (max-width: 720px) {
  .duo {
    grid-template-columns: 1fr;
  }
  .duo-item {
    min-height: 280px;
  }
  .f-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .rrow {
    flex-wrap: wrap;
  }
  .rrow-thumb {
    width: 100%;
    height: 180px;
  }
  .rrow.is-product .rrow-thumb {
    width: 100%;
    height: 180px;
  }
  .hero {
    height: 520px;
  }
  .topbar-note span {
    display: none;
  }
}
@media (max-width: 520px) {
  .f-grid {
    grid-template-columns: 1fr;
  }
  .services .container {
    grid-template-columns: 1fr;
  }
  .header-inner {
    min-height: 66px;
    gap: 10px;
  }
  .brand-text small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
