/* JewelTimeCo Minimal Catalog - Mobile first (Shiny A2) - CLEAN */
@font-face{
  font-family: 'Yekan';
  src: url('https://javaherian-gallery.com/wp-content/uploads/2022/03/Yekan.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg:#0b0b0c;
  --text:#f6f6f7;
  --muted:#a7a7ad;
  --line:rgba(255,255,255,.08);
  --gold:#d4b45f;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
  --vh: 1vh;

  --panel: rgba(255,255,255,.05);
  --panel2: rgba(255,255,255,.07);
  --stroke: rgba(255,255,255,.10);
  --stroke2: rgba(212,180,95,.55);
}

*{box-sizing:border-box}
html,body{height:100%;width:100%;overflow-x:hidden;overscroll-behavior-x:none}
body{
  margin:0;
  font-family:'Yekan', -apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,Arial,sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(212,180,95,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(255,255,255,.06), transparent 55%),
    var(--bg);
  color:var(--text);
  position: relative;
}
#app{width:100%;max-width:100%;overflow-x:hidden}
#modal{overflow-x:hidden}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button,input{font-family:inherit}
.no-scroll{overflow:hidden}

/* Layout */
.app{min-height:calc(var(--vh, 1vh) * 100);display:flex;flex-direction:column;width:100%;max-width:100%;overflow-x:hidden}
.view{
  flex:1;
  padding:14px 14px 88px;
  max-width:560px;
  margin:0 auto;
  width:100%;
  overflow-x:hidden;
}
.loading{padding:22px;text-align:center;color:var(--muted)}

/* Top bar */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background: rgba(11,11,12,.76);
  backdrop-filter: blur(10px);
  max-width:100%;
}
.topbar__brand{
  display:flex;
  gap:10px;
  align-items:center;
  cursor:pointer;
  user-select:none;
  min-width:0;
}
.topbar__logoimg{
  /* ✅ بزرگ‌تر شد */
  width:50px;
  height:50px;
  border-radius:14px;
  object-fit:contain;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  padding:7px;
  flex:0 0 auto;
}
.topbar__title{min-width:0}
.topbar__name{
  font-weight:900;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar__subtitle{
  color:var(--muted);
  font-size:12px;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Buttons */
.iconbtn{
  width:44px;height:44px;border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color:var(--text);
  display:flex;align-items:center;justify-content:center;
}
.icon{font-size:18px;line-height:1}
.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  font-size:14px;
}
.btn:disabled{opacity:.5}
.btn--primary{
  background: linear-gradient(135deg, rgba(212,180,95,.22), rgba(212,180,95,.08));
  border-color: rgba(212,180,95,.55);
  box-shadow: 0 8px 22px rgba(212,180,95,.14);
}

/* Bottom bar */
.bottombar{
  position:fixed;left:0;right:0;bottom:0;z-index:30;
  display:flex;gap:8px;justify-content:space-between;
  padding:10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
  background: rgba(11,11,12,.84);
  backdrop-filter: blur(12px);
  max-width:100%;
}
.tab{
  flex:1;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color:var(--muted);
  border-radius:14px;
  padding:10px 8px;
  font-size:13px;
}
.tab.is-active{
  color:var(--text);
  border-color: rgba(212,180,95,.55);
  background: rgba(212,180,95,.10);
}

/* Sections */
.section-title{
  font-weight:900;
  margin:6px 2px 10px;
  color: var(--gold);
  letter-spacing:.2px;
}

/* ✅ Home should NOT scroll */
body.is-home{
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
}
body.is-home .view{
  height: calc((var(--vh, 1vh) * 100) - 64px - 88px); /* topbar + bottombar */
  overflow: hidden;
  padding-bottom: 0;
}

/* Home */
.home{
  height: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  text-align:center;
  overflow:hidden;
  padding: 6px 0;
}
.home__logo{
  /* ✅ کمی بزرگ‌تر شد */
  width:200px;
  height:auto;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
}
.home__shine{display:flex;flex-direction:column;gap:6px}
.home__line{
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .2px;
  position: relative;
  display:inline-block;
  overflow:hidden;
  padding: 2px 8px;
  max-width: 92vw;
}
.home__line.en{font-size:22px}
.home__line.fa{font-size:18px}
.home__line::after{
  content:'';
  position:absolute;inset:-4px 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.50) 40%, transparent 70%);
  transform: translateX(-120%);
  filter: blur(1px);
  opacity:.55;
  animation: shine 2.6s ease-in-out infinite;
  pointer-events:none;
}
@keyframes shine{
  0%{transform:translateX(-120%)}
  60%{transform:translateX(120%)}
  100%{transform:translateX(120%)}
}
.home__btn{margin-top:6px;width:min(320px, 92vw)}

/* Brand grid */
.brand-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.brand-card{
  /* ✅ اوپاسیتی بیشتر برای دیده شدن لوگوهای مشکی */
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding:12px 10px;
  box-shadow: var(--shadow);
  text-align:center;
}
.brand-card img{
  height:72px;          /* از 48 به 72 یا حتی 80 */
  width:100%;
  object-fit:contain;
  margin:6px auto 10px;
}
  /* کمک به دیده شدن لوگوهای تیره */
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.75));
}
.brand-name{font-weight:900}
.brand-meta{color:rgba(255,255,255,.72);font-size:12px;margin-top:4px}

/* Searchbar */
.searchbar{display:flex;gap:8px;margin: 6px 0 12px}
.searchbar input{
  flex:1;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  outline:none;
  min-width:0;
}
.searchbar input::placeholder{color:rgba(255,255,255,.45)}

/* Products grid */
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.product-card{
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.thumb{
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  min-height:140px;
}
.thumb img{
  width:100%;
  height:120px;
  object-fit:contain;
}
.p-title{
  padding:10px 10px 6px;
  font-weight:900;
  font-size:14px;
  color: var(--text);
  min-height:46px;
}
.kv{padding: 0 10px 12px}
.kv__row{
  display:flex;gap:8px;align-items:flex-start;
  border-top:1px dashed rgba(255,255,255,.10);
  padding:6px 0;
}
.kv__row:first-child{border-top:none}
.kv__k{width:74px;flex:0 0 auto;color:var(--muted);font-size:12px}
.kv__v{flex:1;font-size:13px;color:var(--text);min-width:0}

/* Infinite */
.infinite{padding:14px 0;text-align:center;color:var(--muted)}
.muted{color:var(--muted)}

/* Product detail */
.product{display:flex;flex-direction:column;gap:12px}
.product__media{
  background:#fff;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.10);
  padding:14px;
}
.product__img{width:100%;height:280px;object-fit:contain}
.product__info{
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding:12px;
}
.product__title{font-weight:900;font-size:16px;margin-bottom:8px}
.product__actions{display:flex;gap:8px;margin-top:10px}
.product__actions .btn{flex:1}

/* Cards for About/Contact */
.card{
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding:12px;
  line-height:1.9;
}
.card b, .card strong{color:var(--gold)}

/* Spec table */
.spec-table{width:100%;border-collapse:collapse}
.spec-table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(255,255,255,.10);
  vertical-align:top;
}
.spec-table td.k{color:var(--gold);font-weight:800;white-space:nowrap}
.spec-table td.v{color:var(--text)}

/* MODAL safety */
#modal[hidden]{pointer-events:none !important; display:none !important;}
#modal:not([hidden]){pointer-events:auto;}

/* Larger screens */
@media (min-width: 720px){
  .view{max-width:720px;margin:0 auto;padding-bottom:98px}
  .brand-grid, .grid{grid-template-columns: repeat(3, 1fr);}
  .thumb img{height:140px}
  .product__img{height:360px}

  .home__logo{width:230px}
}
/* ===== Product Card: center title + one-line price ===== */

/* 1) نام محصول وسط چین */
.p-title{
  text-align: center;
  line-height: 1.55;
}

/* 2) قیمت یک خط، بدون بیرون‌زدگی */
.kv__row{
  align-items: center;
}

/* اگر توی kv مقدارها راست چین/نامنظم بود، این باعث نظم میشه */
.kv__v{
  min-width: 0;
}

/* قیمت: یک خط، LTR، فونت ریسپانسیو */
.kv__row:last-child .kv__v,
.kv__v.price,
.kv__v[data-price="1"]{
  direction: ltr;
  unicode-bidi: plaintext;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: clamp(12px, 3.2vw, 14px);
  letter-spacing: -0.1px;
}

/* اگر "تومان" جدا میاد و باعث دو خط میشه، مجبورش کنیم کنار قیمت بماند */
.kv__row:last-child,
.kv__row:has(.kv__k),
.kv__row{
  white-space: nowrap;
}
.price{
  direction:ltr;
  unicode-bidi:plaintext;
  white-space:nowrap;
  font-variant-numeric: tabular-nums;
  font-size: clamp(12px, 3.2vw, 14px);
}
/* ✅ iOS: جلوگیری از زوم روی فیلدها */
input, textarea, select, button {
  font-size: 16px !important; /* critical */
}

/* اگر میخوای ظاهر جمع‌وجور بماند، پدینگ را کنترل کن */
.searchbar input,
.cart input,
.customer-form input,
.customer-form textarea {
  font-size: 16px !important;
  line-height: 1.3;
}

:root{
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* Topbar پایین‌تر بیاد تا زیر ناچ نره */
.topbar{
  padding-top: calc(10px + var(--sat));
}

/* محتوای اصلی هم از بالا فاصله امن بگیره (برای iOS های حساس) */
.view{
  padding-top: calc(14px + var(--sat));
}

/* Bottombar از قبل sab رو داشت؛ اینو تمیزترش می‌کنیم */
.bottombar{
  padding-bottom: calc(10px + var(--sab));
}
/* ===== Brands page readability boost ===== */
.brand-card{
  background: rgba(255,255,255,.25) !important;  /* روشن‌تر */
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(10px);
}

/* اگر خود تصویر لوگو هم هنوز گم میشه: کمی کنتراست بده */
.brand-card img{
  filter: contrast(1.15) brightness(1.05);
}
