@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
}

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  background: #3d5068;
  margin: 0;
  padding: 20px;
  text-align: center;
  min-height: 100vh;
}

/* ─── هدر ─── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  margin-bottom: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.call-btn {
  background: rgba(80,160,255,0.2);
  color: #90c4ff;
  border: 1px solid rgba(80,160,255,0.5);
  padding: 10px 18px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 14px;
  transition: 0.2s;
}

.call-btn:hover {
  background: rgba(80,160,255,0.4);
}

.whatsapp-btn {
  background: rgba(80,220,140,0.2);
  color: #80ffcc;
  border: 1px solid rgba(80,220,140,0.5);
  padding: 10px 18px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 14px;
  transition: 0.2s;
}

.whatsapp-btn:hover {
  background: rgba(80,220,140,0.4);
}

/* ─── تایپوگرافی ─── */
h1 {
  font-size: 30px;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

h2 {
  text-align: center;
  color: #ffffff;
  margin: 0;
}

h3 {
  text-align: center;
  color: #1d1d1d;
  font-size: 20px;
  margin-bottom: 8px;
}

p {
  text-align: right;
  font-size: 15px;
  color: #c8d6e5;
}

a {
  text-decoration: none;
}

/* ─── باکس اطلاعات ─── */
.info-box {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.info-box h3 {
  color: #e8f0f8;
  font-size: 18px;
  font-weight: 500;
}

.info-box p {
  margin: 6px 0;
  font-size: 14px;
  color: #b0c4d8;
}

/* ─── دکمه پیش‌فرض ─── */
button {
  background: rgba(255,255,255,0.1);
  color: #e0e0e0;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 14px;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  transition: 0.2s;
}

/* ─── کارت محصولات ─── */
#productList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.product {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  padding: 18px;
  margin: 10px;
  width: calc(50% - 20px);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.price {
  color: #00e5c9;
  font-weight: bold;
}

/* ─── گالری صفحه اصلی ─── */
.home-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.gallery-card {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.gallery-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  pointer-events: none;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
  pointer-events: none;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,166,147,0.25), rgba(61,80,104,0.5));
  font-size: 32px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.gallery-label {
  padding: 6px 8px 2px;
  font-size: 12px;
  font-weight: 700;
  color: #e0ecf8;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.gallery-cat {
  padding: 0 8px 8px;
  font-size: 11px;
  color: #00e5c9;
  text-align: center;
  pointer-events: none;
}

/* ─── پاپ‌آپ ─── */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.popup-overlay.active {
  display: flex;
}

.popup-box {
  background: linear-gradient(145deg, #2e4057, #3d5068);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 24px 20px 20px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  animation: popupIn 0.25s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-close {
  position: absolute;
  top: 12px;
  left: 14px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #ccc;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}

.popup-close:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.goto-cat-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: rgba(0,166,147,0.75);
  color: #fff;
  border: 1px solid rgba(0,230,180,0.5);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.goto-cat-btn:hover {
  background: rgba(0,166,147,1);
}

/* ─── دکمه بازگشت به بالا ─── */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  left: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,166,147,0.85);
  color: #fff;
  border: 1px solid rgba(0,230,180,0.5);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.scroll-top-btn:hover {
  transform: translateY(-3px);
  background: rgba(0,166,147,1);
}

/* ─── موبایل ─── */
@media (max-width: 768px) {

  .header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 14px;
  }

  .header-logo {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .header-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .call-btn,
  .whatsapp-btn {
    flex: 1;
    max-width: 160px;
    padding: 14px 10px;
    font-size: 16px;
  }

  .home-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  #productList {
    flex-wrap: wrap;
    justify-content: center;
  }

  .product {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
  }

  .scroll-top-btn {
    bottom: 16px;
    right: 14px;
    left: auto;
  }
}
