* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'YekanBakh', 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  background: #f4f7f9;
  color: #1f2937;
  line-height: 1.8;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.header {
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 30px; position: sticky; top: 0; z-index: 100; flex-wrap: wrap; gap: 15px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 60px; width: auto; object-fit: contain; }
.logo-text {
  font-size: 22px; font-weight: 900;
  background: linear-gradient(45deg, #0d9488, #1e3a5f);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 1.5px; border-bottom: 2.5px dotted #0d9488; padding-bottom: 4px;
}

.search-box {
  display: flex; align-items: center; background: #f3f4f6;
  border-radius: 8px; padding: 5px 15px; flex: 1; max-width: 400px; margin: 0 20px;
  border: 1px solid transparent; transition: all 0.3s ease;
}
.search-box:focus-within { background: #fff; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
.search-icon { font-size: 16px; color: #6b7280; margin-left: 8px; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; padding: 8px 0; font-family: inherit; font-size: 14px; }

.menu { display: flex; align-items: center; flex-wrap: wrap; }
.menu > a, .dropdown > .dropbtn { color: #4a5568; font-weight: 500; margin: 0 12px; padding: 15px 0; display: inline-block; transition: color 0.2s; }
.menu > a:hover, .dropdown:hover > .dropbtn { color: #0d9488; }

.dropdown { position: relative; display: inline-block; }
.dropdown-content {
  visibility: hidden; opacity: 0; position: absolute; top: 100%; right: 0;
  background: #fff; min-width: 400px; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-radius: 12px; padding: 20px; z-index: 1000; display: flex; gap: 40px;
  transition: all 0.2s ease; transform: translateY(10px); border: 1px solid #e5e7eb;
}
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateY(0); }
.mega-column { display: flex; flex-direction: column; min-width: 150px; }
.mega-column h4 { color: #1f2937; font-size: 15px; font-weight: bold; margin-bottom: 12px; border-bottom: 2px solid #0d9488; padding-bottom: 5px; }
.mega-column a { color: #6b7280; font-size: 14px; margin-bottom: 8px; transition: color 0.2s; }
.mega-column a:hover { color: #0d9488; padding-right: 5px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.auth-btn { background: #fff; color: #0d9488; border: 2px solid #0d9488; padding: 6px 16px; border-radius: 8px; font-weight: bold; transition: all 0.2s; }
.auth-btn:hover { background: #0d9488; color: #fff; }
.cart-icon { background: #0d9488; color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: bold; transition: background 0.2s; cursor: pointer; display: inline-block; }
.cart-icon:hover { background: #0f766e; }

.hero { background: linear-gradient(135deg, #0d9488, #1e3a5f); color: #fff; text-align: center; padding: 70px 20px; }
.hero h1 { font-size: 40px; margin-bottom: 8px; }
.btn-primary { display: inline-block; background: #fff; color: #0d9488; padding: 12px 30px; border-radius: 8px; font-weight: bold; margin-top: 15px; cursor: pointer; transition: transform 0.2s; }
.btn-primary:hover { transform: translateY(-2px); }

.categories { padding: 40px 20px; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card { background: #fff; padding: 25px 15px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); font-weight: bold; transition: all 0.2s; display: block; color: #1f2937; }
.category-card:hover { background: #e6fffa; transform: translateY(-3px); }

.products { padding: 40px 20px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: 12px; padding: 15px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); display: flex; flex-direction: column; transition: transform 0.2s; }
.product-card:hover { transform: translateY(-4px); }
.product-card img { width: 100%; height: 180px; object-fit: contain; background: #f7fafc; border-radius: 8px; margin-bottom: 10px; }
.product-card h3 { font-size: 16px; margin: 10px 0 5px; color: #1f2937; }
.product-card .price { color: #0d9488; font-weight: bold; margin-bottom: 15px; }
.product-card button { background: #0d9488; color: #fff; padding: 10px; border-radius: 6px; font-weight: bold; margin-top: auto; transition: background 0.2s; }
.product-card button:hover { background: #0f766e; }

.auth-content {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: 40px auto;
}

.auth-tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 2px solid #e5e7eb;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  font-weight: bold;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.auth-tab.active {
  color: #0d9488;
  border-bottom-color: #0d9488;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 15px;
}

.auth-form.active {
  display: flex;
}

.auth-form h3 {
  color: #1f2937;
  margin-bottom: 10px;
  text-align: center;
  font-size: 20px;
}

.auth-form input {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}

.auth-form input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.auth-form .btn-primary {
  margin-top: 10px;
  background: #0d9488;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  transition: background 0.2s;
}

.auth-form .btn-primary:hover {
  background: #0f766e;
  transform: none;
}

.cart-item-row { display: flex; align-items: center; background: #fff; padding: 15px; border-radius: 12px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); gap: 20px; }
.form-box { background: #fff; padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 100%; max-width: 450px; margin: 40px auto; }
.form-box input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; }
.form-box h3 { text-align: center; color: #0d9488; margin-bottom: 20px; }

.news-toggle { position: fixed; top: 150px; left: 0; width: 46px; height: 92px; background: linear-gradient(180deg, #0d9488, #0f766e); color: #fff; font-size: 24px; border-radius: 0 50% 50% 0; z-index: 201; box-shadow: 3px 0 14px rgba(13,148,136,0.35); transition: left 0.3s; }
.news-toggle.open { left: 300px; }
.news-sidebar { position: fixed; top: 100px; left: -320px; width: 300px; height: calc(100vh - 120px); background: linear-gradient(180deg, #0d9488, #0f766e); color: #fff; border-radius: 0 80px 80px 0; z-index: 200; display: flex; flex-direction: column; transition: left 0.35s ease; }
.news-sidebar.open { left: 0; }
.news-header { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.2); font-size: 17px; font-weight: bold; }
.news-item { padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.15); display: block; transition: background 0.2s; }
.news-item:hover { background: rgba(255,255,255,0.12); }
.news-item h4 { font-size: 14px; font-weight: 500; color: #fff; }

.footer { background: #1a202c; color: #cbd5e0; padding: 40px 0 15px; margin-top: 40px; text-align: center; }
.footer p { font-size: 14px; }
.copyright { border-top: 1px solid #2d3748; padding-top: 15px; font-size: 13px; color: #718096; margin-top: 20px; }

@media (max-width: 768px) {
  .header { flex-direction: column; padding: 15px; }
  .search-box { max-width: 100%; margin: 10px 0; order: 4; }
  .category-grid { grid-template-columns: 1fr; }
  .dropdown-content { display: none; } /* در موبایل مگا منو مخفی میشه */
}
