:root {
  --coffee: #3b2519;
  --espresso: #1f1510;
  --caramel: #b4773d;
  --cream: #fff8ec;
  --latte: #ead7bd;
  --paper: #fffdf8;
  --sage: #657a61;
  --teal: #245f61;
  --line: rgba(59, 37, 25, 0.14);
  --shadow: 0 24px 60px rgba(31, 21, 16, 0.14);
  --radius: 8px;
  --font-body: IRANSans, Tahoma, Arial, sans-serif;
  --font-heading: iranyekan, IRANSans, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--coffee);
  font-family: var(--font-body);
  line-height: 1.9;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 248, 236, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(31, 21, 16, 0.05);
  backdrop-filter: blur(18px) saturate(130%);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 22px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 12px; font-family: var(--font-heading); font-weight: 800; color: var(--espresso); }
.brand img { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; }
.brand span { white-space: nowrap; }
.nav-links { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; gap: 4px; padding: 0; margin: 0; list-style: none; }
.nav-links a { display: inline-flex; padding: 9px 12px; border-radius: 999px; color: rgba(59, 37, 25, 0.76); font-family: var(--font-heading); font-size: 0.95rem; transition: 0.2s ease; }
.nav-links a:hover,
.nav-links a.active,
.nav-links a:focus-visible {
  background: rgba(180, 119, 61, 0.14);
  color: var(--espresso);
}
.nav-actions { display: inline-flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; gap: 10px; }
.header-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--coffee);
  color: #fffaf3;
  font-family: var(--font-heading);
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(59, 37, 25, 0.16);
  transition: 0.2s ease;
}
.header-cta:hover { background: var(--espresso); transform: translateY(-1px); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--coffee); }

.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 70px 0 56px;
  background: linear-gradient(135deg, #fffaf2 0%, #f1dfc5 58%, #d7b27b 100%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.28;
}
.hero::before {
  width: 240px;
  height: 240px;
  left: -76px;
  top: 72px;
  border: 1px solid rgba(59, 37, 25, 0.16);
  border-radius: 50%;
}
.hero::after {
  right: 5%;
  bottom: 42px;
  width: 148px;
  height: 92px;
  border-top: 2px solid rgba(59, 37, 25, 0.16);
  border-radius: 50%;
  transform: rotate(-14deg);
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(135deg, #fffaf2, #d7b27b);
  background-position: center;
  background-size: cover;
  opacity: 1;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 5.8s ease;
}
.hero-slide-bg.is-fading {
  opacity: 0.28;
  transform: scale(1);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 16% 22%, rgba(180, 119, 61, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(31, 21, 16, 0.22) 0%, rgba(59, 37, 25, 0.16) 35%, rgba(255, 248, 236, 0.84) 62%, rgba(255, 248, 236, 0.96) 100%);
}
.hero-grid, .wholesale-grid, .about-grid, .contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 56px;
}
.hero-slider-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(82vh - 126px);
  align-items: center;
  justify-content: flex-start;
}
.hero-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 48px;
}
.eyebrow { margin: 0 0 10px; color: var(--teal); font-family: var(--font-heading); font-size: 0.92rem; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; color: var(--espresso); font-size: clamp(3.25rem, 5vw, 4.35rem); line-height: 1.18; }
h2 { margin-bottom: 18px; color: var(--espresso); font-size: clamp(1.7rem, 3vw, 3rem); line-height: 1.35; }
h3 { color: var(--espresso); font-size: 1.2rem; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; }
.hero-copy {
  width: min(620px, 100%);
  padding: 28px 0;
}
.hero-slider h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(3.35rem, 5.25vw, 4.55rem);
  line-height: 1.15;
}
.hero-text { max-width: 560px; margin-bottom: 26px; color: rgba(59, 37, 25, 0.78); font-size: 1.08rem; }
.hero-slider .hero-text {
  color: rgba(59, 37, 25, 0.82);
  font-size: 1.12rem;
}
.hero-actions, .split-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coffee); color: #fffaf3; box-shadow: 0 12px 26px rgba(59, 37, 25, 0.2); }
.btn-secondary { background: rgba(255, 253, 248, 0.66); border-color: rgba(59, 37, 25, 0.2); color: var(--coffee); }
.trust-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 18px 0 0;
  color: rgba(59, 37, 25, 0.68);
  font-size: 0.94rem;
}
.trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trust-line span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--caramel);
  box-shadow: 0 0 0 4px rgba(180, 119, 61, 0.12);
}

.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(59, 37, 25, 0.1), rgba(180, 119, 61, 0.18)),
    var(--latte);
}
.image-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-frame.image-missing::after {
  content: "تصویر آوند کافی";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(59, 37, 25, 0.55);
  font-weight: 800;
}
.image-frame.image-missing img { display: none; }
.hero-media {
  min-height: 520px;
  margin: 0;
  border: 1px solid rgba(255, 253, 248, 0.44);
  box-shadow: 0 28px 70px rgba(31, 21, 16, 0.2);
}
.hero-media img { object-position: center; }
.hero-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(59, 37, 25, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.68);
  color: var(--coffee);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
  transition: 0.2s ease;
}
.hero-arrow:hover,
.hero-arrow:focus-visible {
  background: var(--coffee);
  color: #fffaf3;
}
.hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(59, 37, 25, 0.3);
  cursor: pointer;
  padding: 0;
  transition: 0.2s ease;
}
.hero-dot.active {
  width: 28px;
  background: var(--coffee);
}
.anchor-target {
  display: block;
  height: 1px;
  scroll-margin-top: 92px;
}
.feature-strip {
  position: relative;
  z-index: 2;
  background: #fffdf8;
  border-top: 1px solid rgba(59, 37, 25, 0.1);
  border-bottom: 1px solid rgba(59, 37, 25, 0.1);
}
.feature-strip-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 14px 0;
}
.feature-strip-inner div {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--espresso);
  font-family: var(--font-heading);
  font-weight: 800;
  text-align: center;
}
.feature-strip-inner span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(36, 95, 97, 0.11);
}
.category-image {
  height: 230px;
  margin: -24px -24px 22px;
  border-radius: 8px 8px 0 0;
}
.price-banner { aspect-ratio: 16 / 5; margin-bottom: 34px; box-shadow: 0 16px 38px rgba(31, 21, 16, 0.08); }
.wholesale-media { min-height: 540px; box-shadow: var(--shadow); }

.section { padding: 88px 0; }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.split-heading { max-width: none; justify-content: space-between; }
.category-grid, .benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.category-card, .benefit-grid article, .contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(31, 21, 16, 0.06);
}
.category-heading {
  max-width: 780px;
}
.category-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(59, 37, 25, 0.72);
  font-size: 1.05rem;
}
.category-card {
  display: flex;
  min-height: 510px;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 119, 61, 0.28);
  box-shadow: 0 24px 54px rgba(31, 21, 16, 0.12);
}
.category-card:hover .category-image img {
  transform: scale(1.045);
}
.category-card h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
  line-height: 1.55;
}
.category-card p, .benefit-grid p, .wholesale p, .about p { color: rgba(59, 37, 25, 0.72); }
.category-card p {
  margin-bottom: 22px;
}
.category-image img {
  transition: transform 0.45s ease;
}
.category-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 8px 14px;
  border: 1px solid rgba(59, 37, 25, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 248, 236, 0.82);
  color: var(--coffee);
  font-family: var(--font-heading);
  font-weight: 800;
  transition: 0.2s ease;
}
.category-action:hover,
.category-action:focus-visible {
  background: var(--coffee);
  color: #fffaf3;
}

.prices-section { background: #fffdf8; }
.price-tools { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; margin-bottom: 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  color: var(--coffee);
  font-family: var(--font-heading);
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover { background: var(--teal); color: white; }
.search-box { display: grid; gap: 6px; color: rgba(59, 37, 25, 0.76); font-family: var(--font-heading); font-weight: 800; }
.search-box input, .contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
  color: var(--coffee);
  outline: none;
}
.search-box input:focus, .contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(36, 95, 97, 0.12);
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.price-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.price-table th, .price-table td { padding: 15px 16px; text-align: right; border-bottom: 1px solid rgba(59, 37, 25, 0.1); }
.price-table th { background: var(--coffee); color: #fffaf3; font-family: var(--font-heading); font-size: 0.95rem; }
.price-table tr:hover td { background: #fff8ec; }
.tag { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: rgba(180, 119, 61, 0.13); color: #7a431f; font-family: var(--font-heading); font-weight: 800; white-space: nowrap; }
.empty-state { display: none; padding: 24px; margin: 0; text-align: center; }
.price-note { margin: 18px 0 0; color: rgba(59, 37, 25, 0.72); }

.section-background {
  position: relative;
  overflow: hidden;
  background-color: var(--cream);
  background-position: center;
  background-size: cover;
}
.section-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.glass-card {
  background: rgba(255, 248, 238, 0.84);
  border: 1px solid rgba(80, 50, 30, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(60, 38, 22, 0.12);
  backdrop-filter: blur(9px);
}
.wholesale {
  background-image: url("./assets/images/corporate_background.png");
}
.wholesale.section,
.contact.section {
  padding: 104px 0;
}
.wholesale .section-overlay {
  background:
    linear-gradient(90deg, rgba(31, 21, 16, 0.05) 0%, rgba(255, 248, 236, 0.46) 38%, rgba(255, 248, 236, 0.9) 100%),
    radial-gradient(circle at 78% 22%, rgba(180, 119, 61, 0.18), transparent 28%);
}
.wholesale-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 650px) 1fr;
  align-items: center;
  min-height: 620px;
}
.wholesale-panel {
  padding: 34px;
}
.benefit-grid { grid-template-columns: 1fr; margin-top: 24px; }
.benefit-grid article { padding: 22px; background: rgba(255, 253, 248, 0.72); }
.wholesale-cta {
  margin-top: 24px;
}
.about-grid { grid-template-columns: 220px 1fr; }
.about-mark {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--espresso);
  color: var(--caramel);
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 900;
}
.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.about-highlights article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 14px 34px rgba(31, 21, 16, 0.06);
}
.about-highlights h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}
.about-highlights p {
  margin-bottom: 0;
  font-size: 0.94rem;
}
.contact {
  background-image: url("./assets/images/contact_us_background.png");
}
.contact .section-overlay {
  background:
    linear-gradient(90deg, rgba(255, 248, 236, 0.9) 0%, rgba(255, 248, 236, 0.76) 54%, rgba(31, 21, 16, 0.2) 100%),
    radial-gradient(circle at 24% 20%, rgba(180, 119, 61, 0.18), transparent 26%);
}
.contact-grid {
  position: relative;
  z-index: 1;
}
.contact-info {
  padding: 30px;
}
.contact-info > p:not(.eyebrow) {
  color: rgba(59, 37, 25, 0.74);
}
.contact-list { padding: 0; margin: 22px 0 0; list-style: none; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid rgba(59, 37, 25, 0.1); }
.ltr-text {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
.contact-phone,
.protected-email {
  color: var(--coffee);
}
.contact-phone:hover,
.protected-email:hover {
  color: var(--teal);
}
.form-intro h3 {
  margin-bottom: 6px;
}
.form-intro p {
  margin-bottom: 0;
  color: rgba(59, 37, 25, 0.72);
  font-size: 0.95rem;
}
.contact-form { display: grid; gap: 16px; padding: 26px; }
.contact-form label { display: grid; gap: 6px; font-family: var(--font-heading); font-weight: 800; }
.form-message { min-height: 28px; margin: 0; color: var(--teal); font-family: var(--font-heading); font-weight: 800; }
.site-footer { padding: 46px 0 22px; background: var(--espresso); color: #fff8ec; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.footer-col h3,
.footer-col h4 {
  margin: 0 0 12px;
  color: #fff8ec;
  font-family: var(--font-heading);
}
.footer-col p {
  margin-bottom: 10px;
  color: rgba(255, 248, 236, 0.76);
}
.footer-links {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.footer-links a {
  color: rgba(255, 248, 236, 0.76);
  transition: 0.2s ease;
}
.footer-links a:hover {
  color: #fff8ec;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 248, 236, 0.14);
  color: rgba(255, 248, 236, 0.72);
}
.footer-bottom p { margin: 0; }
.back-to-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 1.35rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.2s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: var(--radius); }
  .hero-grid, .wholesale-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 52px 0 36px; }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(255, 248, 236, 0.95) 0%, rgba(255, 248, 236, 0.84) 58%, rgba(59, 37, 25, 0.2) 100%);
  }
  .hero-slider-inner {
    display: block;
    min-height: auto;
  }
  .hero-copy {
    width: min(620px, 100%);
    padding: 0 0 28px;
  }
  h1 { font-size: clamp(2.35rem, 8vw, 3.4rem); }
  .hero-media, .wholesale-media { min-height: 380px; }
  .hero-controls {
    position: static;
    margin-top: 8px;
  }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .price-tools { grid-template-columns: 1fr; }
  .feature-strip-inner { grid-template-columns: 1fr; padding: 10px 0; }
  .feature-strip-inner div { justify-content: flex-start; min-height: 46px; }
  .about-highlights { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: grid; }
  .wholesale.section,
  .contact.section {
    padding: 76px 0;
  }
  .wholesale-content {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .wholesale-panel,
  .contact-info {
    padding: 26px;
  }
  .wholesale .section-overlay {
    background: linear-gradient(180deg, rgba(255, 248, 236, 0.92), rgba(255, 248, 236, 0.78));
  }
  .contact .section-overlay {
    background: linear-gradient(180deg, rgba(255, 248, 236, 0.9), rgba(255, 248, 236, 0.76));
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 22px, 1120px); }
  .nav { min-height: 72px; }
  .brand span { font-size: 0.9rem; }
  .brand img { width: 44px; height: 44px; }
  .nav-links { top: 72px; }
  .header-cta { min-height: 40px; padding: 8px 12px; font-size: 0.86rem; }
  .section { padding: 64px 0; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: auto; padding: 20px; }
  .category-image { height: 210px; margin: -20px -20px 20px; }
  .category-action { width: 100%; min-height: 46px; }
  .hero-actions .btn, .split-heading .btn { width: 100%; }
  .hero { padding: 34px 0 28px; }
  h1 { font-size: clamp(2.05rem, 10vw, 2.65rem); line-height: 1.24; }
  .hero-slider h1 { font-size: clamp(2.05rem, 10vw, 2.65rem); }
  .hero-text { font-size: 1rem; }
  .trust-line { font-size: 0.88rem; }
  .hero-arrow { width: 38px; height: 38px; }
  .hero-media, .wholesale-media { min-height: 320px; }
  .price-banner { aspect-ratio: 4 / 3; }
  .about-mark { width: 142px; height: 142px; font-size: 4.5rem; }
  .footer-inner { display: grid; }
}
