/* استایل کلی برای افزونه آقای فروش */
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("./fonts/Vazirmatn-RD-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* اعمال فونت به کل سایت */
body,
* {
  font-family: "Vazir", tahoma, sans-serif !important;
  font-weight: 400;
}
/* ====================== */
/* ====================== */
/* ====================== */

.af-search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.search-btn-text {
  display: inline;
}
#af-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

#af-search-btn {
  padding: 8px 16px;
  background-color: #fff;
  color: #a11544;
  border: 2px solid #a11544;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#af-search-btn:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
}

/* ====================================== */
.af-logo-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.af-logo-scroll:active {
  cursor: grabbing;
}

.af-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease;
}

.af-logo img {
  max-width: 40px;
  max-height: 40px;
  pointer-events: none; /* جلوگیری از جا به جایی در کشیدن */
}

.af-logo:hover {
  border: 2px solid #a11544;
}
.af-logo:active {
  border: 2px solid #a11544;
}

.selected-logo {
  border: 2px solid #a11544;
  box-shadow: 0 0 10px rgba(161, 21, 68, 0.5);
}

.af-category {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 25px;
  box-shadow: 1px 1px 5px #f0f0f0;
}

.af-category h3 {
  margin-top: 0;
  font-weight: 600;
  font-size: 22px;
}

.af-category p {
  color: #666;
  font-size: 13px;
  margin-bottom: 15px;
}

.af-table {
  overflow-x: auto;
  border-radius: 10px;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.af-table thead tr {
  background: #ffffff;
  border-bottom: 2px solid #ddd;
}

.af-table th,
.af-table td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 14px;
}

.af-table th {
  font-weight: 600;
  color: #333;
}

.af-table tbody tr:hover {
  background: #f5f5f5;
}

.af-show-desc {
  background: #a11544;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.af-show-desc:hover {
  background: #890c35;
}

/* استایل پاپ آپ */

#af-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#af-popup {
  background: #fff;
  padding: 20px 25px;
  border-radius: 7px;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

#af-popup h4 {
  margin-top: 0;
  margin-bottom: 15px;
}

#af-popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  font-weight: 700;
  user-select: none;
}

#af-popup-close:hover {
  color: #000;
}

.af-box {
  margin: 10px 0;
}

.af-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
}

.af-icon {
  width: 20px; /* اندازه آیکون */
  height: 20px; /* اندازه آیکون */
  margin-left: 8px;
}

.af-text {
  color: #222;
}

.af-subtext {
  margin-top: 4px;
  font-size: 13px;
  color: #888;
}
/* 
%
%%%
%%
%
%
5%
%

*/
/* ==== بخش لوگوها ==== */
.af-logos {
  display: flex;
  overflow-x: auto; /* اسکرول افقی */
  -webkit-overflow-scrolling: touch; /* اسکرول نرم موبایل */
  gap: 10px;
  padding: 10px 0;
  scrollbar-width: thin; /* برای فایرفاکس */
  scrollbar-color: #ccc transparent;
}

.af-logos::-webkit-scrollbar {
  height: 6px;
}

.af-logos::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.af-logo {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.af-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.af-logo:hover {
  transform: scale(1.1);
}

@media (max-width: 600px) {
  .af-logo {
    width: 40px;
    height: 40px;
  }
}

/* ==== بخش جدول ==== */
.af-table-wrapper {
  overflow-x: auto; /* اسکرول افقی جدول */
  -webkit-overflow-scrolling: touch;
  margin-top: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.af-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px; /* حداقل عرض جدول برای اسکرول */
}

.af-table th,
.af-table td {
  /* border: 1px solid #ccc; */
  padding: 8px 12px;
  white-space: nowrap; /* جلوگیری از شکستن متن */
}

.af-table th {
  background: #ffffff;
  font-weight: 600;
  color: #333;
}

/* ==== متن و عناوین ==== */
.af-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #222;
}

.af-subtext {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

/* ریسپانسیو متن */
@media (max-width: 996px) {
  .af-title {
    font-size: 20px;
  }
  .af-subtext {
    font-size: 13px;
  }
  .af-category h3 {
    font-size: 20px;
  }
  .af-logo {
    flex: 0 0 auto;
    width: 37px;
    height: 37px;
  }
}
@media (max-width: 600px) {
  .af-title {
    font-size: 17px;
  }
  .af-subtext {
    font-size: 12px;
  }
  .af-category h3 {
    font-size: 17px;
  }
  .af-logo {
    flex: 0 0 auto;
    width: 33px;
    height: 33px;
  }
  .search-btn-text {
    display: none;
  }
}
