/* KAZOZTA — homepage stylesheet.
   Mobile-first. Brand palette lives in :root. */

/* Cairo — self-hosted variable font (weight axis 200-1000), covers both
   Arabic and Latin script so the whole page renders from one type family. */
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../assets/fonts/cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../assets/fonts/cairo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --green: #193b27;
  --gold: #b88a32;
  --cream: #f7f2e7;
  --ink: #17301f;
  --white: #ffffff;
  --muted: #6f756d;
  --line: #ded6c5;
  --header-h: 64px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 8px;
  top: -48px;
  background: var(--green);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(25, 59, 39, 0.22);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(25, 59, 39, 0.28);
}

.btn--secondary {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: rgba(25, 59, 39, 0.06);
  transform: translateY(-2px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 231, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand__logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding: 10px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--green);
  text-decoration: none;
}

.cart-link:hover,
.cart-link:focus-visible {
  background: rgba(25, 59, 39, 0.08);
}

.cart-link .icon {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--green);
  cursor: pointer;
  border-radius: 50%;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(25, 59, 39, 0.08);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav.is-open {
  display: flex;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 16px 16px;
}

.nav.is-open a {
  width: 100%;
  padding: 10px 0;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    position: static;
    background: none;
    border: none;
    padding: 0;
  }

  .nav-toggle {
    display: none;
  }
}

/* Sections */

.section {
  padding: 64px 16px;
  max-width: var(--container);
  margin: 0 auto;
  scroll-margin-top: var(--header-h);
}

#hero {
  scroll-margin-top: var(--header-h);
}

.section--muted {
  max-width: none;
  background: var(--white);
}

.section--muted > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.section__header {
  text-align: center;
  margin-bottom: 40px;
}

.section__header h2 {
  font-size: 28px;
  color: var(--green);
  margin: 0 0 10px;
}

.section__subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* Reveal-on-scroll animation */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 16px 48px;
  text-align: center;
  background: radial-gradient(circle at 20% 15%, rgba(184, 138, 50, 0.12), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(25, 59, 39, 0.1), transparent 50%),
    var(--cream);
}

@media (min-width: 768px) {
  .hero {
    padding: 72px 24px;
  }
}

.hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

@media (min-width: 768px) {
  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    gap: 48px;
  }
}

.hero__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--green);
  opacity: 0.08;
}

.hero__leaf {
  position: absolute;
  width: 220px;
  height: 220px;
}

.hero__leaf--one {
  top: -40px;
  inset-inline-start: -50px;
  transform: rotate(20deg);
}

.hero__leaf--two {
  bottom: -60px;
  inset-inline-end: -60px;
  transform: rotate(200deg);
}

.hero__content {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero__content {
    margin: 0;
    flex: 1 1 420px;
    max-width: 480px;
  }
}

.hero__visual {
  display: none;
}

@media (min-width: 768px) {
  .hero__visual {
    display: block;
    position: relative;
    flex: 1 1 360px;
    max-width: 380px;
  }
}

.hero__visual-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(25, 59, 39, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero__visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(25, 59, 39, 0.06);
}

.hero__visual-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero__tagline-en {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 14px;
  font-weight: 600;
}

.hero__title {
  font-size: clamp(30px, 5.5vw, 48px);
  color: var(--green);
  margin: 0 0 16px;
  font-weight: 700;
  line-height: 1.25;
}

.hero__subtitle {
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 28px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

@media (min-width: 768px) {
  .hero__ctas {
    justify-content: flex-start;
  }
}

/* Products */

/* auto-fit + a 1fr max (not a fixed px max) so the browser counts columns
   using the minmax() MIN value — with a fixed max it counts using the max
   instead, producing fewer/wider columns than intended. justify-items
   centers each card within its track, which also centers a lone card when
   auto-fit collapses the other (empty) tracks to 0 width — no products.json
   item count is special-cased in CSS or JS. */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  justify-items: center;
}

@media (min-width: 480px) {
  .product-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
}

@media (min-width: 768px) {
  .product-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .product-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
  }
}

.product-card {
  width: 100%;
  max-width: 220px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  box-shadow: 0 12px 30px rgba(25, 59, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 480px) {
  .product-card {
    max-width: 260px;
    border-radius: 18px;
    padding: 16px;
    gap: 8px;
  }
}

@media (min-width: 768px) {
  .product-card {
    max-width: 280px;
  }
}

@media (min-width: 1024px) {
  .product-card {
    max-width: 300px;
  }
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(25, 59, 39, 0.1);
}

.product-card__media {
  position: relative;
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--cream);
}

.product-card__image--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 8px;
}

.product-card__badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}

@media (min-width: 480px) {
  .product-card__badge {
    top: 10px;
    inset-inline-start: 10px;
    font-size: 11px;
    padding: 5px 10px;
  }
}

.product-card__title {
  font-size: 14px;
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
}

@media (min-width: 480px) {
  .product-card__title {
    font-size: 17px;
    margin: 6px 0 0;
  }
}

.product-card__description {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

@media (min-width: 480px) {
  .product-card__description {
    font-size: 13px;
  }
}

.product-card__price {
  font-weight: 700;
  color: var(--green);
  margin: 2px 0 4px;
  font-size: 15px;
}

@media (min-width: 480px) {
  .product-card__price {
    font-size: 19px;
    margin: 4px 0 6px;
  }
}

.product-card__add {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 10px 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease, transform 0.15s ease;
}

@media (min-width: 480px) {
  .product-card__add {
    padding: 12px 14px;
    font-size: 14px;
  }
}

.product-card__add:hover:not(:disabled) {
  transform: translateY(-1px);
}

.product-card__add:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

/* Why KAZOZTA features */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: 56px 16px;
  max-width: var(--container);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 72px 24px;
  }
}

.feature {
  text-align: center;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .feature {
    padding: 16px 24px;
    border-inline-start: 1px solid var(--line);
  }

  .feature:first-child {
    border-inline-start: none;
  }
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--green);
  margin-bottom: 20px;
}

.feature__icon svg {
  width: 40px;
  height: 40px;
}

.feature h3 {
  font-size: 20px;
  color: var(--green);
  margin: 0;
  font-weight: 700;
}

/* About */

.about {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.about__mark {
  width: 48px;
  height: 48px;
  color: var(--gold);
  margin: 0 auto 18px;
  opacity: 0.85;
}

.about h2 {
  font-size: 28px;
  color: var(--green);
  margin: 0 0 20px;
  font-weight: 700;
}

.about__text {
  color: var(--ink);
  font-size: 16.5px;
  line-height: 2;
  max-width: 560px;
  margin: 0 auto;
}

/* Social / contact */

.contact {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact h2 {
  font-size: 28px;
  color: var(--green);
  margin: 0 0 12px;
  font-weight: 700;
}

.contact__text {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
}

.social {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 32px 16px 0;
}

.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--green);
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.social__link:hover,
.social__link:focus-visible {
  background: var(--green);
  color: var(--white);
  transform: translateY(-2px);
}

.social__link svg {
  width: 20px;
  height: 20px;
}

/* Cart + checkout */

#cart {
  scroll-margin-top: var(--header-h);
}

.cart-inner {
  max-width: 640px;
  margin: 0 auto;
}

#cart h2 {
  font-size: 22px;
  color: var(--green);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
  margin-bottom: 18px;
  display: inline-block;
}

.cart-empty {
  display: none;
  text-align: center;
  padding: 32px 16px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 14px;
  margin-bottom: 24px;
}

.cart-inner.is-empty .cart-empty {
  display: block;
}

.cart-inner.is-empty .cart-items,
.cart-inner.is-empty .cart-total,
.cart-inner.is-empty .order-form {
  display: none;
}

.cart-empty__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.cart-empty__hint {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.cart-items {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.cart-item__name {
  flex: 1 1 100%;
  font-size: 15px;
  font-weight: 600;
}

.cart-item__step {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.cart-item__step:hover {
  border-color: var(--gold);
}

.cart-item__qty {
  min-width: 22px;
  text-align: center;
}

.cart-item__line-total {
  margin-inline-start: auto;
  font-weight: 700;
  color: var(--green);
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  padding: 12px 4px;
  min-height: 44px;
}

.cart-total {
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 32px;
  color: var(--green);
}

.order-form {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.order-form__title {
  font-size: 18px;
  color: var(--green);
  margin: 0 0 18px;
}

.form-field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  padding: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-field textarea {
  min-height: 80px;
  resize: vertical;
}

.order-form__submit {
  width: 100%;
  font-size: 15px;
  padding: 14px;
}

.order-status {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--green);
  min-height: 1em;
}

.order-status--error {
  color: #a33b2a;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 48px 16px 32px;
  background: var(--green);
  color: var(--cream);
}

.site-footer__logo {
  height: 44px;
  width: auto;
  margin: 0 auto 14px;
  background: var(--cream);
  padding: 6px 12px;
  border-radius: 10px;
  object-fit: contain;
}

.site-footer__tagline {
  margin: 0 0 20px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(247, 242, 231, 0.85);
}

.site-footer .social {
  padding: 0 0 20px;
}

.site-footer .social__link {
  background: rgba(247, 242, 231, 0.1);
  color: var(--cream);
}

.site-footer .social__link:hover,
.site-footer .social__link:focus-visible {
  background: var(--gold);
  color: var(--white);
}

.site-footer__copyright {
  margin: 0;
  font-size: 12px;
  color: rgba(247, 242, 231, 0.6);
}
