:root {
  --cyan: #00bcd4;
  --orange: #ff6b35;
  --yellow: #ffd700;
  --red: #8b0000;
  --green: #4caf50;
  --purple: #9c27b0;
  --neon-cyan: #00ffff;
  --neon-purple: #cc00ff;
  --bg-dark: #050510;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-dark);
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  overflow-x: hidden;
  
  /* cursor: none; حذف شد تا مشکل موس در لپتاپ حل شود */
}


#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,5,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,188,212,0.3);
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0,188,212,0.2);
}

.header-bg-3d {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(0,188,212,0.05) 0%,
    rgba(156,39,176,0.05) 50%,
    rgba(255,107,53,0.05) 100%
  );
  animation: headerShift 8s ease-in-out infinite;
}

@keyframes headerShift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20px); }
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-icon {
  font-size: 36px;
  filter: drop-shadow(0 0 10px rgba(0,188,212,0.8));
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 18px; font-weight: bold; color: #fff; }
.logo-sub { font-size: 11px; color: var(--cyan); letter-spacing: 1px; }

.main-nav { display: flex; gap: 25px; }
.main-nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 15px;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 0.3s;
}
.main-nav a:hover { color: var(--cyan); }
.main-nav a:hover::after { width: 100%; }

.admin-btn {
  background: linear-gradient(135deg, var(--purple), #6a0dad);
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.3s;
  border: 1px solid rgba(156,39,176,0.5);
  box-shadow: 0 0 15px rgba(156,39,176,0.3);
}
.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(156,39,176,0.5);
}

.header-3d-objects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.obj {
  position: absolute;
  font-size: 28px;
  opacity: 0.15;
  animation: floatObj linear infinite;
  filter: drop-shadow(0 0 8px rgba(0,188,212,0.5));
}

.obj-wood    { left: 5%;  animation-duration: 15s; animation-delay: 0s; }
.obj-hammer  { left: 15%; animation-duration: 18s; animation-delay: -5s; }
.obj-bed     { left: 70%; animation-duration: 12s; animation-delay: -3s; }
.obj-cabinet { left: 80%; animation-duration: 20s; animation-delay: -8s; }
.obj-chair   { left: 90%; animation-duration: 14s; animation-delay: -2s; }
.obj-table   { left: 50%; animation-duration: 16s; animation-delay: -6s; }

@keyframes floatObj {
  0%   { transform: translateY(80px) rotate(0deg); opacity: 0.05; }
  50%  { opacity: 0.2; }
  100% { transform: translateY(-80px) rotate(360deg); opacity: 0.05; }
}

/* SLIDER */
.slider-section {
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(25, 255, 236, 0.3);
  box-shadow: 0 0 50px rgba(0, 247, 255, 0.829), 0 0 100px rgba(225, 0, 255, 0.616);
}

.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide {
  min-width: 100%;
  height: 400px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #0a0a2e, #1a0a3e);
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.slide-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  animation: floatEmoji 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(0,188,212,0.8));
}

@keyframes floatEmoji {
  0%, 100% { transform: translate(-50%,-50%) scale(1) rotate(-5deg); }
  50%       { transform: translate(-50%,-60%) scale(1.1) rotate(5deg); }
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 30px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  width: 100%;
}

.slide-content h2 {
  font-size: 32px;
  color: #fff;
  text-shadow: 0 0 20px rgba(0,188,212,0.8);
  margin-bottom: 8px;
}

.slide-content p { color: rgba(255,255,255,0.7); font-size: 16px; }

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,188,212,0.2);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  backdrop-filter: blur(10px);
}
.slider-btn:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 25px rgba(0, 197, 197, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.prev { right: 15px; }
.next { left: 15px; }

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(0, 255, 13);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgb(0, 225, 255);
}
.dot.active {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 255, 242, 0.719);
  transform: scale(1.3);
}

/* PRODUCTS */
.products-section {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title { text-align: center; margin-bottom: 20px; }

.section-title h2 {
  font-size: 35px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.section-title p { color: #00fff2; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.product-btn {
  position: relative;
  background: rgba(4, 0, 255, 0.158);
  border: 1px solid var(--btn-color, var(--cyan));
  border-radius: 15px;
  padding: 20px 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  font-family: inherit;
  color: #ffffff;
  box-shadow: 0 0 15px color-mix(in srgb, var(--btn-color, var(--cyan)) 20%, transparent);
}
.product-btn:hover {
  transform: translateY(-8px) scale(1.05);
  background: color-mix(in srgb, var(--btn-color, var(--cyan)) 15%, transparent);
  box-shadow: 0 15px 40px color-mix(in srgb, var(--btn-color, var(--cyan)) 40%, transparent);
}

.btn-img { width: 150px; height: 80px; object-fit: cover; border-radius: 8px; }
.btn-icon { font-size: 40px; }
.btn-label { font-size: 16px; font-weight: bold; color: #0fe3ff; }

.btn-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background: var(--btn-color, var(--cyan));
  border-radius: 50%;
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.3s;
}
.product-btn:hover .btn-glow { opacity: 0.6; }

/* PRODUCT MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(10px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.product-modal {
  background: linear-gradient(135deg, #0066ff8a, hsla(162, 100%, 50%, 0.37));
  border: 1px solid rgba(251, 255, 0, 0.452);
  border-radius: 20px;
  padding: 40px;
  max-width: 550px;
  width: 90%;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.3s;
  box-shadow: 0 0 60px rgba(0,188,212,0.3);
}
.modal-overlay.open .product-modal { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(239,83,80,0.2);
  border: 1px solid #ef5350;
  color: #ef5350;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}
.modal-close:hover { background: #ef5350; color: #fff; }

#modalContent img { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
#modalContent h2 { color: var(--cyan); margin-bottom: 12px; font-size: 24px; }
#modalContent p { color: #ff000038; line-height: 1.8; }

/* ABOUT */
.about-section {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  background: rgba(0, 255, 200, 0);
  border: 1px solid rgba(247, 0, 255, 0.562);
  border-radius: 25px;
  padding: 50px;
  backdrop-filter: blur(10px);
}

.about-image-wrap { position: relative; }

.about-img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.836);
  position: relative;
  z-index: 1;
  transition: transform 0.5s;
}
.about-img:hover { transform: scale(1.03); }

.about-img-placeholder {
  font-size: 150px;
  text-align: center;
  filter: drop-shadow(0 0 20px rgba(0, 195, 255, 0.199));
  animation: floatLogo 3s ease-in-out infinite;
}

.about-img-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgb(0, 0, 0), transparent);
  border-radius: 50%;
  filter: blur(30px);
}

.about-content h3 {
  font-size: 28px;
  color: var(--cyan);
  margin-bottom: 15px;
  text-shadow: 0 0 20px rgba(0,188,212,0.4);
}
.about-content p { color: #bbb; line-height: 2; margin-bottom: 25px; font-size: 15px; }

.learn-more-btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  font-size: 15px;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(0,188,212,0.3);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.learn-more-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,188,212,0.5); }

/* SOCIAL */
.social-links { margin-top: 60px; text-align: center; }
.social-links h3 { color: var(--cyan); font-size: 22px; margin-bottom: 25px; }

.social-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; }

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 25px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--sc, #00bcd4);
  border-radius: 15px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s;
  min-width: 100px;
  box-shadow: 0 0 15px color-mix(in srgb, var(--sc, #00bcd4) 20%, transparent);
}
.social-btn:hover {
  background: color-mix(in srgb, var(--sc, #00bcd4) 20%, transparent);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--sc, #00bcd4) 40%, transparent);
}

.social-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--sc, #00bcd4); }
.social-icon svg { width: 32px; height: 32px; }
.social-name { font-size: 13px; color: #ccc; }

/* SERVICES */
.services-section {
  position: relative;
  z-index: 1;
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.service-card {
  background: rgba(174, 0, 255, 0.144);
  border: 1px solid var(--sc, var(--orange));
  border-radius: 20px;
  padding: 40px 30px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px color-mix(in srgb, var(--sc, var(--orange)) 15%, transparent);
}
.service-card:hover {
  transform: translateY(-8px);
  background: color-mix(in srgb, var(--sc, var(--orange)) 10%, transparent);
  box-shadow: 0 15px 40px color-mix(in srgb, var(--sc, var(--orange)) 30%, transparent);
}

.service-icon { font-size: 50px; margin-bottom: 20px; filter: drop-shadow(0 0 15px var(--sc, var(--orange))); }
.service-card h3 { font-size: 20px; margin-bottom: 12px; color: var(--sc, var(--orange)); }
.service-card p { color: #aaa; font-size: 14px; line-height: 1.8; margin-bottom: 20px; }
.service-arrow { color: var(--sc, var(--orange)); font-size: 14px; font-weight: bold; }

/* FOOTER */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  background: rgba(5,5,16,0.95);
  border-top: 1px solid rgba(0,188,212,0.2);
  margin-top: 100px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.footer-logo { display: flex; align-items: center; gap: 15px; }
.footer-logo span { font-size: 40px; }
.footer-logo strong { font-size: 20px; color: #fff; display: block; }
.footer-logo small { color: var(--cyan); }

.footer-links { display: flex; gap: 30px; }
.footer-links a { color: #888; text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--cyan); }

.footer-copy { color: #555; font-size: 13px; }

/* AI CHATBOT */
.ai-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0ff2fe, #4facfe, var(--purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow:
    0 0 0 0 rgba(0,188,212,0.4),
    0 8px 32px rgba(0,188,212,0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
}
.ai-btn:hover { transform: scale(1.12) rotate(8deg); }
.ai-btn:active { transform: scale(0.95); }

.ai-robot { font-size: 30px; position: relative; z-index: 2; }

.ai-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,188,212,0.4);
  animation: aiPulseAnim 2.2s ease-out infinite;
  z-index: 1;
}
.pulse2 { animation-delay: 1.1s; }

@keyframes aiPulseAnim {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.9); opacity: 0; }
}

.ai-chat-box {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 360px;
  height: 520px;
  background: linear-gradient(160deg, #07071a 0%, #0d0d2b 60%, #12052a 100%);
  border: 1px solid rgba(0,255,255,0.25);
  border-radius: 24px;
  /* اطمینان از قرارگیری روی هدر */
  z-index: 999999 !important; 
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,255,255,0.05),
    0 20px 60px rgba(0,0,0,0.7),
    0 0 80px rgba(0,188,212,0.15),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: chatSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
  background: linear-gradient(90deg, rgba(0,188,212,0.18), rgba(156,39,176,0.18));
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,255,255,0.12);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 10;
}

.ai-header-info { display: flex; align-items: center; gap: 10px; }

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(0,188,212,0.5);
  flex-shrink: 0;
  animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(0,188,212,0.5); }
  50%       { box-shadow: 0 0 25px rgba(0,188,212,0.9), 0 0 40px rgba(156,39,176,0.4); }
}

.ai-header-text { display: flex; flex-direction: column; }

.ai-header-name {
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  line-height: 1.2;
}

.ai-status { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #aaa; }
.ai-status-dot {
  width: 7px;
  height: 7px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.ai-chat-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #aaa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ai-chat-close:hover { background: rgba(239,83,80,0.3); border-color: #ef5350; color: #ef5350; }

.ai-messages {
  flex: 1;
  padding: 16px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-track { background: transparent; }
.ai-messages::-webkit-scrollbar-thumb { background: rgba(0,188,212,0.4); border-radius: 10px; }

.ai-msg {
  padding: 11px 15px;
  border-radius: 18px;
  max-width: 82%;
  font-size: 14px;
  line-height: 1.75;
  word-wrap: break-word;
  position: relative;
  animation: msgFadeIn 0.3s ease;
}

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ai-msg.bot {
  background: linear-gradient(135deg, rgba(0,188,212,0.1), rgba(0,188,212,0.18));
  border: 1px solid rgba(0,188,212,0.3);
  align-self: flex-start;
  color: #e8f8ff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,188,212,0.1);
}

.ai-msg.user {
  background: linear-gradient(135deg, rgba(156,39,176,0.45), rgba(156,39,176,0.65));
  border: 1px solid rgba(156,39,176,0.5);
  align-self: flex-end;
  color: #fff;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 15px rgba(156,39,176,0.2);
}

.ai-msg.loading {
  background: linear-gradient(135deg, rgba(0,188,212,0.06), rgba(0,188,212,0.12));
  border: 1px solid rgba(0,188,212,0.25);
  align-self: flex-start;
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom-right-radius: 4px;
}

.ai-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(0,188,212,0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spinAnim 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spinAnim {
  to { transform: rotate(360deg); }
}

.ai-loading-text {
  font-size: 13px;
  color: rgba(0,255,255,0.7);
  animation: loadTextPulse 1.5s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes loadTextPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.ai-typing-dots { display: flex; gap: 4px; align-items: center; }

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-6px); opacity: 1; box-shadow: 0 0 8px var(--cyan); }
}

.ai-input-wrap {
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(0,255,255,0.1);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
  align-items: flex-end;
}

.ai-input-wrap input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,188,212,0.3);
  padding: 11px 14px;
  border-radius: 14px;
  color: #fff;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
  resize: none;
}
.ai-input-wrap input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,188,212,0.15);
}
.ai-input-wrap input::placeholder { color: rgba(255,255,255,0.3); }

.ai-send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,188,212,0.3);
}
.ai-send-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,188,212,0.5); }
.ai-send-btn:active { transform: scale(0.93); }
.ai-send-btn svg { width: 20px; height: 20px; fill: #fff; }

/* PRODUCT MODAL SLIDER FIX */
.pm-btn.pm-prev { right: auto !important; left: 12px !important; }
.pm-btn.pm-next { left: auto !important; right: 12px !important; }

.pm-slider-wrap,
.sub-slider-wrap {
  position: relative !important;
  width: 100% !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #ff00003f !important;
  isolation: isolate !important;
}

.pm-slider-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  height: 60vh;
  will-change: transform;
}
@media (max-width: 600px) {
  .pm-slider-track {
    height: 35vh;
  }
}
.pm-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}
.pm-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s ease-out, filter 1.2s ease-out;
  filter: brightness(0.4) blur(4px);
  transform: scale(0.85);
}
.pm-slide.active img {
  transform: scale(1.02);
  filter: brightness(1) blur(0);
}
.pm-slide-caption {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  padding: 30px 30px 20px;
  background: linear-gradient(transparent, rgba(0, 217, 255, 0.384));
  color: #00eeff9d;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0,188,212,0.8);
  transition: bottom 0.5s ease 0.3s;
  text-align: center;
}
.pm-slide.active .pm-slide-caption { bottom: 0; }

/* RESPONSIVE */
@media (max-width: 992px) {
  .about-container { grid-template-columns: 1fr; }
  .about-content { text-align: center; }
  .header-inner { padding: 15px 20px; }
  .main-nav { display: none; }
}

@media (max-width: 600px) {
  .ai-chat-box {
    width: 100%;
    height: 100dvh;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(0,255,255,0.2);
    /* display: flex; حذف شد تا خودکار باز نشود */
    flex-direction: column;
  }

  .ai-btn {
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
  }

  .ai-messages { padding: 14px 12px; }
  .ai-msg { font-size: 13.5px; max-width: 88%; }

  .ai-input-wrap {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .logo-icon { font-size: 28px; }
  .logo-main { font-size: 14px; }
  .slide { height: 300px; }
  .slide-content h2 { font-size: 22px; }
}

@media (max-width: 400px) {
  .ai-msg { font-size: 13px; max-width: 92%; }
}

/* ===== MOBILE SIDE NAV ===== */
@media (max-width: 768px) {
  .side-scroll-nav {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* خط پیشرفت - کمی عریض تر شد */
  .side-scroll-track {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 4px; /* تغییر یافته از 2 به 4 */
    height: 100%;
    background: rgba(0, 255, 200, 0.12);
    border-radius: 4px;
    z-index: 0;
  }

  .side-scroll-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #00e5b0, #00bcd4);
    border-radius: 4px;
    transition: height 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 229, 176, 0.6);
  }

  /* نقاط - کمی بزرگ تر شدند */
  .side-scroll-dot-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 6px 0;
  }

  .ssn-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
  }

  .ssn-dot {
    width: 12px; /* تغییر از 10 به 12 */
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 229, 176, 0.2);
    border: 1.5px solid rgba(0, 229, 176, 0.35);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
  }

  .ssn-dot.active {
    background: #00e5b0;
    border-color: #00e5b0;
    width: 16px; /* تغییر از 14 به 16 */
    height: 16px;
    box-shadow:
      0 0 0 3px rgba(0, 229, 176, 0.2),
      0 0 12px rgba(0, 229, 176, 0.7);
  }

  .ssn-dot.visited {
    background: rgba(0, 229, 176, 0.5);
    border-color: rgba(0, 229, 176, 0.6);
  }

  /* برچسب */
  .ssn-label {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(0, 15, 20, 0.88);
    color: #00e5b0;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 229, 176, 0.25);
    backdrop-filter: blur(8px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: inherit;
    direction: rtl;
  }

  .ssn-item:hover .ssn-label,
  .ssn-item.show-label .ssn-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* روی دسکتاپ مخفی */
@media (min-width: 769px) {
  .side-scroll-nav { display: none !important; }
}


/* =========================================
   بهینه‌سازی گریدها و دکمه نمایش بیشتر (برای ارتباط با JS)
========================================= */
.show-more-wrap {
  text-align: center;
  margin-top: 30px;
  width: 100%;
}

.show-more-btn {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0,188,212,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.show-more-btn:active {
  transform: scale(0.95);
}

/* کلاسی که با جاوااسکریپت به گرید می‌دهید تا از 10 تا بیشتر را مخفی کند */
.limit-items > *:nth-child(n+11) {
  display: none !important;
}

/* =========================================
   اصلاحات ریسپانسیو و موبایل تکمیلی
========================================= */
@media (max-width: 600px) {
  /* تنظیم گرید محصولات و خدمات برای موبایل (جاگیری بهتر دو آیتم در یک ردیف) */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }

  .product-btn {
    padding: 15px 10px;
  }

  /* تنظیم اسلایدر برای موبایل */
  .slide { 
    height: 25vh; /* استفاده از درصد ارتفاع صفحه برای تناسب بهتر */
    min-height: 150px; 
  }
  .slide-content { padding: 20px 15px; }
  .slide-content h2 { font-size: 20px; }
  .slide-content p { font-size: 13px; }
  
  .slider-btn { width: 32px; height: 32px; font-size: 18px; }

  /* =========================================
     چت‌بات در موبایل
  ========================================= */
  .ai-chat-header {
    /* جلوگیری از رفتن هدر به زیر ناچ (Notch) گوشی */
    padding: max(15px, env(safe-area-inset-top)) 15px 15px 15px;
    align-items: center;
  }

  .ai-header-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px; /* جلوگیری از هل دادن دکمه بستن */
  }

  /* رفع مشکل دکمه خروج چت بات */
  .ai-chat-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 20px;
    /* قرارگیری ثابت در سمت چپ (چون سایت RTL است) */
    margin-right: auto; 
    z-index: 1000;
  }

  .ai-messages { 
    padding: 14px 12px; 
    padding-bottom: 20px;
  }
  
  .ai-msg { 
    font-size: 14px; 
    max-width: 90%; 
    padding: 10px 14px;
  }

  .ai-input-wrap {
    padding: 12px;
    /* جلوگیری از رفتن اینپوت به زیر نوار هوم آیفون */
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  
  .ai-input-wrap input {
    font-size: 16px; /* جلوگیری از زوم شدن خودکار کیبورد در آیفون */
  }

  .ai-btn {
    bottom: max(20px, env(safe-area-inset-bottom));
    right: 20px;
    width: 55px;
    height: 55px;
  }
  
  .ai-robot { font-size: 24px; }
}

@media (max-width: 400px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .ai-msg { max-width: 95%; font-size: 13.5px; }
}

/* این کد را به فایل CSS خود اضافه کنید */
#cursor, #cursorTrail {
  z-index: 9999999 !important; /* باید از z-index چت‌بات بیشتر باشد */
  pointer-events: none !important; /* تا بتوانید روی دکمه‌های زیر موس کلیک کنید */
}

/* در موبایل موس سفارشی را کلا مخفی می‌کنیم */
@media (max-width: 768px) {
  #cursor, #cursorTrail {
    display: none !important;
  }
}
