@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

:root {
  --primary: #c45c26;
  --primary-dark: #a34a1c;
  --primary-light: #e8a07a;
  --accent: #d4a853;
  --bg-dark: #1a1714;
  --bg-card: #ffffff;
  --bg-cream: #faf7f2;
  --bg-muted: #f3efe8;
  --text-dark: #2c2825;
  --text-muted: #6b6560;
  --text-light: #faf7f2;
  --border: rgba(44, 40, 37, 0.1);
  --shadow-sm: 0 2px 8px rgba(26, 23, 20, 0.06);
  --shadow-md: 0 8px 30px rgba(26, 23, 20, 0.1);
  --shadow-lg: 0 20px 60px rgba(26, 23, 20, 0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
  --nav-offset: 72px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;

  /* legacy aliases */
  --primary-color: var(--primary);
  --text-color: var(--text-light);
  --background-dark: rgba(26, 23, 20, 0.85);
  --accent-color: var(--accent);
  --transition-speed: var(--transition);
  --instagram-color: #e1306c;
  --email-color: #3b5998;
  --phone-color: #25d366;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transition: opacity 0.4s ease;
}

body.rtl,
[dir="rtl"] body {
  font-family: "Vazirmatn", var(--font-body);
}

.fade-out {
  opacity: 0;
}

.fade-in {
  opacity: 1;
}

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

a {
  color: inherit;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(26, 23, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(26, 23, 20, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-brand {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: rgba(250, 247, 242, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.auth-links {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.auth-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}

.auth-link:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.auth-link--ghost {
  background: transparent;
  border: 1.5px solid rgba(250, 247, 242, 0.35);
}

.auth-link--ghost:hover {
  background: rgba(250, 247, 242, 0.1);
  border-color: rgba(250, 247, 242, 0.6);
}

.lang-switch {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}

.lang-switch:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ── Buttons ── */
.btn,
.auth-link,
.lang-switch,
.add-to-cart {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 92, 38, 0.35);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: white;
  transform: translateY(-2px);
}

/* ── Hero (Home) ── */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hero-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../images/pizza.jpg") center 30% / cover no-repeat;
  overflow: hidden;
}

.hero-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 23, 20, 0.82) 0%,
    rgba(26, 23, 20, 0.55) 50%,
    rgba(26, 23, 20, 0.75) 100%
  );
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-light);
  padding: calc(var(--nav-offset) + 2rem) 1.5rem 4rem;
  max-width: 720px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1,
.hero h2 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.8;
  color: rgba(250, 247, 242, 0.85);
  margin: 0 auto 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Features strip ── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 4rem clamp(1rem, 4vw, 2.5rem);
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Customer reviews (infinite marquee) ── */
.reviews {
  padding: 4rem 0;
  width: 100%;
  overflow: hidden;
}

.reviews-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  max-width: 1100px;
  margin-inline: auto;
}

.reviews-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.5rem;
}

.reviews-header p {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.reviews-marquee {
  overflow: hidden;
  width: 100%;
  direction: ltr;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.reviews-track {
  display: flex;
  direction: ltr;
  gap: 1.25rem;
  width: max-content;
  padding: 0.5rem 0;
  will-change: transform;
}

@media (hover: hover) {
  .reviews-marquee:hover .reviews-track {
    /* pause handled by JS on desktop */
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-track {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    padding: 0 1rem;
  }

  .reviews-marquee {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
  }

  .review-card[aria-hidden="true"] {
    display: none;
  }
}

.review-card {
  flex: 0 0 340px;
  width: 340px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.review-stars {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  letter-spacing: 0.1em;
}

.review-stars .fa-star {
  margin-right: 2px;
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  flex: 1;
  font-style: italic;
}

.review-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.review-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.review-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

[dir="rtl"] .review-card {
  text-align: right;
}

[dir="rtl"] .review-stars .fa-star {
  margin-right: 0;
  margin-left: 2px;
}

/* ── Page header (inner pages) ── */
.page-header {
  padding: calc(var(--nav-offset) + 2rem) 1.25rem 2rem;
  text-align: center;
  background: var(--bg-dark);
  color: var(--text-light);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-light);
}

.page-header p {
  font-size: 1.05rem;
  color: rgba(250, 247, 242, 0.7);
  margin: 0;
  max-width: 520px;
  margin-inline: auto;
}

/* ── Footer / Contact box ── */
.site-footer,
.contact-box {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  margin-top: auto;
}

.site-footer h2,
.contact-box h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(250, 247, 242, 0.55);
  margin: 0 0 1.5rem;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.socials a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.4);
}

/* ── Notifications ── */
.notification {
  position: fixed;
  top: calc(var(--nav-offset) + 0.75rem);
  right: 1.25rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.35s ease;
  max-width: 320px;
}

[dir="rtl"] .notification {
  right: auto;
  left: 1.25rem;
  animation: slideInRtl 0.35s ease;
}

.notification.success { background: #2d8a4e; }
.notification.error { background: #c0392b; }
.notification.info { background: #2c6fad; }

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRtl {
  from { transform: translateX(-110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Legacy hero-btn alias ── */
a.hero-btn {
  background: var(--primary);
  color: white;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition);
}

a.hero-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 92, 38, 0.35);
}

body h1 {
  position: static;
  font-style: normal;
  color: var(--text-dark);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .features {
    grid-template-columns: 1fr;
    max-width: 420px;
    padding: 2.5rem 1.25rem;
    gap: 1rem;
  }

  .reviews {
    padding: 2.5rem 0 3rem;
  }

  .reviews-header {
    margin-bottom: 1.5rem;
    padding: 0 1.25rem;
  }

  .reviews-header h2 {
    font-size: clamp(1.65rem, 6vw, 2.25rem);
  }

  .reviews-header p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .reviews-marquee {
    mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  }

  .review-card {
    flex: 0 0 min(80vw, 300px);
    width: min(80vw, 300px);
  }

  .review-text {
    font-size: 0.92rem;
    line-height: 1.65;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-offset: 130px;
  }

  .navbar {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 0;
    gap: 0;
  }

  .nav-brand {
    order: 0;
    width: 100%;
    text-align: center;
    font-size: 1.45rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    grid-column: unset;
    grid-row: unset;
  }

  .nav-links {
    order: 1;
    width: 100%;
    justify-content: space-around;
    gap: 0;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.12);
    grid-column: unset;
    grid-row: unset;
    justify-self: unset;
  }

  .nav-links li {
    flex: 1;
    text-align: center;
  }

  .nav-links a {
    display: block;
    font-size: 0.78rem;
    padding: 0.45rem 0.2rem;
  }

  .nav-links a::after {
    display: none;
  }

  .auth-links {
    order: 2;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem 0.6rem;
    grid-column: unset;
    grid-row: unset;
    justify-self: unset;
  }

  .auth-link,
  .lang-switch {
    font-size: 0.75rem;
    padding: 0.45rem 0.7rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .hero-wrapper {
    min-height: 88vh;
  }

  .hero {
    padding: calc(var(--nav-offset) + 1.5rem) 1.25rem 3rem;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(2.75rem, 12vw, 4rem);
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    padding: 0.8rem 1.5rem;
  }

  .page-header {
    padding: calc(var(--nav-offset) + 1.5rem) 1.25rem 1.75rem;
  }

  .page-header h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  .page-header p {
    font-size: 0.9rem;
    padding: 0 0.5rem;
  }

  .reviews {
    padding: 2rem 0 2.5rem;
  }

  .reviews-header h2 {
    font-size: 1.55rem;
  }

  .review-card {
    flex: 0 0 min(86vw, 280px);
    width: min(86vw, 280px);
    padding: 1.25rem;
  }

  .review-stars {
    margin-bottom: 0.65rem;
  }

  .review-text {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }

  .review-author {
    padding-top: 0.85rem;
  }

  .site-footer,
  .contact-box {
    padding: 2rem 1.25rem 1.5rem;
  }

  .site-footer h2,
  .contact-box h2 {
    font-size: 1.4rem;
  }

  .footer-tagline {
    font-size: 0.82rem;
    padding: 0 0.5rem;
  }

  .socials a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .notification {
    left: 1rem;
    right: 1rem;
    max-width: none;
    text-align: center;
    font-size: 0.85rem;
  }

  [dir="rtl"] .notification {
    left: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-offset: 152px;
  }

  .nav-brand {
    font-size: 1.35rem;
    padding: 0.65rem 0.75rem;
  }

  .nav-links a {
    font-size: 0.72rem;
    padding: 0.4rem 0.1rem;
  }

  .auth-links {
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0.5rem 0.55rem;
  }

  .auth-link,
  .lang-switch {
    font-size: 0.7rem;
    padding: 0.4rem 0.55rem;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
  }

  .feature-card h3 {
    font-size: 1.2rem;
  }

  .footer-copy {
    font-size: 0.72rem;
    line-height: 1.5;
    padding: 0 0.5rem;
  }
}
