@font-face {
  font-family: 'IranSans';
  src: url(../Fonts/IranSans.ttf);
}

@font-face {
  font-family: 'IranSansFaNum';
  src: url(../Fonts/IranSansFaNum.ttf);
}

* {
  font-family: 'IranSans';
}

.form-control-dark {
  border-color: var(--bs-gray);
}

.form-control-dark:focus {
  border-color: #fff;
  box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .25);
}

.text-small {
  font-size: 85%;
}

.dropdown-toggle:not(:focus) {
  outline: 0;
}

.text-body-secondary {
  font-family: 'IranSansFaNum';
  font-size: 14px;
}

/* اسکرول افقی محصولات */
.product-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 16px;
  justify-content: flex-start;
  direction: rtl;
  padding: 20px;
  scroll-behavior: smooth;
}

/* قاب عکس */
.image-box {
  width: 130px;
  height: 160px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-wrapper {
  position: relative;
  text-align: center;
}

.image-wrapper .add-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  transform: translateY(50%);
  border: 1px solid red;
  background: white;
  border-radius: 8px;
  color: red;
  font-size: 20px;
  padding: 4px 10px;
  cursor: pointer;
}

.old-price {
  text-decoration: line-through;
  color: gray;
  font-size: 12px;
  display: block;
}

.row-wrapper {
  display: flex;
  direction: rtl;
  align-items: stretch;
  margin-bottom: 24px;
}

.category-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: #eee;
  color: #333;
  padding: 10px;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

body {
  margin: 0;
  font-family: sans-serif;
  direction: rtl;
  padding-bottom: 80px;
}

/* باکس محصول */
.product-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #f8f8f8;
  padding: 16px;
  border-bottom: 1px solid #ddd;
  box-sizing: border-box;
  margin-top: 10px;
}

.product-image {
  width: 100px;
  height: 100px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 8px;
}

.product-info {
  flex-grow: 1;
  margin-right: 16px;
}

.product-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.product-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-controls .btn {
  width: 40px;
  height: 30px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  background: #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.product-controls .count {
  font-size: 16px;
  width: 30px;
  text-align: center;
}

.product-price {
  font-size: 16px;
  font-weight: bold;
  min-width: 100px;
  text-align: left;
  color: #333;
}

/* باکس محصول چسبیده پایین صفحه */
.fixed-product-box {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-top: 1px solid #ccc;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.fixed-product-box .product-image img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.fixed-product-box .product-info {
  flex-grow: 1;
  margin-right: 12px;
}

.fixed-product-box .product-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.fixed-product-box .product-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fixed-product-box .btn {
  width: 100px;
  height: 60px;
  font-size: 15px;
  background: #a4a2a2;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.fixed-product-box .count-input {
  width: 50px;
  text-align: center;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.fixed-product-box .product-price {
  min-width: 100px;
  text-align: left;
  font-weight: bold;
}

.nav-link {
  direction: rtl;
}

/* 📱 ریسپانسیو کامل موبایل */
@media (max-width: 768px) {

  body {
    padding-bottom: 100px;
  }

  .product-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .product-image,
  .product-image img {
    width: 80px !important;
    height: auto !important;
  }

  .product-info {
    margin-right: 0;
    width: 100%;
  }

  .product-title {
    font-size: 14px;
  }

  .product-controls {
    justify-content: center;
  }

  .product-price {
    font-size: 14px;
    min-width: auto;
    width: 100%;
    text-align: center;
  }

  .product-grid {
    gap: 10px;
    padding: 10px;
  }

  .image-box {
    width: 100px;
    height: 130px;
  }

  .category-label {
    font-size: 12px;
    min-width: 30px;
    padding: 6px;
  }

  .fixed-product-box {
    height: auto;
    padding: 10px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .fixed-product-box .btn {
    width: 70px;
    height: 40px;
    font-size: 14px;
  }

  .fixed-product-box .product-image img {
    width: 60px;
    height: auto;
  }
}
