/* ============================================================
   PATINAGE TEHRAN — design tokens
   Palette rationale (color psychology, chosen for this rebuild):
   - Warm off-white background: open, airy, modern — not gloomy
   - Teal/ice as the primary color: calm + trustworthy, and ties
     back to the "ice" identity of the shop
   - Coral used ONLY on action buttons: warm + energetic, and
     forms a cool/warm complementary contrast against the teal —
     this contrast is what makes "Ask on WhatsApp" etc. pop
     without the page feeling loud or aggressive
   - Soft green reserved for the "pay on delivery" trust badge —
     green reads as safe / confirmed to shoppers
   ============================================================ */
:root{
  --bg:         #FAF9F6;
  --bg-alt:     #F1F5F5;
  --surface:    #FFFFFF;
  --ink:        #202832;
  --ink-dim:    #667080;
  --hairline:   #E7EAEC;

  --primary:      #12A0AE;
  --primary-dim:  #E1F4F5;
  --primary-ink:  #0B4E56;

  --accent:      #FF6B4A;
  --accent-dim:  #FFE8E1;

  --success:     #1FA971;
  --success-dim: #E3F7EC;

  --telegram: #2AABEE;

  --display: 'Oswald', 'Vazirmatn', sans-serif;
  --fa:      'Vazirmatn', sans-serif;
  --body:    'Vazirmatn', 'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;

  --container: 1180px;
  --radius: 12px;
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }
body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lang-en{ line-height: 1.55; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation: none !important; transition: none !important; }
}
a{ color: inherit; text-decoration: none; }
img,svg{ display:block; max-width:100%; }
:focus-visible{ outline: 2px solid var(--primary); outline-offset: 3px; }

/* ============ NAV ============ */
.nav{
  position: sticky; top:0; z-index: 400;
  background: rgba(250,249,246,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex; align-items: center; gap: 1.6rem;
}
.wordmark{
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink);
}
.nav-links{
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  flex: 1;
}
.nav-links a{
  font-size: 0.92rem;
  color: var(--ink-dim);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active{ color: var(--primary); }
.nav-cta{
  font-size: 0.85rem;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-cta:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,74,0.28); }
.lang-btn{
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-dim);
  padding: 0.42rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lang-btn:hover{ border-color: var(--primary); color: var(--primary); }
.nav-toggle{
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 22px;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span{ height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 900px){
  .nav-links{
    position: absolute; top: 100%; left:0; right:0;
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open{ display: flex; }
  .nav-toggle{ display: flex; }
}

/* ============ HERO ============ */
.hero{
  position: relative;
  padding: 6rem 1.5rem 4.5rem;
  max-width: var(--container);
  margin: 0 auto;
  overflow: hidden;
}
.hero-frost{
  position: absolute; top: -20%; inset-inline-end: -10%;
  width: 60%; height: 140%;
  background: radial-gradient(closest-side, var(--primary-dim), transparent 70%);
  pointer-events: none;
}
.hero-inner{ position: relative; max-width: 680px; }
.eyebrow{
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  margin-bottom: 1.2rem;
  direction: ltr;
}
.hero h1{
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  direction: ltr;
  text-align: start;
  color: var(--ink);
}
.cod-badge{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.3rem;
  padding: 0.55rem 1.1rem;
  background: var(--success-dim);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0C5C40;
}
.cod-badge::before{
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
}
.hero-sub{
  margin-top: 1.3rem;
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 480px;
}
.hero-actions{
  margin-top: 2rem;
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.btn{
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s, box-shadow .15s;
  display: inline-block;
}
.btn-primary{ background: var(--accent); color: #fff; }
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255,107,74,0.3); }
.btn-ghost{ border: 1px solid var(--hairline); color: var(--ink); background: var(--surface); }
.btn-ghost:hover{ border-color: var(--primary); color: var(--primary); }

/* ---- glide animation: a small skater crosses once on load ---- */
.glide-track{
  position: relative;
  width: 100%; height: 64px;
  margin-top: 2.5rem;
  overflow: hidden;
}
.glide-trail{
  position:absolute; bottom: 16px; left:0; right:0; height:2px;
  background: linear-gradient(90deg, transparent, var(--hairline) 15%, var(--hairline) 85%, transparent);
}
.glide-skater{
  position:absolute; bottom: 2px;
  width: 44px; height: 44px;
  color: var(--primary);
  animation: glide-rtl 5s ease-in-out 0.4s 1 both;
}
html[dir="ltr"] .glide-skater{ animation-name: glide-ltr; }
@keyframes glide-rtl{
  0%   { transform: translateX(100vw) scaleX(-1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(-12vw) scaleX(-1); opacity: 0; }
}
@keyframes glide-ltr{
  0%   { transform: translateX(-12vw); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(100vw); opacity: 0; }
}

/* ============ CATEGORY TILES ============ */
.cat-tiles{
  max-width: var(--container); margin: 0 auto; padding: 0 1.5rem 4rem;
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
}
.tile{
  background: var(--surface);
  padding: 1.7rem 0.7rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  color: var(--ink-dim);
  transition: background 0.2s, color 0.2s;
  text-align: center;
}
.tile:hover{ background: var(--primary-dim); color: var(--primary-ink); }
.tile-icon{ width: 30px; height: 30px; color: var(--primary); }
.tile span{ font-size: 0.82rem; font-weight: 600; }
@media (max-width: 980px){ .cat-tiles{ grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px){ .cat-tiles{ grid-template-columns: repeat(2, 1fr); } }

/* ============ CATEGORY PAGE HEADER ============ */
.cat-header{ max-width: var(--container); margin: 0 auto; padding: 3rem 1.5rem 1rem; }
.cat-header h1{ font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.cat-back{ color: var(--ink-dim); font-size: 0.9rem; display: inline-block; margin-bottom: 1rem; }
.cat-back:hover{ color: var(--primary); }

/* ============ FILTER CHIPS ============ */
.filter-bar{
  max-width: var(--container); margin: 0 auto;
  padding: 1.2rem 1.5rem 2rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.chip{
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover{ border-color: var(--primary); color: var(--primary); }
.chip.active{ background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ============ PRODUCT / CATALOG GRID ============ */
.catalog{ max-width: var(--container); margin: 0 auto; padding: 1rem 1.5rem 5rem; scroll-margin-top: 80px; }

.product-grid{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
}
@media (max-width: 1024px){ .product-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px){ .product-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px){ .product-grid{ grid-template-columns: 1fr; } }

.card{
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow .2s;
}
.card:hover{ border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(18,160,174,0.12); }
.card-media{
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--primary-dim), var(--bg-alt));
  display: flex; align-items: center; justify-content: center;
}
.card-media svg{ width: 42%; height: 42%; color: var(--primary); opacity: 0.9; }
.card-media img{ width: 100%; height: 100%; object-fit: cover; }
.card-body{ padding: 1rem 1.1rem 1.2rem; }
.card-name{ font-weight: 600; font-size: 0.98rem; }

.empty-state{ color: var(--ink-dim); font-size: 0.95rem; grid-column: 1/-1; padding: 2rem 0; }

/* ============ PRODUCT PAGE ============ */
.product-page{ max-width: 900px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.product-layout{
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
@media (max-width: 760px){ .product-layout{ grid-template-columns: 1fr; } }
.product-media{
  aspect-ratio: 1/1;
  background: linear-gradient(160deg, var(--primary-dim), var(--bg-alt));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.product-media svg{ width: 40%; height: 40%; color: var(--primary); }
.product-media img{ width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.product-name{ font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; margin-bottom: 1.2rem; }
.product-order{
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: #25D366; color: #06230f;
  padding: 0.85rem 1.5rem; border-radius: 8px; font-weight: 600;
  margin-bottom: 2rem;
}
.product-order svg{ width: 20px; height: 20px; }
.product-order:hover{ filter: brightness(1.06); }
.product-info-label{ font-size: 0.88rem; font-weight: 600; color: var(--primary); margin-bottom: 0.6rem; }
#product-description{ color: var(--ink-dim); line-height: 1.8; white-space: pre-line; }

/* ============ BRANDS ============ */
.brands{ max-width: var(--container); margin: 0 auto; padding: 3.5rem 1.5rem; text-align: center; }
.brand-row{ display: flex; flex-wrap: wrap; justify-content: center; gap: 2.4rem; margin-top: 1rem; }
.brand-row span{ font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.04em; color: var(--ink-dim); direction: ltr; }

/* ============ CONTACT ============ */
.contact{ background: var(--bg-alt); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 4.5rem 1.5rem; }
.contact-inner{ max-width: 640px; margin: 0 auto; text-align: center; }
.contact h2{ font-family: var(--display); font-size: clamp(1.7rem,4vw,2.4rem); margin-bottom: 0.6rem; color: var(--ink); }
.contact > .contact-inner > p{ color: var(--ink-dim); margin-bottom: 2rem; }

.contact-methods{ display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; align-items: center; }
.telegram-btn{
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: var(--telegram);
}
.telegram-btn svg{ width: 52px; height: 52px; transition: transform 0.15s; }
.telegram-btn:hover svg{ transform: scale(1.08); }
.telegram-btn span{ font-size: 0.85rem; color: var(--ink-dim); direction: ltr; }

.phone-list{ display: flex; flex-direction: column; gap: 0.5rem; }
.phone-link{
  font-family: var(--mono); font-size: 1rem; color: var(--ink); direction: ltr;
  border: 1px solid var(--hairline); padding: 0.6rem 1.2rem; border-radius: 8px;
  background: var(--surface);
}
.phone-link:hover{ border-color: var(--primary); color: var(--primary); }

/* ============ FOOTER ============ */
.footer{ border-top: 1px solid var(--hairline); padding: 2.2rem 1.5rem; }
.footer-inner{
  max-width: var(--container); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem;
  justify-content: space-between;
}
.footer-links{ display: flex; gap: 1.4rem; }
.footer-links a{ color: var(--ink-dim); font-size: 0.85rem; }
.footer-links a:hover{ color: var(--primary); }
.footer-copy{ width: 100%; margin-top: 1rem; color: var(--ink-dim); opacity: 0.75; font-size: 0.78rem; direction: ltr; text-align: center; }
