@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --cream: #F7F3EC;
  --cream-deep: #EFE7D8;
  --ink: #40302A;
  --ink-soft: #6B564A;
  --mint: #BFDED2;
  --mint-deep: #9AC4B3;
  --rose: #D9BBAE;
  --gold: #B8935A;
  --gold-deep: #9A7845;
  --line: rgba(64,48,42,0.14);
  --radius-s: 4px;
  --radius-m: 10px;
  --shadow: 0 10px 30px rgba(64,48,42,0.10);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--cream);
  color: var(--ink);
  direction: rtl;
  text-align: right;
  line-height: 1.85;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* --- knit stitch divider motif: a repeating purl-stitch pattern, used
   instead of a generic hairline rule --- */
.stitch-divider {
  height: 14px;
  background-image: radial-gradient(circle at 7px 7px, var(--gold) 2.2px, transparent 2.3px);
  background-size: 22px 14px;
  background-repeat: repeat-x;
  opacity: 0.55;
  margin: 0 auto;
}

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.logo {
  font-size: 22px; font-weight: 800; letter-spacing: 0;
  display: flex; align-items: center; gap: 10px;
}
.logo-text { display: flex; align-items: baseline; gap: 6px; }
.logo span.tag {
  font-size: 12px; font-weight: 400; color: var(--ink-soft);
}
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--gold-deep); }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: var(--radius-s);
  padding: 10px 16px; font-size: 14px; font-weight: 700;
}
.cart-btn:hover { background: var(--gold-deep); }

/* --- Hero --- */
.hero {
  padding: 64px 0 40px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 900; line-height: 1.35; margin: 0 0 20px;
}
.hero p.lead {
  font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin: 0 0 28px;
}
.hero .badges { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.badge {
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--mint); padding: 7px 14px; border-radius: 999px;
}
.btn-primary {
  display: inline-block; background: var(--gold); color: #fff;
  padding: 14px 30px; border-radius: var(--radius-s); font-weight: 800; font-size: 15px;
  border: none;
}
.btn-primary:hover { background: var(--gold-deep); }
.hero-image {
  border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4/5; background: var(--cream-deep);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* --- Section heading --- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 56px 0 26px;
}
.section-head h2 { font-size: 26px; font-weight: 800; margin: 0; }
.section-head .sub { color: var(--ink-soft); font-size: 14px; }

/* --- Product grid --- */
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: 56px;
}
.card {
  background: #fff; border-radius: var(--radius-m); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 1/1.08; overflow: hidden; background: var(--cream-deep); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .info { padding: 14px 16px 18px; }
.card .cat { font-size: 12px; color: var(--gold-deep); font-weight: 700; margin-bottom: 4px; }
.card h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; line-height: 1.6; }
.card .price { font-size: 15px; font-weight: 800; }
.card .price small { font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.card .handmade-pin {
  position: relative; top: 10px; margin-right: 10px; display: inline-block;
  font-size: 11px; background: var(--rose); padding: 3px 9px; border-radius: 999px; font-weight: 700;
}

/* --- Footer --- */
.site-footer {
  background: var(--ink); color: var(--cream);
  padding: 48px 0 28px; margin-top: 40px;
}
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 14px; margin: 0 0 14px; color: var(--gold); }
.site-footer p, .site-footer li { color: rgba(247,243,236,0.75); font-size: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(247,243,236,0.15);
  font-size: 13px; color: rgba(247,243,236,0.55); display: flex; justify-content: space-between;
}

/* --- Forms (checkout, admin) --- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-family: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Cart drawer --- */
.cart-drawer {
  position: fixed; inset: 0 0 0 auto; width: min(420px, 100%);
  background: #fff; box-shadow: -20px 0 40px rgba(0,0,0,0.15);
  transform: translateX(100%); transition: transform .25s ease;
  z-index: 60; display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer .head { padding: 20px 22px; border-bottom: 1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.cart-drawer .items { flex: 1; overflow-y: auto; padding: 16px 22px; }
.cart-drawer .foot { padding: 20px 22px; border-top: 1px solid var(--line); }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 64px; border-radius: var(--radius-s); object-fit: cover; }
.overlay {
  position: fixed; inset: 0; background: rgba(64,48,42,0.4); z-index: 55;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* --- Upgraded homepage sections --- */
.hero-full {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--ink);
}
.hero-full .bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.55;
}
.hero-full .bg-fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(64,48,42,0.35) 0%, rgba(64,48,42,0.55) 55%, var(--ink) 100%);
}
.hero-full .content {
  position: relative; z-index: 2; color: #fff; text-align: center;
  max-width: 780px; margin: 0 auto; padding: 0 24px;
}
.hero-full .eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--mint); margin-bottom: 18px; display: flex; align-items:center; justify-content:center; gap: 10px;
}
.hero-full .eyebrow::before, .hero-full .eyebrow::after { content:""; width: 30px; height:1px; background: var(--mint); opacity: .6; }
.hero-full h1 {
  font-size: clamp(34px, 5.6vw, 64px); font-weight: 900; line-height: 1.3; margin: 0 0 22px;
}
.hero-full p.lead { font-size: 19px; color: rgba(247,243,236,0.85); margin: 0 0 34px; }
.hero-full .cta-row { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.btn-ghost {
  display:inline-block; padding: 14px 30px; border-radius: var(--radius-s);
  border: 1.5px solid rgba(247,243,236,0.5); color:#fff; font-weight:700; font-size:15px;
}
.btn-ghost:hover { border-color:#fff; background:rgba(255,255,255,0.08); }

.trust-bar { background: var(--cream-deep); padding: 22px 0; }
.trust-bar .row { display:flex; justify-content:space-around; flex-wrap:wrap; gap: 18px; text-align:center; }
.trust-bar .item { font-size: 14px; font-weight: 700; display:flex; align-items:center; gap: 8px; }
.trust-bar .item .ic { font-size: 20px; }

.category-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 10px 0 50px; }
.cat-tile {
  position: relative; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 3/3.6;
  background: var(--cream-deep);
}
.cat-tile img { width:100%; height:100%; object-fit:cover; transition: transform .35s ease; }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile .tag {
  position:absolute; bottom:0; right:0; left:0; padding: 20px 16px 16px;
  background: linear-gradient(0deg, rgba(64,48,42,0.85), transparent);
  color:#fff; font-weight:800; font-size:16px;
}

.featured-row { display:flex; align-items:baseline; justify-content:space-between; margin: 60px 0 26px; }
.link-arrow { font-weight:700; font-size:14px; color: var(--gold-deep); }
.link-arrow:hover { text-decoration: underline; }

.story-section { display:grid; grid-template-columns: 0.85fr 1.15fr; gap: 52px; align-items:center; padding: 60px 0; }
.story-section img { border-radius: var(--radius-m); width:100%; aspect-ratio: 4/5; object-fit:cover; box-shadow: var(--shadow); }
.story-section h2 { font-size: 28px; margin: 0 0 18px; }
.story-section p { color: var(--ink-soft); font-size: 16px; }

.insta-cta {
  background: var(--ink); color:#fff; border-radius: var(--radius-m);
  padding: 46px 40px; text-align:center; margin: 20px 0 60px;
}
.insta-cta h3 { font-size: 24px; margin: 0 0 10px; }
.insta-cta p { color: rgba(247,243,236,0.8); margin: 0 0 24px; }

/* --- Products catalog page --- */
.catalog-head { padding: 40px 0 10px; text-align:center; }
.catalog-head h1 { font-size: 34px; margin: 0 0 10px; }
.catalog-head p { color: var(--ink-soft); }
.filter-bar { display:flex; gap: 10px; flex-wrap:wrap; justify-content:center; padding: 22px 0 10px; }
.filter-chip {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
  background:#fff; font-size: 14px; font-weight:700;
}
.filter-chip.active { background: var(--ink); color:#fff; border-color: var(--ink); }

@media (max-width: 860px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .story-section { grid-template-columns: 1fr; }
}

