@font-face {
  font-family: 'IRANSans';
  src: url('./assets/iransans.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  font-family: 'IRANSans', sans-serif;
  background: #fafafa;
  color: #333;
  direction: rtl;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0px;
  left: 0px;
  z-index: 10;
}

header img {
  height: 50px;
}

.brands {
  padding: 20px;
  text-align: center;
}

.brands h2 {
  margin-bottom: 10px;
}

.brand-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.brand-item {
  background: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid #eee;
  font-size: 14px;
  cursor: pointer;
}

.brand-item.active {
  border-color: #000;
}

.products {
  padding: 20px;
}

.products h2 {
  text-align: center;
  margin-bottom: 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}


.product {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  text-align: center;
  transition: 0.2s ease;
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-code {
  font-size: 13px;
  margin: 8px 0 4px;
}

.product-name {
  font-size: 15px;
  margin: 8px 0 4px;
  font-weight: bold;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.product-price {
  font-size: 14px;
  color: #007b55;
  font-weight: 600;
}

.product img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.call-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0aa06e url("./assets/phone.png") no-repeat center center;
  color: #fff;
  padding: 25px;
  border-radius: 50px;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background-size: 50%;
}

.loader {
  width: 60px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side, #000 90%, #0000);
  background:
    var(--_g) 0% 50%,
    var(--_g) 50% 50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 50%;
  animation: l3 1s infinite linear;
  display: none;
  margin: 20px auto;
}

@keyframes l3 {
  20% {
    background-position: 0% 0%, 50% 50%, 100% 50%
  }

  40% {
    background-position: 0% 100%, 50% 0%, 100% 50%
  }

  60% {
    background-position: 0% 50%, 50% 100%, 100% 0%
  }

  80% {
    background-position: 0% 50%, 50% 50%, 100% 100%
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}