:root {
  color-scheme: light;
  --leaf-900: #073b19;
  --leaf-800: #0b5422;
  --leaf-700: #0d6429;
  --leaf-500: #44a629;
  --leaf-100: #ecf8e8;
  --tomato: #e94b35;
  --citrus: #f8b62d;
  --grape: #7b2f86;
  --earth: #5f3a1b;
  --ink: #172016;
  --muted: #536650;
  --line: #c9d9bf;
  --paper: #e7f0dc;
  --white: #fff9ee;
  --shadow: 0 18px 45px rgba(7, 59, 25, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(68, 166, 41, 0.18) 0, rgba(231, 240, 220, 0.94) 330px, rgba(246, 239, 216, 0.92) 100%),
    repeating-linear-gradient(135deg, rgba(13, 100, 41, 0.05) 0 1px, transparent 1px 30px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  padding-bottom: 86px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("assets/pazar-logo.png") no-repeat right -150px top 116px / min(58vw, 640px) auto;
  opacity: 0.055;
}

body > * {
  position: relative;
  z-index: 1;
}

body.is-loading {
  overflow: hidden;
}

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px;
  background:
    repeating-linear-gradient(135deg, rgba(13, 100, 41, 0.05) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #f6efd8 0%, #e7f0dc 100%);
  color: var(--leaf-900);
  text-align: center;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.intro-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/pazar-logo.png") no-repeat center 18% / min(420px, 62vw) auto;
  opacity: 0.06;
}

.intro-loader > * {
  position: relative;
  z-index: 1;
}

.intro-loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-dot {
  position: absolute;
  top: 17%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--tomato);
  box-shadow: 0 0 0 0 rgba(233, 75, 53, 0.34);
  animation: dotPulse 900ms ease-in-out infinite;
}

.loader-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(7, 59, 25, 0.14));
}

.loader-word {
  max-width: 100%;
  color: #07130a;
  font-size: 5.4rem;
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    5px 5px 0 rgba(248, 134, 31, 0.92),
    10px 10px 0 rgba(13, 100, 41, 0.18);
  transform: translateY(10px);
  animation: loaderWord 760ms ease forwards;
}

.intro-loader p {
  margin: 4px 0 0;
  color: var(--leaf-700);
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

@keyframes dotPulse {
  0% {
    transform: scale(0.8);
    box-shadow: 0 0 0 0 rgba(233, 75, 53, 0.34);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 14px rgba(233, 75, 53, 0);
  }

  100% {
    transform: scale(0.8);
    box-shadow: 0 0 0 0 rgba(233, 75, 53, 0);
  }
}

@keyframes loaderWord {
  to {
    transform: translateY(0);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(233, 243, 224, 0.94);
  border-bottom: 1px solid rgba(13, 100, 41, 0.16);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 132px;
}

.brand img {
  display: block;
  width: 142px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.quick-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.quick-nav a,
.ghost-button,
.category-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 249, 238, 0.86);
  color: var(--leaf-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.quick-nav a:hover,
.ghost-button:hover,
.category-button:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 100, 41, 0.35);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--leaf-700);
  color: var(--white);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 10px 20px rgba(13, 100, 41, 0.18);
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.mobile-menu[hidden] {
  display: none;
}

.icon-button {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--leaf-700);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(13, 100, 41, 0.18);
}

.button-icon,
.action-icon {
  width: 1.12em;
  height: 1.12em;
  flex: 0 0 auto;
  fill: currentColor;
}

.icon-button-whatsapp {
  background: #1fae54;
}

.catalog-hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 360px;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 34px;
}

.hero-copy {
  padding: 34px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--leaf-700);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--leaf-900);
  font-size: clamp(3.1rem, 9vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-text {
  width: min(620px, 100%);
  margin: 24px 0 0;
  color: #2b3d28;
  font-size: 1.18rem;
  font-weight: 650;
}

.search-panel {
  background: rgba(255, 249, 238, 0.92);
  border: 1px solid rgba(13, 100, 41, 0.18);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--leaf-900);
  font-weight: 900;
}

.search-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf5;
  padding: 7px;
}

.search-icon {
  width: 36px;
  color: var(--leaf-700);
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
}

.search-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
}

.search-row input::placeholder {
  color: #7b8879;
  font-weight: 650;
}

.search-button,
.card-action,
.mobile-contact a {
  border: 0;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--leaf-700);
  font-weight: 900;
  cursor: pointer;
}

.search-button {
  min-height: 44px;
  padding: 0 18px;
}

.result-meta {
  min-height: 24px;
  margin: 13px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.category-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
}

.category-buttons {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 0 10px;
  scrollbar-width: thin;
}

.category-button {
  flex: 0 0 auto;
  gap: 8px;
}

.category-button[aria-pressed="true"] {
  background: var(--leaf-700);
  color: var(--white);
  border-color: var(--leaf-700);
}

.category-count {
  min-width: 26px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  padding: 0 8px;
  font-size: 0.82rem;
}

.category-button:not([aria-pressed="true"]) .category-count {
  background: var(--leaf-100);
  color: var(--leaf-800);
}

.products-section {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  color: var(--leaf-900);
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.ghost-button {
  background: transparent;
}

.status-row {
  display: flex;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  position: relative;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 243, 0.99), rgba(248, 239, 214, 0.97));
  border: 1px solid rgba(13, 100, 41, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(7, 59, 25, 0.14);
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--leaf-700), var(--leaf-500), var(--citrus), var(--tomato));
  z-index: 2;
}

.product-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: 92px;
  width: 112px;
  height: 112px;
  border-radius: 42% 58% 45% 55%;
  background: rgba(68, 166, 41, 0.06);
  transform: rotate(-18deg);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 100, 41, 0.32);
  box-shadow: 0 22px 42px rgba(7, 59, 25, 0.18);
}

.product-media {
  position: relative;
  min-height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 249, 238, 0.72), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, rgba(68, 166, 41, 0.22), rgba(248, 182, 45, 0.22) 58%, rgba(233, 75, 53, 0.14));
  border-bottom: 1px solid rgba(13, 100, 41, 0.1);
}

.product-card:nth-child(4n + 2) .product-media {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 249, 238, 0.7), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, rgba(233, 75, 53, 0.16), rgba(248, 182, 45, 0.2), rgba(68, 166, 41, 0.18));
}

.product-card:nth-child(4n + 3) .product-media {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 249, 238, 0.72), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, rgba(13, 100, 41, 0.2), rgba(68, 166, 41, 0.18), rgba(248, 182, 45, 0.16));
}

.product-card:nth-child(4n + 4) .product-media {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 249, 238, 0.72), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, rgba(123, 47, 134, 0.13), rgba(68, 166, 41, 0.18), rgba(248, 182, 45, 0.18));
}

.product-media::before {
  content: "";
  position: absolute;
  width: 112px;
  height: 78px;
  border-radius: 52% 48% 50% 50%;
  background: rgba(255, 249, 238, 0.76);
  border: 1px solid rgba(13, 100, 41, 0.1);
  box-shadow:
    inset 0 -10px 18px rgba(248, 182, 45, 0.08),
    0 18px 28px rgba(7, 59, 25, 0.12);
}

.product-emoji {
  position: relative;
  z-index: 1;
  font-size: 4.65rem;
  line-height: 1;
  filter: drop-shadow(0 12px 14px rgba(7, 59, 25, 0.18));
}

.stock-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  border-radius: 999px;
  background: rgba(7, 59, 25, 0.92);
  color: var(--white);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(7, 59, 25, 0.12);
}

.product-content {
  position: relative;
  z-index: 1;
  padding: 15px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-label,
.origin-label {
  min-width: 0;
  border-radius: 999px;
  background: rgba(236, 248, 232, 0.88);
  padding: 4px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.origin-label {
  background: rgba(255, 243, 212, 0.9);
  color: var(--earth);
}

h3 {
  min-height: 56px;
  margin: 10px 0 5px;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.product-note {
  min-height: 44px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: auto;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(233, 75, 53, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 247, 232, 0.92);
  padding: 9px 10px;
}

.price {
  color: var(--tomato);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 950;
}

.unit {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.card-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  text-align: center;
  box-shadow: 0 10px 18px rgba(7, 59, 25, 0.12);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.card-action:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 14px 24px rgba(7, 59, 25, 0.18);
}

.whatsapp-action {
  background: linear-gradient(135deg, #1fae54, #138d43);
}

.call-action {
  background: linear-gradient(135deg, var(--leaf-700), var(--leaf-800));
}

.empty-state {
  display: none;
}

.mobile-contact {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(251, 253, 248, 0.96);
  border-top: 1px solid rgba(13, 100, 41, 0.15);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  backdrop-filter: blur(18px);
}

.mobile-contact a {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
}

.mobile-contact a:last-child {
  background: #1fae54;
}

@media (max-width: 1020px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-copy {
    padding-bottom: 0;
  }
}

@media (max-width: 780px) {
  body {
    padding-bottom: 86px;
  }

  .header-inner {
    width: min(100% - 22px, 1180px);
    min-height: 68px;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .brand img {
    width: 122px;
    height: 52px;
  }

  .quick-nav {
    display: none;
  }

  .header-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    position: fixed;
    top: 76px;
    right: 11px;
    z-index: 30;
    width: min(310px, calc(100% - 22px));
    display: grid;
    gap: 8px;
    border: 1px solid rgba(13, 100, 41, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 249, 238, 0.98);
    box-shadow: 0 18px 48px rgba(7, 59, 25, 0.22);
    padding: 10px;
    backdrop-filter: blur(18px);
  }

  .mobile-menu a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: var(--radius);
    background: rgba(236, 248, 232, 0.82);
    color: var(--leaf-900);
    padding: 0 13px;
    font-weight: 900;
  }

  .mobile-menu a::after {
    content: "›";
    color: var(--leaf-700);
    font-size: 1.3rem;
    line-height: 1;
  }

  .mobile-menu-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 4px;
  }

  .mobile-menu-contact a {
    justify-content: center;
    background: var(--leaf-700);
    color: var(--white);
  }

  .mobile-menu-contact a:last-child {
    background: #1fae54;
  }

  .mobile-menu-contact a::after {
    content: none;
  }

  .catalog-hero,
  .category-strip,
  .products-section {
    width: min(100% - 22px, 1180px);
  }

  .catalog-hero {
    min-height: auto;
    margin-top: 18px;
  }

  .hero-copy {
    padding-top: 18px;
  }

  .hero-text {
    margin-top: 16px;
    font-size: 1rem;
  }

  .search-panel {
    padding: 14px;
  }

  .search-row {
    grid-template-columns: auto 1fr;
  }

  .search-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-media {
    min-height: 130px;
  }

  .product-emoji {
    font-size: 3.6rem;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .card-action {
    width: 100%;
    min-height: 48px;
  }

  .mobile-contact {
    display: grid;
  }
}

@media (max-width: 520px) {
  body::before {
    background-position: center top 86px;
    background-size: 390px auto;
    opacity: 0.04;
  }

  .intro-loader {
    gap: 14px;
  }

  .loader-logo {
    width: 68px;
    height: 68px;
  }

  .loader-word {
    font-size: 2.45rem;
    text-shadow:
      3px 3px 0 rgba(248, 134, 31, 0.92),
      6px 6px 0 rgba(13, 100, 41, 0.18);
  }

  .intro-loader p {
    font-size: 0.76rem;
  }

  h1 {
    font-size: 3.6rem;
  }

  .products-section {
    width: min(100% - 16px, 1180px);
  }

  .product-media {
    min-height: 108px;
  }

  .product-media::before {
    width: 82px;
    height: 58px;
  }

  .product-emoji {
    font-size: 2.75rem;
  }

  .product-content {
    padding: 9px;
  }

  .product-topline {
    gap: 4px;
    min-height: 21px;
    font-size: 0.6rem;
  }

  .category-label,
  .origin-label {
    padding: 3px 5px;
  }

  h3 {
    min-height: 36px;
    margin: 7px 0 4px;
    font-size: 0.98rem;
    line-height: 1.08;
  }

  .product-note {
    min-height: 34px;
    margin-bottom: 8px;
    font-size: 0.73rem;
    line-height: 1.25;
  }

  .stock-pill {
    top: 7px;
    right: 7px;
    max-width: calc(100% - 14px);
    text-align: center;
    font-size: 0.56rem;
    padding: 4px 6px;
  }

  .price-line {
    width: 100%;
    justify-content: center;
    gap: 4px;
    padding: 7px 5px;
  }

  .price {
    font-size: 1.02rem;
  }

  .unit {
    font-size: 0.68rem;
  }

  .product-actions {
    gap: 7px;
    margin-top: 9px;
  }

  .card-action {
    min-height: 38px;
    gap: 5px;
    padding: 0 6px;
    font-size: 0.76rem;
  }

  .card-action .action-icon {
    width: 1em;
    height: 1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
