/* ============================================
   TECH4.ONE — Responsive Styles
   Font: Vazirmatn | RTL | Lime-Yellow Phosphorescent
   Breakpoints: 768px (tablet), 1024px (desktop)
   ============================================ */

:root {
  --lime:       #FF6A00;
  --lime-dk:    #F55E00;
  --lime-dkk:   #E85200;
  --lime-lt:    #FF8533;
  --lime-bg:    #FFF0E6;
  --lime-glow:  0 4px 20px rgba(255,106,0,0.38);

  --white:      #ffffff;
  --gray-lt:    #f5f5f5;
  --gray:       #e0e0e0;
  --gray-md:    #999999;
  --gray-dk:    #555555;
  --black:      #1a1a1a;
  --red:        #e53935;
  --orange:     #FF6600;

  --header-h:      58px;
  --header-h-desk: 68px;
  --catbar-h:      46px;
  --bottom-h:      62px;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.12);
  --max-w:         1320px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  direction: rtl;
  background: #ebebeb;
  color: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { border: none; cursor: pointer; background: none; font-family: inherit; }

/* ===== LAYOUT WRAPPER ===== */
.page-wrap {
  width: 100%;
  background: var(--white);
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--lime);
  box-shadow: 0 2px 8px rgba(232,82,0,0.35);
}

/* Mobile header row */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 14px;
  gap: 10px;
}

/* آیکون‌های هدر روی پس‌زمینه نارنجی */
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 18px;
  border-radius: 8px;
  transition: background .2s;
  flex-shrink: 0;
}
.icon-btn:active, .icon-btn:hover { background: rgba(255,255,255,0.18); }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-glow {
  display: inline-block;
  line-height: 0;
}
.logo-img {
  height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(255,255,255,0.45));
}
.header-slogan {
  display: none;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* Desktop header extras (hidden on mobile) */
.header-desk-search { display: none; }
.header-desk-icons  { display: none; }

/* Search Bar (mobile dropdown) */
.search-bar {
  display: none;
  background: var(--lime-dk);
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.search-bar.open { display: block; }
.search-inner {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 24px;
  padding: 0 14px;
  gap: 10px;
}
.search-inner i { color: var(--gray-md); font-size: 14px; }
.search-inner input {
  flex: 1; border: none; outline: none;
  font-family: inherit; font-size: 14px;
  padding: 10px 0; background: transparent; direction: rtl;
}
.search-close { color: var(--gray-md); font-size: 16px; padding: 4px; }

/* Desktop Category Nav Bar */
.cat-nav-bar {
  display: none;
  background: var(--lime-dkk);
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 200;
}
.cat-nav-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: var(--catbar-h);
  padding: 0 4px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-nav-inner::-webkit-scrollbar {
  display: none;
}
/* catbar scroll arrows */
.cat-scroll-btn {
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: var(--catbar-h);
  border: none;
  color: rgba(255,255,255,0.95);
  font-size: 13px;
  cursor: pointer;
  transition: color .15s;
  z-index: 5;
}
.cat-scroll-btn:hover { color: #fff; }
.cat-scroll-btn.visible { display: flex; }
.cat-scroll-right {
  background: linear-gradient(to left, var(--lime-dkk) 50%, transparent);
}
.cat-scroll-left {
  background: linear-gradient(to right, var(--lime-dkk) 50%, transparent);
}
.cat-nav-wrap {
  display: flex;
  align-items: center;
  height: 100%;
}
.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  white-space: nowrap;
  border-radius: 6px;
  transition: background .2s;
  flex-shrink: 0;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.cat-nav-item:hover,
.cat-nav-wrap:hover .cat-nav-item { background: rgba(255,255,255,0.15); color: var(--white); }
.cat-nav-item i { font-size: 12px; }
.cat-nav-arrow { font-size: 9px !important; opacity: 0.7; transition: transform .2s; margin-right: 2px; }
.cat-nav-wrap:hover .cat-nav-arrow { transform: rotate(180deg); }

/* ===== MEGA MENU DROPDOWN ===== */
.cat-nav-dropdown {
  display: none;
  position: fixed;
  width: 400px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  border-top: 3px solid var(--lime);
  padding: 14px;
  z-index: 999;
  animation: megaFadeIn .18s ease;
}
@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cat-nav-wrap:hover .cat-nav-dropdown,
.cat-nav-wrap.open .cat-nav-dropdown { display: block; }
.cat-nav-wrap.open .cat-nav-arrow { transform: rotate(180deg); }

/* "همه X" button at top */
.mega-all-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 14px; margin-bottom: 12px;
  background: var(--lime-bg); border: none; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--lime-dk); cursor: pointer; transition: all .2s;
  text-align: right;
}
.mega-all-btn:hover { background: var(--lime); color: var(--white); }
.mega-all-btn i { font-size: 14px; }

/* Grid of category cards */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Each card */
.mega-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 10px 6px 8px;
  border: 1.5px solid var(--gray); border-radius: 10px;
  background: none; font-family: inherit; cursor: pointer;
  transition: all .2s; text-align: center;
}
.mega-card:hover {
  border-color: var(--lime); background: var(--lime-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255,106,0,0.15);
}

/* Card icon circle */
.mega-card-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--gray-lt);
  overflow: hidden; flex-shrink: 0;
}
.mega-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.mega-card-icon i { font-size: 22px; color: var(--lime); }
.mega-card:hover .mega-card-icon { background: rgba(255,106,0,0.12); }

/* Card label */
.mega-card-name {
  font-size: 11.5px; font-weight: 600; color: var(--black); line-height: 1.3;
}
.mega-card:hover .mega-card-name { color: var(--lime-dk); }

/* Grandchild sub-tags inside card */
.mega-card-subs {
  display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 2px;
}
.mega-sub-item {
  font-size: 10px; color: var(--gray-dk);
  background: var(--gray); border-radius: 4px;
  padding: 2px 6px; cursor: pointer; border: none;
  font-family: inherit; transition: all .15s;
}
.mega-sub-item:hover { background: var(--lime); color: var(--white); }

/* ============================================================
   SIDE MENU (mobile)
   ============================================================ */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  backdrop-filter: blur(2px);
}
.overlay.open { display: block; }

.side-menu {
  position: fixed;
  top: 0; right: -110%;
  width: min(82vw, 320px);
  height: 100%;
  background: var(--white);
  z-index: 1200;
  overflow-y: auto;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
}
.side-menu.open { right: 0; }

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--lime-dkk), var(--lime));
  position: sticky; top: 0;
}
.logo-side { font-size: 17px; font-weight: 800; color: var(--white); letter-spacing: 1px; }
.close-menu { color: var(--white); font-size: 20px; padding: 4px 8px; }

.menu-list { padding: 6px 0; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--gray);
  cursor: pointer;
  font-size: 14px;
  color: var(--black);
  transition: background .15s;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
}
.menu-item span, .menu-item i { -webkit-user-drag: none; }
.menu-item:active { background: var(--gray-lt); }
.menu-item i { color: var(--gray-md); font-size: 12px; transition: transform .2s; }
.menu-item.active i { transform: rotate(-90deg); color: var(--lime); }

.sub-menu { display: none; background: var(--gray-lt); }
.sub-menu.open { display: block; }
.sub-menu li a {
  display: block;
  padding: 10px 34px;
  font-size: 13px;
  color: var(--gray-dk);
  border-bottom: 1px solid var(--gray);
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover { background: var(--lime-bg); color: var(--lime); }

.side-menu-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--gray);
  margin-top: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.side-contact-phone {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--black);
  direction: ltr;
}
.side-contact-phone i { color: var(--lime); font-size: 15px; }
.side-social-row {
  display: flex; gap: 10px;
}
.side-social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gray-lt); color: var(--lime); font-size: 20px;
  transition: background .2s, color .2s;
}
.side-social-btn:hover { background: var(--lime); color: var(--white); }
.side-social-btn .fa-telegram { color: #0088cc; }
.side-social-btn:hover .fa-telegram { color: var(--white); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content { background: var(--gray-lt); }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--black);
  height: 242px;
}

.slider-wrapper {
  display: flex;
  direction: ltr; /* force LTR so translateX(-N*100%) works correctly in RTL pages */
  height: 100%;
  transition: transform .45s ease;
}

.slide {
  direction: rtl; /* restore RTL for content inside each slide */
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.slide-content { flex: 1; z-index: 2; }
.slide-content h2 {
  font-size: 20px; font-weight: 700;
  color: var(--white); margin-bottom: 8px; line-height: 1.3;
}
.slide-content p {
  font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 16px;
}
.slide-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--lime), var(--lime-lt));
  color: var(--white);
  padding: 9px 24px;
  border-radius: 22px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--lime-glow);
}

.slide-img {
  flex-shrink: 0; width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
}
.slide-img-placeholder { font-size: 68px; opacity: 0.6; }

.slider-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; z-index: 10;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: all .2s;
}
.dot.active { background: var(--lime); width: 22px; border-radius: 4px; }

/* ============================================================
   QUICK CATEGORIES
   ============================================================ */
.quick-cats {
  background: var(--white);
  padding: 20px 16px;
  margin-bottom: 8px;
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cat-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.cat-icon {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--lime-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--lime);
  border: 2px solid rgba(255,106,0,0.25);
  transition: all .2s;
}
.cat-item:hover .cat-icon, .cat-item:active .cat-icon {
  background: var(--lime); color: var(--white);
  border-color: var(--lime); box-shadow: var(--lime-glow);
}
.cat-item span {
  font-size: 11.5px; color: var(--gray-dk);
  text-align: center; line-height: 1.3;
}

/* ============================================================
   BRANDS SECTION
   ============================================================ */
.brands-section {
  background: var(--white);
  padding: 0 0 16px;
  margin-bottom: 8px;
  overflow: hidden;
}

.verified-badge {
  background: linear-gradient(135deg, var(--lime-dkk), var(--lime));
  display: flex;
  align-items: center; justify-content: center;
  gap: 8px; padding: 14px;
  color: var(--white); font-size: 15px; font-weight: 600;
  margin-bottom: 16px;
}
.verified-badge i { font-size: 18px; }

.brands-scroll { overflow: hidden; padding: 0 16px; }
.brands-track {
  display: flex; gap: 14px;
  animation: brandScroll 20s linear infinite;
  width: max-content;
}
.brands-track:hover { animation-play-state: paused; }
@keyframes brandScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.brand-logo {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 12px; font-weight: 700;
  color: var(--gray-dk); white-space: nowrap;
  box-shadow: var(--shadow); min-width: 85px; text-align: center;
  transition: border-color .2s, color .2s;
}
.brand-logo:hover { border-color: var(--lime); color: var(--lime); }

/* ============================================================
   PRODUCTS SECTION
   ============================================================ */
.products-section {
  background: var(--white);
  padding: 18px 16px;
  margin-bottom: 8px;
}

.section-title {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; position: relative;
}
.section-title::before, .section-title::after {
  content: ''; flex: 1; height: 2px; background: var(--gray);
}
.section-title span {
  padding: 0 16px; font-size: 17px; font-weight: 700;
  color: var(--black); white-space: nowrap;
}
.section-title-line {
  display: flex; align-items: center;
  justify-content: center; margin-bottom: 6px;
}
.section-title-line span {
  font-size: 17px; font-weight: 700; color: var(--black);
  border-bottom: 3px solid var(--lime); padding-bottom: 5px;
}

.view-all {
  display: block; color: var(--lime);
  font-size: 13px; font-weight: 500; margin-bottom: 14px;
}

/* Products Grid — 2 col mobile → 3 tablet → 4 desktop */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  position: relative;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
}
.product-card img { -webkit-user-drag: none; }
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-img-wrap { background: var(--white); padding: 10px; position: relative; }
.product-img {
  aspect-ratio: 4/3;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; }

.product-info {
  padding: 10px 12px 12px; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.product-name {
  font-size: 12.5px; color: var(--gray-dk); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-price {
  display: flex; align-items: baseline;
  gap: 4px; flex-wrap: wrap; margin-top: auto;
}
.price-val  { font-size: 15px; font-weight: 700; color: var(--black); }
.price-cur  { font-size: 11px; color: var(--gray-md); }
.price-old  { font-size: 12px; color: var(--gray-md); text-decoration: line-through; }

.badge-new-tag {
  position: absolute; top: 6px; left: 6px;
  background: #22c55e; color: var(--white);
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 8px; z-index: 3;
  white-space: nowrap; line-height: 1.4;
}

/* ============================================================
   BANNER CATEGORIES
   ============================================================ */
.banner-cats {
  padding: 0 0 8px;
  background: #ffffff;
  display: flex; flex-direction: column; gap: 6px;
}
.banner-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;  /* 2 columns side-by-side on mobile */
  gap: 6px;
  background: #ffffff;
}
/* ===== BANNER — same approach as Digikala =====
   Container: fixed aspect-ratio  →  always correct shape
   Image: position:absolute, object-fit:cover  →  fills container, no letterboxing
   Design at EXACT dimensions → zero crop ===== */
.banner-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #1a1a2e;
  aspect-ratio: 1 / 1;          /* mobile: square side banner */
  transition: opacity .2s;
}
.banner-item.banner-wide { aspect-ratio: 2 / 1; }   /* mobile: wide banner */
.banner-item:hover { opacity: 0.92; }
.banner-item.dark-blue  { background: linear-gradient(135deg, #0d1b4b, #1a3a8e); }
.banner-item.dark-img   { background: linear-gradient(135deg, #0a0a1a, #1a1a3e); }
.banner-item.pool-bg    { background: linear-gradient(135deg, #e8f4f8, #b3d9f0); }
.banner-item.motor-bg   { background: linear-gradient(135deg, #f5f0e8, #ffe0c0); }

/* Image fills 100% of container — object-fit:cover = no letterboxing */
.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.banner-img.loaded { display: block; }

.banner-label {
  position: absolute; bottom: 16px; right: 16px;
  color: var(--white); font-size: 15px; font-weight: 700;
  line-height: 1.3; text-shadow: 0 1px 4px rgba(0,0,0,0.5); z-index: 2;
  max-width: 80%; pointer-events: none;
}
/* Position variants */
.banner-label[data-pos="top-right"]     { top: 16px; right: 16px; bottom: auto; left: auto; }
.banner-label[data-pos="top-center"]    { top: 16px; left: 50%; bottom: auto; right: auto; transform: translateX(-50%); text-align: center; }
.banner-label[data-pos="top-left"]      { top: 16px; left: 16px; bottom: auto; right: auto; }
.banner-label[data-pos="bottom-right"]  { bottom: 16px; right: 16px; top: auto; left: auto; }
.banner-label[data-pos="bottom-center"] { bottom: 16px; left: 50%; top: auto; right: auto; transform: translateX(-50%); text-align: center; }
.banner-label[data-pos="bottom-left"]   { bottom: 16px; left: 16px; top: auto; right: auto; }
/* Color variants */
.banner-label[data-color="black"]  { color: #1a1a1a; text-shadow: 0 1px 3px rgba(255,255,255,0.6); }
.banner-label[data-color="white"]  { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }
.banner-label[data-color="orange"] { color: #FF6A00; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.banner-label[data-color="red"]    { color: #e53935; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.banner-label-lg { font-size: 20px; color: var(--lime); text-shadow: none; }
.pool-bg .banner-label-lg { color: var(--gray-dk); }
.motor-bg .banner-label-lg { color: var(--orange); }

.banner-img-placeholder {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  font-size: 52px; opacity: 0.6;
}

/* ============================================================
   SUBCATS GRID 2×2
   ============================================================ */
.subcats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.subcat-card {
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  display: flex; flex-direction: column; align-items: center;
  transition: box-shadow .2s;
}
.subcat-card:hover { box-shadow: var(--shadow-md); }
.subcat-img {
  width: 100%; aspect-ratio: 4/3;
  overflow: hidden; background: var(--gray-lt);
}
.subcat-img.orange-bg { background: var(--lime); }
.subcat-img.dark-bg   { background: #222; }
.subcat-img img { width: 100%; height: 100%; object-fit: cover; }
.subcat-card span {
  font-size: 12px; color: var(--gray-dk);
  padding: 10px 8px; text-align: center; line-height: 1.4;
}

/* ============================================================
   FEATURED CATS (circles)
   ============================================================ */
.featured-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding: 4px 0;
}
.feat-cat {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.feat-cat-circle {
  /* Responsive: fills column width, capped at 97px */
  width: clamp(60px, calc((100vw - 64px) / 3), 97px);
  height: clamp(60px, calc((100vw - 64px) / 3), 97px);
  border-radius: 50%;
  background: var(--gray-lt);
  border: 2px solid var(--gray);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, box-shadow .2s;
  flex-shrink: 0;
}
.feat-cat:hover .feat-cat-circle {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(255,106,0,0.18);
}
.feat-cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.feat-cat-icon-bg { background: var(--lime-bg); }
.feat-cat-fa { font-size: 28px; color: var(--lime); }
.feat-cat span { font-size: 12px; color: var(--gray-dk); text-align: center; line-height: 1.3; }

/* ============================================================
   CATEGORY PRODUCTS SECTION
   ============================================================ */
.cat-section {
  background: var(--white);
  padding: 16px 16px 20px;
  margin-bottom: 8px;
}
.cat-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--lime);
}
.cat-section-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--lime);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--lime);
  border-radius: 20px;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.cat-section-back:hover { background: var(--lime); color: var(--white); }
.cat-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
}
.cat-section-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-md);
}
.cat-section-empty i { font-size: 40px; margin-bottom: 10px; display: block; }
.cat-section-empty p { font-size: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #0d0d1a;
  color: var(--white);
  padding: 28px 20px calc(var(--bottom-h) + 20px);
  text-align: center;
  margin-top: 8px;
}
.footer-logo {
  font-size: 24px; font-weight: 800;
  letter-spacing: 2px; margin-bottom: 10px;
  direction: ltr; display: block;
}
.fl-tech { color: #0A468E; }
.fl-four { color: #0A468E; }
.fl-one  { color: #FEC728; text-shadow: 0 0 18px rgba(254,199,40,0.85), 0 0 6px rgba(254,199,40,0.6); }
.footer-desc {
  font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 18px;
}
.footer-links {
  display: flex; justify-content: center;
  flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px;
}
.footer-links a {
  font-size: 13px; color: rgba(255,255,255,0.75);
  transition: color .2s;
}
.footer-links a:hover { color: var(--lime); }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.35); }

/* ============================================================
   BOTTOM NAV (mobile only)
   ============================================================ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  background: linear-gradient(135deg, var(--lime-dk), var(--lime));
  border-top: none;
  display: flex; align-items: center;
  justify-content: space-around;
  z-index: 900;
  box-shadow: 0 -2px 16px rgba(255,106,0,0.35);
}
.bottom-nav-item {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px;
  color: rgba(255,255,255,0.85); font-size: 20px;
  border-radius: 50%; transition: all .2s;
}
.bottom-nav-item:hover, .bottom-nav-item:active {
  color: var(--white); background: rgba(255,255,255,0.18);
}
.bottom-nav-cart {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cart-btn {
  width: 60px; height: 60px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--lime-dk); font-size: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  margin-top: -22px;
  border: 3px solid var(--lime-lt);
  transition: transform .2s;
}
.cart-btn:active { transform: scale(0.94); }

.cart-badge {
  position: absolute; top: -2px; left: -2px;
  background: var(--red); color: var(--white);
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  border: 2px solid var(--white);
}
.cart-badge.show { display: flex; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--gray-lt); }
::-webkit-scrollbar-thumb { background: rgba(255,106,0,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.products-section, .quick-cats, .brands-section, .banner-cats {
  animation: fadeUp .35s ease;
}

/* ============================================================
   TABLET — 768px+
   ============================================================ */
@media (min-width: 768px) {
  body { padding-bottom: 0; }

  /* Header: show inline search, hide mobile search toggle */
  .header-inner {
    height: var(--header-h-desk);
    padding: 0 24px;
    gap: 14px;
  }
  /* Hide mobile search toggle on desktop, show inline */
  #searchToggle { display: none; }

  /* لوگو سمت چپ در دسکتاپ (RTL: order بالاتر = سمت چپ) */
  .logo { order: 3; align-items: center; }
  .header-desk-search { order: 2; }
  .header-desk-icons  { order: 1; }

  .header-desk-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 28px;
    padding: 0 16px;
    gap: 10px;
    flex: 1;
    max-width: 520px;
    backdrop-filter: blur(4px);
  }
  .header-desk-search i { color: rgba(255,255,255,0.85); font-size: 15px; }
  .header-desk-search input {
    flex: 1; border: none; outline: none;
    background: transparent; color: var(--white);
    font-family: inherit; font-size: 14px;
    padding: 10px 0; direction: rtl;
  }
  .header-desk-search input::placeholder { color: rgba(255,255,255,0.65); }

  /* آیکون‌های دسکتاپ سمت راست */
  .header-desk-icons {
    display: flex; align-items: center;
  }
  .desk-icons-row {
    display: flex; align-items: center; gap: 4px;
  }
  .phone-group {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
  }
  .header-slogan { display: block; }
  .header-desk-icons .icon-btn { color: var(--white); position: relative; }
  .header-desk-icons .icon-btn:hover { background: rgba(255,255,255,0.18); }
  .header-desk-icons .cart-count {
    position: absolute; top: 4px; left: 4px;
    background: var(--red); color: var(--white);
    font-size: 9px; font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center; justify-content: center;
  }
  .header-desk-icons .cart-count.show { display: flex; }

  /* Show desktop category nav bar */
  .cat-nav-bar { display: flex; align-items: center; }

  /* Hide mobile hamburger */
  #menuToggle { display: none; }

  /* Hide mobile bottom nav */
  .bottom-nav { display: none; }

  /* Mobile search bar */
  .search-bar { display: none !important; }

  /* Slider taller on tablet */
  .hero-slider { height: 352px; }
  .slide-content h2 { font-size: 26px; }
  .slide-img { width: 200px; height: 200px; }
  .slide-img-placeholder { font-size: 100px; }

  /* Categories: 6 per row */
  .cats-grid { grid-template-columns: repeat(6, 1fr); }

  /* Products: 3 columns */
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .subcats-grid  { grid-template-columns: repeat(4, 1fr); gap: 14px; }

  /* Featured cats: 6 per row */
  .featured-cats { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .feat-cat-circle {
    /* (viewport - 32px padding - 5×12px gaps) / 6 columns, capped at 109px */
    width: clamp(72px, calc((100vw - 92px) / 6), 109px);
    height: clamp(72px, calc((100vw - 92px) / 6), 109px);
  }

  /* Banner grid — 2 columns on tablet+, desktop aspect ratios */
  .banner-grid-2 { grid-template-columns: 1fr 1fr; }
  .banner-item { aspect-ratio: 14 / 5; }        /* 655×234 — same as DCakala side banner */
  .banner-item.banner-wide { aspect-ratio: 17 / 3; }  /* 1326×234 — same as DCakala wide banner */
  .banner-label { font-size: 17px; }
  .banner-label-lg { font-size: 24px; }

  /* Footer */
  .footer { padding: 40px 40px 28px; }
  .footer-links { gap: 8px 28px; }
}

/* ============================================================
   DESKTOP — 1024px+
   ============================================================ */
@media (min-width: 1024px) {
  /* Max width container */
  .page-wrap { box-shadow: none; }

  .header-inner { padding: 0 32px; }

  /* Logo larger */
  .logo-tech { font-size: 20px; }
  .logo-four { font-size: 22px; }
  .logo-one  { font-size: 20px; }

  /* Hero slider taller on desktop */
  .hero-slider { height: 462px; }
  .slide { padding: 40px 60px; }
  .slide-content h2 { font-size: 32px; margin-bottom: 12px; }
  .slide-content p  { font-size: 16px; margin-bottom: 22px; }
  .slide-btn { padding: 12px 32px; font-size: 15px; border-radius: 26px; }
  .slide-img { width: 260px; height: 260px; }
  .slide-img-placeholder { font-size: 130px; }

  /* Products: 4 columns */
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .product-name { font-size: 13px; }
  .price-val { font-size: 16px; }

  /* Subcats: 4 columns */
  .subcats-grid { grid-template-columns: repeat(4, 1fr); }

  /* Section titles larger */
  .section-title span  { font-size: 19px; }
  .section-title-line span { font-size: 19px; }

  /* Banner desktop — same aspect ratios as tablet */
  .banner-label-lg { font-size: 28px; }

  /* Brands track gap */
  .brands-track { gap: 18px; }
  .brand-logo { padding: 12px 22px; font-size: 13px; }

  /* Cat icons larger */
  .cat-icon { width: 72px; height: 72px; font-size: 28px; }
  .cat-item span { font-size: 13px; }

  /* Padding */
  .quick-cats    { padding: 28px 32px; }
  .products-section { padding: 24px 32px; }

  .footer { padding: 50px 60px 32px; }
  .footer-logo { font-size: 28px; }
}

/* ============================================================
   TABLET MEGA MENU — 768px–1023px
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .cat-nav-dropdown { width: 300px; padding: 10px; }
  .mega-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .mega-card { padding: 8px 4px 6px; }
  .mega-card-icon { width: 38px; height: 38px; }
  .mega-card-name { font-size: 11px; }
  .cat-nav-item { font-size: 12px; padding: 6px 9px; }
  .cat-nav-inner { gap: 2px; }
}

/* ============================================================
   LARGE DESKTOP — 1280px+
   ============================================================ */
@media (min-width: 1280px) {
  .cats-grid { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .featured-cats { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .feat-cat-circle { width: 121px; height: 121px; }
}


/* ============================================================
   SMALL MOBILE — 340px-
   ============================================================ */
@media (max-width: 340px) {
  .cats-grid { gap: 8px; }
  .cat-icon { width: 50px; height: 50px; font-size: 18px; }
  .feat-cat-circle { width: 70px; height: 70px; }
  .products-grid { gap: 8px; }
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.product-card-skeleton {
  background: var(--gray-lt);
  border-radius: var(--radius);
  height: 240px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.product-hidden { display: none !important; }
.btn-show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 13px 20px;
  background: #fff;
  border: 1.5px solid #FF6600;
  border-radius: 12px;
  font-family: Vazirmatn, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FF6600;
  cursor: pointer;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.btn-show-more::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #FF6600;
  opacity: 0;
  transition: opacity .25s;
}
.btn-show-more:hover::before { opacity: .06; }
.btn-show-more:hover { box-shadow: 0 2px 12px rgba(255,102,0,.15); }
.bsm-count {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: #FF6600;
  border-radius: 20px;
  padding: 2px 10px;
  position: relative;
}
.bsm-icon {
  font-size: 12px;
  transition: transform .3s;
  position: relative;
}
.btn-show-more.expanded .bsm-icon { transform: rotate(180deg); }
.btn-show-more.expanded .bsm-count { display: none; }
.bsm-text { position: relative; }
@media (max-width: 767px) {
  .btn-show-more { font-size: 13px; padding: 11px 16px; border-radius: 10px; }
  .bsm-count { font-size: 11px; padding: 2px 8px; }
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Discount badge on product cards */
.product-discount-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 3;
  line-height: 1.4;
}
.price-old-api {
  font-size: 12px;
  color: var(--gray-md);
  text-decoration: line-through;
  margin-left: 4px;
}

/* ===== STOCK & CART ===== */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
}
.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.stock-in {
  background: #e8f5e9;
  color: #2e7d32;
}
.stock-out {
  background: #ffebee;
  color: #c62828;
}
.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--lime);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.btn-add-cart:hover { background: var(--lime-dk); }
.btn-out-of-stock {
  background: var(--gray) !important;
  color: var(--gray-md) !important;
  cursor: not-allowed !important;
}
.product-out-of-stock .product-img { opacity: 0.55; }

/* ============================================================
   CART SIDEBAR
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 1100; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed; top: 0; left: -100%; width: 340px; max-width: 100vw;
  height: 100dvh; background: #fff; z-index: 1101;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: left .3s cubic-bezier(.4,0,.2,1);
}
.cart-sidebar.open { left: 0; }

.cart-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--gray);
  font-size: 16px; font-weight: 700; color: var(--black);
}
.cart-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--gray-dk);
  transition: background .2s;
}
.cart-close:hover { background: var(--gray-lt); }

.cart-items {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: var(--gray-md); padding: 40px 0;
}
.cart-empty i { font-size: 48px; opacity: .4; }
.cart-empty p { font-size: 14px; }

.cart-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-lt); border-radius: var(--radius);
  padding: 10px; position: relative;
}
.cart-item-img {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: 6px; background: var(--gray); flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 12px; font-weight: 600; color: var(--black);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.cart-item-price { font-size: 12px; color: var(--lime); font-weight: 700; }
.cart-item-controls {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
}
.qty-btn {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--gray);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--black);
  cursor: pointer; transition: background .2s;
}
.qty-btn:hover { background: var(--lime); color: #fff; border-color: var(--lime); }
.qty-val { font-size: 13px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-item-remove {
  position: absolute; top: 6px; left: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer;
}

.cart-footer {
  border-top: 1px solid var(--gray); padding: 14px;
}
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 700; margin-bottom: 12px;
}
#cartTotal { color: var(--lime); font-size: 16px; }

.payment-info-box {
  background: #fff8f0; border: 1px solid #ffd6a0;
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px;
}
.payment-info-title {
  font-size: 13px; font-weight: 700; color: var(--lime-dk);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.payment-card-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; margin-bottom: 6px; flex-wrap: wrap;
}
.payment-card-label { color: var(--gray-dk); white-space: nowrap; }
.payment-card-num {
  font-family: monospace; font-size: 14px; font-weight: 700;
  letter-spacing: 1px; color: #1a1a1a; direction: ltr;
}
.payment-card-owner { font-weight: 600; color: #1a1a1a; }
.payment-copy-btn {
  background: var(--lime); color: #fff; border: none; border-radius: 6px;
  padding: 3px 8px; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
  transition: background .2s; margin-right: auto;
}
.payment-copy-btn:active { background: var(--lime-dk); }
.payment-notice {
  font-size: 12px; color: #c05000; line-height: 1.7;
  margin: 8px 0 0; display: flex; gap: 5px; align-items: flex-start;
}
.payment-notice i { margin-top: 3px; flex-shrink: 0; }

.checkout-input {
  width: 100%; border: 1px solid var(--gray); border-radius: var(--radius-sm);
  padding: 9px 12px; font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 13px; direction: rtl; margin-bottom: 8px; outline: none;
  transition: border-color .2s;
}
.checkout-input:focus { border-color: var(--lime); }
textarea.checkout-input { resize: none; }

.checkout-btn {
  width: 100%; background: var(--lime); color: #fff;
  border-radius: var(--radius); padding: 12px;
  font-size: 14px; font-weight: 700; font-family: Vazirmatn, Tahoma, sans-serif;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 6px; transition: background .2s;
}
.checkout-btn:hover { background: var(--lime-dk); }
.checkout-btn:disabled { background: var(--gray-md); cursor: not-allowed; }

/* ============================================================
   ACCOUNT MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 1200; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.account-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -60%);
  width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 1201; opacity: 0; pointer-events: none;
  transition: transform .3s, opacity .3s;
}
.account-modal.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%);
}

.account-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--gray);
  font-size: 15px; font-weight: 700;
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--gray-dk); transition: background .2s;
}
.modal-close:hover { background: var(--gray-lt); }

.auth-tabs {
  display: flex; border-bottom: 1px solid var(--gray);
}
.auth-tab {
  flex: 1; padding: 12px; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--gray-md);
  border-bottom: 2px solid transparent; transition: all .2s;
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.auth-tab.active { color: var(--lime); border-bottom-color: var(--lime); }

.auth-form-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.auth-input {
  width: 100%; border: 1px solid var(--gray); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 13px; direction: rtl; outline: none; transition: border-color .2s;
}
.auth-input:focus { border-color: var(--lime); }
.auth-error { color: var(--red); font-size: 12px; min-height: 16px; }
.auth-btn {
  width: 100%; background: var(--lime); color: #fff;
  border-radius: var(--radius); padding: 11px;
  font-size: 14px; font-weight: 700; font-family: Vazirmatn, Tahoma, sans-serif;
  cursor: pointer; transition: background .2s;
}
.auth-btn:hover { background: var(--lime-dk); }
.auth-btn-outline {
  background: transparent; color: var(--red);
  border: 1px solid var(--red);
}
.auth-btn-outline:hover { background: #ffebee; }

.logged-in-body {
  padding: 24px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.logged-avatar { font-size: 56px; color: var(--lime); }
.logged-phone { font-size: 12px; color: var(--gray-md); }

/* Order history in account modal */
.orders-section { width: 100%; text-align: right; }
.orders-title { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 8px; border-bottom: 1px solid #f0f0f0; padding-bottom: 6px; }
.orders-title i { margin-left: 6px; }
.orders-list { max-height: 200px; overflow-y: auto; }
.order-item { background: #f8f8f8; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; font-size: 12px; }
.order-item-row { display: flex; justify-content: space-between; align-items: center; }
.order-item-id { font-weight: 700; color: #444; }
.order-item-total { color: var(--red); font-weight: 700; }
.order-item-date { color: #999; font-size: 11px; margin-top: 3px; }
.order-status { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.order-status-pending    { background: #fff3e0; color: #e65100; }
.order-status-processing { background: #e3f2fd; color: #1565c0; }
.order-status-shipped    { background: #f3e5f5; color: #6a1b9a; }
.order-status-delivered  { background: #e8f5e9; color: #2e7d32; }
.order-status-cancelled  { background: #ffebee; color: #c62828; }
.orders-empty { text-align: center; color: #aaa; padding: 16px; font-size: 12px; }
.orders-loading { text-align: center; color: #aaa; padding: 16px; font-size: 12px; }

/* Phone number text in desktop header */
.phone-btn-desk { display: flex; flex-direction: row; align-items: center; height: 40px !important; width: auto !important; padding: 0 10px; gap: 6px; }
.phone-num-desk { font-size: 12px; font-weight: 700; direction: ltr; letter-spacing: 0.5px; color: var(--white); white-space: nowrap; }

/* Bale messenger button */
.bale-btn-desk { display: flex; flex-direction: row; align-items: center; height: 40px !important; width: auto !important; padding: 0 10px; gap: 6px; }
.bale-svg-icon { width: 18px; height: 18px; flex-shrink: 0; border-radius: 4px; }
.bottom-nav .bale-svg-icon { width: 26px; height: 26px; }

/* Product Detail Modal */
.product-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -60%) scale(0.95);
  width: min(620px, 95vw); max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 18px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.2);
  z-index: 1201; opacity: 0; pointer-events: none;
  transition: transform .3s, opacity .3s;
}
.product-modal.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.product-modal-header {
  display: flex; justify-content: flex-start;
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
}
.product-modal-body {
  display: flex; gap: 20px; padding: 20px; flex-wrap: wrap;
}
.pm-img-wrap { flex: 0 0 200px; max-width: 200px; }
.pm-img-wrap img { width: 100%; border-radius: 12px; object-fit: contain; max-height: 200px; }
.pm-info { flex: 1; min-width: 180px; }
.pm-info h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: #1a1a1a; line-height: 1.6; }
.pm-price { font-size: 18px; font-weight: 700; color: var(--red); margin-bottom: 8px; }
.pm-price .pm-old-price { font-size: 12px; color: #aaa; text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.pm-desc { font-size: 13px; color: #555; line-height: 1.8; margin: 10px 0; }
.pm-stock-badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
.pm-stock-in { background: #e8f5e9; color: #2e7d32; }
.pm-stock-out { background: #ffebee; color: #c62828; }
.pm-cart-btn {
  width: 100%; padding: 12px; background: #ff6a00; color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 12px; font-family: Vazirmatn, Tahoma, sans-serif;
  transition: background .2s;
}
.pm-cart-btn:hover { background: #e55e00; }
.pm-cart-btn:disabled { background: #ccc; cursor: not-allowed; }
@media (max-width: 480px) {
  .product-modal-body { flex-direction: column; }
  .pm-img-wrap { max-width: 100%; }
}

/* ============================================================
   DESKTOP REDESIGN v3 — dcakala-style
   فقط نسخه وب (1024px+) — موبایل بدون تغییر
   ============================================================ */

/* Footer inner/bottom: mobile = hidden, desktop = visible */
.footer-inner  { display: none; }
.footer-bottom { display: none; }

/* ============================================================
   DESKTOP 1024px+
   ============================================================ */
@media (min-width: 1024px) {

  /* === Hero slider === */
  .hero-slider { height: 462px; }
  .slide { padding: 32px max(48px, calc((100vw - 1280px) / 2 + 48px)); }

  /* === Global page content container (max 1280px centered) === */
  .main-content { background: #f2f2f2; }

  .products-section {
    background: var(--white);
    padding: 32px max(32px, calc((100vw - 1280px) / 2));
    margin-bottom: 10px;
    position: relative;
  }

  /* دسته‌های منتخب: مستقیم زیر اسلایدر، بدون عنوان، دایره بزرگ */
  .products-section:has(.featured-cats) {
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 8px;
  }
  .products-section:has(.featured-cats) .section-title {
    display: none;
  }
  /* دایره‌های دسته‌بندی مثل dcakala — بزرگ و واضح */
  .feat-cat-circle {
    width: 160px !important;
    height: 160px !important;
    border-width: 2px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  }
  .feat-cat-fa { font-size: 44px; }
  .feat-cat span {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-top: 4px;
  }
  .featured-cats { gap: 28px; }
  .cat-section {
    background: var(--white);
    padding: 24px max(32px, calc((100vw - 1280px) / 2));
    margin-bottom: 10px;
  }
  .brands-section.brands-footer {
    padding: 0 0 24px;
    margin-bottom: 10px;
  }
  .brands-section.brands-footer .brands-scroll {
    padding: 0 max(32px, calc((100vw - 1280px) / 2));
  }

  /* Banner section centered container */
  .banner-cats {
    background: #ffffff !important;
    padding: 10px max(32px, calc((100vw - 1280px) / 2));
  }
  .banner-cats .banner-grid-2 {
    gap: 10px;
    background: transparent;
    margin-bottom: 10px;
  }
  .banner-cats .banner-item {
    border-radius: 8px;
    overflow: hidden;
  }
  .banner-cats .banner-item.banner-wide {
    border-radius: 8px;
  }
  .banner-cats .banner-label { font-size: 22px; font-weight: 800; }
  .banner-cats .banner-label-lg { font-size: 32px; }

  /* === Section title: right-aligned accent bar (RTL start side) === */
  .products-section .section-title,
  .cat-section .section-title {
    justify-content: flex-start;
    border-bottom: 2px solid #ebebeb;
    padding-bottom: 16px;
    margin-bottom: 22px;
    gap: 0;
  }
  .products-section .section-title::before,
  .products-section .section-title::after,
  .cat-section .section-title::before,
  .cat-section .section-title::after {
    display: none;
  }
  .products-section .section-title span,
  .cat-section .section-title span {
    font-size: 22px;
    padding: 2px 16px 2px 0;
    border-right: 5px solid var(--lime);
  }
  .products-section .section-title-line {
    justify-content: flex-start;
    border-bottom: 2px solid #ebebeb;
    padding-bottom: 16px;
    margin-bottom: 22px;
  }
  .products-section .section-title-line span {
    font-size: 22px;
    border-bottom: none;
    padding: 2px 16px 2px 0;
    border-right: 5px solid var(--lime);
  }

  /* === View-all: float left of title (RTL = left side of row) === */
  .products-section .view-all,
  .products-section .view-all-orange {
    position: absolute;
    top: 32px;
    left: max(32px, calc((100vw - 1280px) / 2));
    margin: 0;
    font-size: 14px;
    font-weight: 600;
  }

  /* === Featured categories: larger circles === */
  .featured-cats {
    gap: 24px;
    padding: 8px 0;
  }
  .feat-cat-circle {
    width: 130px !important;
    height: 130px !important;
    border-width: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  }
  .feat-cat span {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-top: 2px;
  }
  .feat-cat-fa { font-size: 38px; }

  /* === Products grid === */
  .products-grid { gap: 16px; }
  .product-card {
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #ececec;
  }
  .product-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.10);
    transform: translateY(-3px);
    border-color: #ddd;
  }
  .product-name { font-size: 13.5px; line-height: 1.65; }
  .price-val { font-size: 17px; }

  /* === Brands section === */
  .brands-section.brands-footer {
    background: var(--white);
  }

  /* === Mobile footer hidden, desktop footer shown === */
  .footer-mobile { display: none; }
  .footer { padding: 0; background: #0d0d1a; }

  .footer-inner {
    display: grid;
    grid-template-columns: 200px 1fr 1fr 1fr;
    gap: 0 52px;
    padding: 48px max(36px, calc((100vw - 1240px) / 2)) 36px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .footer-col { display: flex; flex-direction: column; }
  .footer-col-brand .footer-logo { margin-bottom: 10px; }
  .footer-col-brand .footer-desc {
    font-size: 13px; color: rgba(255,255,255,0.5);
    line-height: 2; margin-bottom: 18px;
  }
  .footer-col-title {
    font-size: 15px; font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-family: Vazirmatn, Tahoma, sans-serif;
  }
  .footer-links-list {
    list-style: none; display: flex;
    flex-direction: column; gap: 11px;
  }
  .footer-links-list li a {
    font-size: 13px; color: rgba(255,255,255,0.55);
    text-decoration: none; display: flex;
    align-items: center; transition: color .2s;
    font-family: Vazirmatn, Tahoma, sans-serif;
  }
  .footer-links-list li a:hover { color: var(--lime); }
  .footer-li-icon {
    margin-left: 8px; color: var(--lime);
    font-size: 13px; width: 16px; flex-shrink: 0;
  }
  /* Telegram link: blue icon + blue hover */
  .footer-li-tg .footer-li-icon { color: #0088cc; }
  .footer-li-tg:hover { color: #0088cc !important; }
  /* Bale link: green icon + green hover */
  .footer-li-bale-icon { filter: brightness(0) saturate(1) invert(45%) sepia(90%) saturate(400%) hue-rotate(100deg); }
  .footer-li-bale:hover { color: #22c55e !important; }
  .footer-li-bale:hover .footer-li-bale-icon { filter: brightness(0) saturate(1) invert(45%) sepia(90%) saturate(400%) hue-rotate(100deg) brightness(1.1); }
  .footer-about-text {
    font-size: 13px; color: rgba(255,255,255,0.48);
    line-height: 2.1; font-family: Vazirmatn, Tahoma, sans-serif;
  }
  .footer-socials { display: flex; gap: 8px; }
  .footer-social-btn {
    width: 36px; height: 36px; border-radius: 9px;
    background: rgba(255,255,255,0.09);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7); font-size: 16px;
    transition: background .2s, color .2s; text-decoration: none;
  }
  .footer-social-btn:hover { background: var(--lime); color: #fff; }
  .footer-social-btn.tg-btn { color: #0088cc; }
  .footer-social-btn.tg-btn:hover { background: #0088cc; color: #fff; }
  .footer-bale-icon { filter: brightness(0) saturate(1) invert(55%) sepia(80%) saturate(400%) hue-rotate(100deg); }
  .footer-social-btn.bale-btn:hover { background: #22c55e; }
  .footer-social-btn.bale-btn:hover .footer-bale-icon { filter: brightness(0) invert(1); }
  .footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px max(36px, calc((100vw - 1240px) / 2));
  }
  .footer-bottom .footer-copy { font-size: 12px; }
}

/* ============================================================
   LARGE DESKTOP 1280px+ — 5-column products grid
   ============================================================ */
@media (min-width: 1280px) {
  .products-grid { grid-template-columns: repeat(5, 1fr) !important; }
  .feat-cat-circle { width: 140px !important; height: 140px !important; }
}
