@import url('https://fonts.googleapis.com/css2?family=Calibri&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Almendra:ital,wght@0,400;0,700;1,400;1,700&family=Parisienne&family=Sofia&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
input,
button,
textarea {
  font-family: 'Calibri', sans-serif;
  direction: rtl;
  margin-bottom: 5px;
}

input::placeholder {
  font-family: 'Calibri', sans-serif;
}

body {
  background: linear-gradient(135deg, #e0f7fa, #e1bee7);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 60px; /* فاصله برای فوتر */
}

.fnt{
  font-family: "Almendra", serif;
  font-weight: 700;
  /* display: inline;
  line-height: 70px; */
}
.black{
  color: #000;
}
.pink{
  background: linear-gradient(
    90deg,
    rgba(2,119,189,1) 0%,
    deeppink 100%
  );
  /* اعمال گرادیانت فقط روی متن */
  -webkit-background-clip: text;   /* برای WebKit (Safari, old Chrome) */
  background-clip: text;          /* برای بقیه مرورگرها */
  /* متن را شفاف می‌کنیم تا پس‌زمینه دیده شود */
  color: transparent;
  /* در Safari برای اطمینان */
  -webkit-text-fill-color: transparent;
}
.grdnt{
  background: linear-gradient(
    90deg,
    rgba(179,229,252,1) 10%,
    rgba(2,119,189,1) 100%
  );
  /* اعمال گرادیانت فقط روی متن */
  -webkit-background-clip: text;   /* برای WebKit (Safari, old Chrome) */
  background-clip: text;          /* برای بقیه مرورگرها */
  /* متن را شفاف می‌کنیم تا پس‌زمینه دیده شود */
  color: transparent;
  /* در Safari برای اطمینان */
  -webkit-text-fill-color: transparent;
}
/* Loader full-screen */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease-out;
}

/* لوگوی وسط لودر */
.loader-logo {
  position: relative;
  width: 350px;
  z-index: 1;
  animation: logoPulse 3s ease-in-out infinite;
}

/* canvas پارتیکل */
#loader-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* وقتی لودر مخفی شد */
#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}


/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
.logo-text {
  display: flex;
  align-items: center;    /* وسط‌چین عمودی */
  gap: 12px;              /* فاصله‌ی افقی لوگو تا متن */
}
.logo {
  height: 70px;
}
.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons img {
  width: 24px;
  height: 24px;
  display: block;
}
/* ---------- Main & Sections ---------- */
main {
  margin-top: 80px;       /* زیر هدر */
  margin-right: 340px;    /* برای فضای سایدبار */
  padding: 20px;
  overflow: auto;
}

.product-section {
  margin-bottom: 40px;
}

.product-section h2 {
  font-size: 24px;
  color: #333;
  border-bottom: 2px solid #888;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* دکمه نمایش/پنهان ناموجودها */
.toggle-unavailable {
  display: block;
  margin: 10px auto 0;
  background: #0288d1;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* ---------- Product Card ---------- */
.product-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.product-card h4 {
  font-size: 18px;
  color: #444;
  margin-bottom: 10px;
}
.product-card p {
  font-size: 14px;
  color: #555;
  margin: 5px 0;
}
.product-card button {
  border: none;
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 12px;
}
.product-card button[disabled] {
  background: #bbb;
  cursor: not-allowed;
  color: #fff;
}
.product-card button:not([disabled]) {
  background: #43a047;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
.product-card button:not([disabled]):hover {
  background: #388e3c;
}
.product-card button.view-img-btn:not([disabled]) {
  background-color: transparent;
  border:1px solid darkred;
  color: darkred; /* سیاه برای خوانایی بهتر */
}
/* ---------- Cart Sidebar ---------- */
.cart-sidebar {
  position: fixed;
  top: 80px;         /* دقیقاً زیر هدر */
  right: 0;
  bottom: 75px;      /* بالای فوتر */
  width: 320px;
  padding: 20px;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 500;
}

.cart-sidebar h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #222;
}

.buyer-info input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.cart-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.cart-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.captcha {
  margin: 20px 0;
  text-align: center;   /* مرکزچین کردن ویجت */
  overflow: hidden;     /* مخفی کردن هر چیزی که از محدوده بیرون بزند */
}

#print-btn,#view-btn{
  background: #43a047;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}
#view-btn{
  background: #cfcd4f;
  font-weight: bold;
  
}
#print-btn:disabled,#view-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

#print-btn:not(:disabled):hover {
  background: #388e3c;
}
#view-btn:not(:disabled):hover {
  background: #cfcd4f;
  color: #000;
  
}
/* ---------- Footer ---------- */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
  color: #555;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* ---------- Notification ---------- */
#notification-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1100;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  header{
    justify-content: center; 
  }
  main {
    margin-right: 0;
    margin-top: 80px;
  }
  .cart-sidebar {
    position: relative;
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: auto;
    box-shadow: none;
    border-top: 1px solid #ddd;
    margin-top: 20px;
  }
  footer {
    position: relative;
  }
  .mgt{
    line-height: 30px;
    margin-right: 10px;
  }
}
/* ---------- Welcome Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;           /* پیش‌فرض مخفی */
  align-items: center;
  justify-content: center;
  z-index: 12000;
}
.modal.active {
  display: flex;           /* وقتی فعال شد، فلکس */
}
.modal-content {
  position: relative;
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  padding: 20px 30px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-family: 'Calibri', sans-serif;
}
/* لوگو کم‌رنگ در پس‌زمینه */
.modal-content::before {
  content: "";
  position: absolute; inset: 0;
  background: url('logo2.png') center/contain no-repeat;
  opacity: 0.1;
  z-index: 0;
}
.modal-header, .modal-body, .modal-footer {
  position: relative; z-index: 1;
}
.modal-header h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #0288d1;
}
.modal-body p {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  text-align: center;
}
.modal-footer {
  text-align: center;
  margin-top: 50px;
}
.modal-footer button {
  padding: 8px 20px;
  background: #43a047;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .3s;
}
.modal-footer button:hover {
  background: #388e3c;
}

/* Image Preview Modal */
.modal {  }
#imgModal .modal-content {
  max-width: 90%; width: auto; padding: 0; background: #fff;
}
#imgModal .close {
  position: absolute; top: 10px; right: 15px;
  font-size: 28px; cursor: pointer;
}
#imgModal .modal-body {
  text-align: center; padding: 20px;
}
#imgModal .modal-body img {
  max-width: 100%; height: auto;
}
#imgModal .modal-footer {
  background: #f8d7da; color: #721c24;
  padding: 15px; font-size: 0.9rem; text-align: center;
  border-top: 1px solid #f5c6cb;
}
#imgModal .modal-header {
  text-align: right;
  padding: 10px 20px;
  border-bottom: 1px solid #ddd;
}
#imgModal .close-btn {
  background: transparent;
  border: 1px solid darkred;
  font-size: 1rem;
  color: darkred;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background .3s;
}
#imgModal .close-btn:hover {
  background: rgba(2,119,189,0.1);
}

/* ⚙️ تنظیم نمایش و محدودکردن عرض ویجت */
.captcha .cf-turnstile {
  display: inline-block;
  width: 100%;
  max-width: 100%;
}

/* ⚙️ تنظیم عرض و ارتفاع آیفریمی که Cloudflare می‌سازد */
.captcha .cf-turnstile iframe {
  width: 100% !important;
  height: auto !important;
}
