/*
  هیوا دکور — استایل پایه.
  توکن‌ها (رنگ، فونت، عرض کانتینر، گردی) از سایت فعلی استخراج شده‌اند تا
  ظاهر آشنا بماند، ولی CSS از صفر و مستقل از مارک‌آپ وردپرس نوشته شده است.
*/

@font-face {
  font-family: "Abar";
  src: url("../fonts/AbarLowFaNum-Regular.746ef0d4f401.woff2") format("woff2"),
       url("../fonts/AbarLowFaNum-Regular.e820dad49625.woff") format("woff");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Abar";
  src: url("../fonts/AbarLowFaNum-Medium.e7f998c2f7c1.woff2") format("woff2"),
       url("../fonts/AbarLowFaNum-Medium.a1bf01319bce.woff") format("woff");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Abar";
  src: url("../fonts/AbarLowFaNum-SemiBold.55677a50e20d.woff2") format("woff2"),
       url("../fonts/AbarLowFaNum-SemiBold.e3b8008a8a81.woff") format("woff");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Abar";
  src: url("../fonts/AbarLowFaNum-Bold.ca2152c8a57b.woff2") format("woff2"),
       url("../fonts/AbarLowFaNum-Bold.228daa8eb146.woff") format("woff");
  font-weight: 700; font-display: swap;
}

:root {
  --primary: #83b735;
  --primary-dark: #6f9d2c;
  --accent: #fbbc34;
  --title: #242424;
  --link: #333333;
  --text: #767676;
  --border: #e6e6e6;
  --bg-soft: #f7f7f7;
  --form-bg: rgba(155, 155, 155, 0.08);
  --radius: 5px;
  --container: 1222px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Abar", Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  line-height: 1.9;
}

h1, h2, h3, h4 { color: var(--title); font-weight: 700; line-height: 1.5; margin: 0 0 .6em; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- هدر */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 72px;
}
.site-header .logo img { height: 38px; width: auto; }
.main-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.main-nav a { font-weight: 600; color: var(--title); padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

.header-search { margin-inline-start: auto; display: flex; }
.header-search input {
  font: inherit; padding: 0 14px; height: 42px; width: 240px;
  border: 2px solid transparent; background: var(--form-bg);
  border-radius: var(--radius) 0 0 var(--radius); color: var(--title);
}
.header-search input:focus { outline: none; border-color: var(--primary); }
.header-search button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0 18px; height: 42px; border: 0;
  background: var(--primary); color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.header-search button:hover { background: var(--primary-dark); }

/* ---------------------------------------------------------------- هیرو */
.hero { position: relative; height: 420px; overflow: hidden; background: #222; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .42);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
}
.hero h1 { color: #fff; font-size: 34px; margin-bottom: 10px; }
.hero p { color: rgba(255, 255, 255, .9); font-size: 16px; max-width: 620px; margin: 0 0 22px; }
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-weight: 600; border: 0; cursor: pointer;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--title); }

/* ---------------------------------------------------------------- چیدمان کاتالوگ */
.catalog-layout { display: grid; grid-template-columns: 268px 1fr; gap: 28px; margin: 28px 0 60px; }
@media (max-width: 991px) { .catalog-layout { grid-template-columns: 1fr; } }

.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border);
}
.toolbar .count { color: var(--title); font-weight: 600; }
.toolbar .spacer { margin-inline-start: auto; }
.toolbar select { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

/* ---------------------------------------------------------------- فیلترها */
.filters { align-self: start; }
.filters-head {
  font-weight: 700; color: var(--title); font-size: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--primary);
}
.filter-group { border-bottom: 1px solid var(--border); padding: 14px 0; }
.filter-group > summary {
  cursor: pointer; list-style: none; font-weight: 700; color: var(--title);
  display: flex; align-items: center; justify-content: space-between;
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after { content: "−"; color: var(--text); font-weight: 400; }
.filter-group:not([open]) > summary::after { content: "+"; }
.filter-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.filter-list li { margin-bottom: 2px; }
.filter-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: var(--radius); font-size: 13px;
}
.filter-list a:hover { background: var(--bg-soft); }
.filter-list a.on { background: rgba(131, 183, 53, .12); color: var(--title); font-weight: 600; }
.filter-list .n { margin-inline-start: auto; color: #aaa; font-size: 12px; }
.filter-list a.on .n { color: var(--primary-dark); }

.swatch {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1px solid rgba(0, 0, 0, .18);
}
.swatch.lg { width: 26px; height: 26px; }
.swatch.xl { width: 34px; height: 34px; }

/* شبکه خانواده‌های رنگ — بدون خواندن متن هم قابل تشخیص است */
.swatch-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px 6px; margin-top: 14px;
}
.swatch-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: var(--radius); text-align: center;
  border: 2px solid transparent;
}
.swatch-cell:hover { background: var(--bg-soft); }
.swatch-cell.on { border-color: var(--primary); background: rgba(131, 183, 53, .1); }
.swatch-cell .lbl {
  font-size: 10.5px; line-height: 1.35; color: var(--title);
  overflow-wrap: anywhere;
}
.swatch-cell .n { font-size: 10px; color: #aaa; }
.swatch-cell.on .n { color: var(--primary-dark); font-weight: 700; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 4px 10px; border-radius: 999px; background: var(--bg-soft);
  border: 1px solid var(--border); color: var(--title);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.clear { background: transparent; border-style: dashed; }

/* ---------------------------------------------------------------- کارت محصول */
.product-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.card { display: flex; flex-direction: column; }
.card .thumb {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-soft);
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card .thumb .code-badge {
  position: absolute; inset-inline-start: 8px; top: 8px;
  background: rgba(255, 255, 255, .92); color: var(--title);
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
/* وقتی تصویر نداریم، سواچ رنگ‌های واقعی محصول را نشان می‌دهیم */
.swatch-stack { position: absolute; inset: 0; display: flex; flex-direction: column; }
.swatch-stack span { flex: 1; }
.card .meta { padding-top: 10px; }
.card .title { font-size: 13px; font-weight: 600; color: var(--title); margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { font-size: 12px; color: var(--text); }
.card .dots { display: flex; gap: 4px; margin-top: 8px; }
.card .dots .swatch { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- صفحه محصول */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin: 30px 0 60px; }
@media (max-width: 767px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .gallery { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.product-detail .gallery img { width: 100%; height: 100%; object-fit: cover; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.spec-table th, .spec-table td { text-align: start; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.spec-table th { color: var(--text); font-weight: 500; width: 42%; }
.spec-table td { color: var(--title); font-weight: 600; }
.color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.color-row .name { font-size: 13px; color: var(--title); }
.color-row .en { font-size: 12px; color: var(--text); }

.sibling-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin-top: 14px; }
.sibling { text-align: center; }
.sibling .thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); border: 2px solid transparent; }
.sibling:hover .thumb { border-color: var(--primary); }
.sibling .c { font-size: 11px; margin-top: 5px; color: var(--text); }

/* ---------------------------------------------------------------- صفحه گروه طرح */
.crumbs { margin: 22px 0 10px; font-size: 13px; }
.group-detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 38px; margin-bottom: 20px; }
@media (max-width: 860px) { .group-detail { grid-template-columns: 1fr; gap: 26px; } }

.group-title { font-size: 22px; margin-bottom: 4px; }
.group-sub { font-size: 13px; margin: 0 0 20px; }

/* --- قاب تصویر با ذره‌بین --- */
/* تصاویر سواچ عمودی‌اند (حدود ۴ به ۵)؛ قاب مربع بخش زیادی را می‌بُرید. */
.zoom-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-soft);
  cursor: crosshair; border: 1px solid var(--border);
  max-height: 74vh;
}
.zoom-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loupe {
  position: absolute; pointer-events: none; opacity: 0;
  border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .15);
  background-repeat: no-repeat;
  transition: opacity .12s ease;
  z-index: 5;
}
.zoom-hint {
  position: absolute; inset-inline-start: 12px; bottom: 12px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 11.5px;
  padding: 5px 11px; border-radius: 999px; pointer-events: none;
  transition: opacity .2s ease;
}

/* --- نوار بندانگشتی کدها --- */
.thumb-row {
  display: grid; gap: 8px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
}
.thumb-btn {
  border: 2px solid transparent; background: none; padding: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; font: inherit;
}
.thumb-btn > img, .thumb-btn > .swatch-stack {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.thumb-btn .c {
  display: block; font-size: 10.5px; color: var(--text);
  padding: 3px 0; text-align: center;
}
.thumb-btn:hover { border-color: var(--border); }
.thumb-btn.on { border-color: var(--primary); }
.thumb-btn.on .c { color: var(--primary-dark); font-weight: 700; }

/* --- انتخابگر و رنگ‌ها --- */
.selector { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.selector label { font-weight: 600; color: var(--title); font-size: 13px; min-width: 74px; }
.selector select {
  font: inherit; flex: 1; height: 42px; padding: 0 12px;
  border: 2px solid var(--border); border-radius: var(--radius); background: #fff;
}
.selector select:focus { outline: none; border-color: var(--primary); }

.color-block { margin-bottom: 14px; }
.color-block-title {
  display: block; font-size: 12px; color: var(--text); margin-bottom: 6px;
}
.color-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px 4px 6px; margin: 0 0 6px 6px;
}
.color-pill:hover { border-color: var(--primary); }
.color-pill b { display: block; font-size: 12.5px; color: var(--title); font-weight: 600; }
.color-pill i { font-size: 11px; color: var(--text); font-style: normal; }

.note-warn {
  background: var(--bg-soft); border-inline-start: 3px solid var(--accent);
  padding: 9px 12px; font-size: 12.5px; margin: 12px 0;
}

/* ---------------------------------------------------------------- آلبوم */
.album-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 24px 0 60px; }
.album-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.album-card:hover { border-color: var(--primary); }
.album-card .top { aspect-ratio: 4/3; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.album-card .top .letter { font-size: 40px; font-weight: 700; color: #d5d5d5; }
.album-card .body { padding: 14px; }
.album-card h3 { margin: 0 0 4px; font-size: 16px; }
.album-card .sub { font-size: 12px; }

.page-block { margin-bottom: 34px; }
.page-block h3 { font-size: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }

/* ---------------------------------------------------------------- صفحه‌بندی */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 36px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; padding: 0 10px;
}
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

.empty { text-align: center; padding: 70px 20px; color: var(--text); }
.empty h3 { color: var(--title); }

/* ---------------------------------------------------------------- فوتر */
.site-footer { background: #242424; color: rgba(255, 255, 255, .72); padding: 40px 0 24px; margin-top: 40px; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: var(--accent); }
.site-footer .cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { color: #fff; font-size: 15px; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 26px; padding-top: 16px; font-size: 12px; text-align: center; }

.demo-banner {
  background: var(--accent); color: #3a2c00; text-align: center;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600;
}
