/* ==========================================================
   Chef Sahand – theme taken from the Sadri rice bag
   royal blue + cream band + gold Persian ornament
   ========================================================== */
:root {
  --mc-blue: #1f4fd1;
  --mc-blue-dark: #12307f;
  --mc-navy: #1b2a5c;
  --mc-cream: #f7f0dc;
  --mc-cream-2: #fbf7ec;
  --mc-gold: #c9a24a;
  --mc-gold-dark: #9c7a2c;
  --mc-saffron: #f2b705;
  --mc-teal: #1e7f7a;
  --mc-red: #b8322a;
  --mc-ink: #1d2433;
  --mc-muted: #5f6b80;
  --mc-radius: 1rem;
  --mc-shadow: 0 10px 30px rgba(18, 48, 127, .12);

  --bs-primary: var(--mc-blue);
  --bs-primary-rgb: 31, 79, 209;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--mc-ink);
  --bs-link-color: var(--mc-blue);
  --bs-link-hover-color: var(--mc-blue-dark);
}

body { background: var(--mc-cream-2); }

h1, h2, h3, .display-font {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--mc-navy);
}
.fa-text { font-family: "Vazirmatn", "Tahoma", sans-serif; direction: rtl; }

.btn-primary {
  --bs-btn-bg: var(--mc-blue);
  --bs-btn-border-color: var(--mc-blue);
  --bs-btn-hover-bg: var(--mc-blue-dark);
  --bs-btn-hover-border-color: var(--mc-blue-dark);
  --bs-btn-active-bg: var(--mc-blue-dark);
  --bs-btn-disabled-bg: var(--mc-blue);
}
.btn-gold {
  --bs-btn-color: var(--mc-navy);
  --bs-btn-bg: var(--mc-saffron);
  --bs-btn-border-color: var(--mc-saffron);
  --bs-btn-hover-color: var(--mc-navy);
  --bs-btn-hover-bg: #e0a800;
  --bs-btn-hover-border-color: #e0a800;
  --bs-btn-active-bg: #d39e00;
  font-weight: 600;
}
.btn-outline-cream {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255,255,255,.6);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: var(--mc-blue-dark);
  --bs-btn-hover-border-color: #fff;
}
.btn { border-radius: 999px; padding-inline: 1.25rem; }

.text-gold { color: var(--mc-gold) !important; }
.bg-cream { background: var(--mc-cream) !important; }
.bg-royal { background: var(--mc-blue) !important; }

/* ---------- Persian ornament pattern ---------- */
.ornament-bg {
  background-color: var(--mc-blue);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M40 6l9 25 25 9-25 9-9 25-9-25-25-9 25-9z'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3Ccircle cx='0' cy='0' r='14'/%3E%3Ccircle cx='80' cy='0' r='14'/%3E%3Ccircle cx='0' cy='80' r='14'/%3E%3Ccircle cx='80' cy='80' r='14'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 75% 30%, #3466e6 0%, var(--mc-blue) 45%, var(--mc-blue-dark) 100%);
  color: #fff;
}
.gold-divider {
  display: flex; align-items: center; gap: .75rem;
  color: var(--mc-gold); justify-content: center;
}
.gold-divider::before, .gold-divider::after {
  content: ""; height: 1px; flex: 0 1 70px;
  background: linear-gradient(90deg, transparent, var(--mc-gold), transparent);
}

/* ---------- Navbar ---------- */
.mc-navbar {
  background: rgba(18, 48, 127, .96);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--mc-gold);
}
.mc-navbar .navbar-brand img { width: 46px; height: 46px; }
.mc-navbar .brand-text { line-height: 1.05; }
.mc-navbar .brand-text strong { font-family: "Playfair Display", serif; letter-spacing: .5px; }
.mc-navbar .brand-text small { font-size: .78rem; color: var(--mc-cream); opacity: .85; }
.mc-navbar .nav-link { color: rgba(255,255,255,.85); font-weight: 500; }
.mc-navbar .nav-link:hover, .mc-navbar .nav-link.active { color: var(--mc-saffron); }
.mc-navbar .nav-phone { color: var(--mc-gold); font-size: .875rem; font-weight: 700; gap: .5rem; text-decoration: none; white-space: nowrap; }
.mc-navbar .nav-phone i { font-size: 1.1rem; line-height: 1; }
.mc-navbar .nav-phone:hover { color: var(--mc-saffron); }
/* Small laptops: no room for the number when logged in, so just the icon (footer and contact page show the number) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .mc-navbar.logged-in .nav-phone span { display: none; }
}
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--mc-saffron); color: var(--mc-navy);
  font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center;
}

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 6rem; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.hero .lead { color: rgba(255,255,255,.85); max-width: 34rem; }
.hero .fa-tagline { color: var(--mc-saffron); font-size: 1.35rem; }
.hero-band {
  display: inline-block; background: var(--mc-cream); color: var(--mc-blue);
  font-weight: 800; letter-spacing: 1px; padding: .35rem 1rem; border-radius: .4rem;
  font-size: .85rem; text-transform: uppercase;
}
.hero-visual { display: grid; place-items: center; }
.hero-visual img {
  width: min(440px, 88%); height: auto;
  filter: drop-shadow(0 20px 25px rgba(0,0,0,.25));
}
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; }

/* ---------- Feature strip ---------- */
.feature-card {
  background: #fff; border-radius: var(--mc-radius); padding: 1.75rem;
  box-shadow: var(--mc-shadow); height: 100%;
  border-top: 4px solid var(--mc-gold);
}
.feature-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--mc-cream); color: var(--mc-blue);
}
/* Square photo, up to 300px, cropped to fit */
.feature-img {
  display: block; width: 100%; max-width: 300px; height: auto; aspect-ratio: 1;
  object-fit: cover; border-radius: .75rem; margin-inline: auto;
}

.section { padding: 5rem 0; }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: .8rem;
  font-weight: 700; color: var(--mc-gold-dark);
}

/* ---------- Products ---------- */
.filter-pills .btn { border-radius: 999px; }
.filter-pills .btn.active { background: var(--mc-blue); color: #fff; border-color: var(--mc-blue); }
.product-card {
  border: 0; border-radius: var(--mc-radius); overflow: hidden;
  box-shadow: var(--mc-shadow); transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(18,48,127,.18); }
/* Same portrait box on every card; min-height: 0 stops tall photos from stretching it */
.product-media {
  background: var(--mc-cream); aspect-ratio: 4 / 5; min-height: 0;
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; position: relative; padding: 1rem;
}
.product-media img { max-height: 100%; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; }
/* Above the photo, so its multiply blend doesn't tint them */
.product-badge, .placeholder-tag { z-index: 1; }
.product-badge {
  position: absolute; top: .75rem; left: .75rem;
  background: var(--mc-red); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 999px;
}
.placeholder-tag {
  position: absolute; top: .75rem; right: .75rem;
  background: rgba(27,42,92,.85); color: #fff; font-size: .68rem;
  padding: .2rem .55rem; border-radius: 999px;
}
/* Zoom button covers the photo; icon in the bottom corner (bottom-left in RTL) */
.product-media .product-zoom {
  position: absolute; inset: 0; z-index: 2; border: 0; background: none; cursor: zoom-in;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: .75rem;
}
.product-zoom i {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: var(--mc-blue);
  box-shadow: 0 2px 8px rgba(18,48,127,.18); transition: background-color .2s ease, color .2s ease;
}
.product-zoom:hover i, .product-zoom:focus-visible i { background: var(--mc-blue); color: #fff; }
.product-zoom:focus-visible { outline: 3px solid var(--mc-saffron); outline-offset: -4px; }
.zoom-img { max-width: 100%; max-height: 78vh; width: auto; height: auto; }
.product-card .price { font-weight: 800; color: var(--mc-blue); font-size: 1.2rem; }
.product-card .fa-text { color: var(--mc-gold-dark); font-size: .95rem; }

.skeleton { background: linear-gradient(90deg,#eee 25%,#f6f6f6 37%,#eee 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: var(--mc-radius); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- About ---------- */
.about-img-wrap {
  border-radius: var(--mc-radius); overflow: hidden; position: relative;
  background: var(--mc-cream); aspect-ratio: 1; display: grid; place-items: center;
  border: 6px solid #fff; box-shadow: var(--mc-shadow);
}
.about-img-wrap img { width: 60%; }
.stat { text-align: center; }
.stat .num { font-family: "Playfair Display", serif; font-size: 2rem; font-weight: 700; color: var(--mc-blue); }
.placeholder-note {
  font-size: .8rem; background: #fff6d6; border: 1px dashed var(--mc-gold);
  color: #6b5413; border-radius: .5rem; padding: .35rem .6rem; display: inline-block;
}

/* ---------- Forms / auth ---------- */
.form-card {
  background: #fff; border-radius: var(--mc-radius); box-shadow: var(--mc-shadow);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}
.form-control, .form-select { border-radius: .7rem; padding: .7rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--mc-blue); box-shadow: 0 0 0 .2rem rgba(31,79,209,.15); }
.auth-tabs .nav-link { border-radius: 999px; color: var(--mc-navy); font-weight: 600; }
.auth-tabs .nav-link.active { background: var(--mc-blue); color: #fff; }
.page-header { padding: 3.5rem 0 3rem; }
.page-header h1 { color: #fff; }
.page-header p { color: rgba(255,255,255,.8); }

.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .feature-icon { flex: 0 0 48px; width: 48px; height: 48px; font-size: 1.2rem; }
.map-placeholder {
  border-radius: var(--mc-radius); min-height: 220px;
  display: grid; place-items: center; text-align: center;
}

/* ---------- Footer ---------- */
.mc-footer { background: var(--mc-blue-dark); color: rgba(255,255,255,.75); border-top: 4px solid var(--mc-gold); }
.mc-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.mc-footer a:hover { color: var(--mc-saffron); }
.mc-footer h6 { color: #fff; letter-spacing: 1px; text-transform: uppercase; font-size: .85rem; }
.social a {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
  background: rgba(255,255,255,.1); margin-right: .4rem;
}

/* ---------- Cart offcanvas ---------- */
.cart-item img { width: 56px; height: 56px; object-fit: contain; background: var(--mc-cream); border-radius: .5rem; mix-blend-mode: multiply; }
.qty-btn { width: 28px; height: 28px; padding: 0; border-radius: 50%; line-height: 1; }

.toast-container { z-index: 1090; }

@media (max-width: 991.98px) {
  .hero { padding: 3rem 0 5rem; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-visual { margin-top: 2.5rem; }
  .hero-visual img { width: min(340px, 80%); }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .product-card:hover { transition: none; transform: none; }
}

/* ---------- Farsi / RTL ---------- */
html[lang="fa"] body,
html[lang="fa"] .btn,
html[lang="fa"] .form-control,
html[lang="fa"] .form-select { font-family: "Vazirmatn", Tahoma, sans-serif; }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3,
html[lang="fa"] .display-font, html[lang="fa"] .stat .num,
html[lang="fa"] .mc-navbar .brand-text strong { font-family: "Vazirmatn", Tahoma, sans-serif; font-weight: 800; }
html[lang="fa"] .hero-band, html[lang="fa"] .section-eyebrow { letter-spacing: 0; }
html:not([lang="fa"]) .fa-switch { font-family: "Vazirmatn", Tahoma, sans-serif; }
html[dir="rtl"] .cart-count { right: auto; left: -6px; }
.input-group > .btn, .input-group > .input-group-text { border-radius: .7rem; }
