/* Start custom CSS *//* ==========================================================================
   ARCHEM PRODUCT PAGE — DESIGN SYSTEM (Desktop First / Reference: 1450px)
   رنگ مرجع: نسخه دسکتاپ | ساختار: Single DOM → ریسپانسیو با Media Query
   ========================================================================== */

/* --- Design Tokens --- */
.archem-pp {
  --pp-primary:      #022a4a;   /* سرمه‌ای تیره */
  --pp-accent:       #e11d48;   /* قرمز آرکم */
  --pp-green:        #0e7a4a;   /* سبز دکمه تماس موبایل */
  --pp-online:       #10b981;
  --pp-offline:      #9ca3af;
  --pp-bg:           #f6f8fa;
  --pp-surface:      #ffffff;
  --pp-border:       #e6ebf0;
  --pp-text:         #0f172a;
  --pp-muted:        #64748b;
  --pp-radius:       12px;
  --pp-max:          1450px;
}

/* --- Container --- */
.archem-pp {
  max-width: var(--pp-max);
  margin-inline: auto;
  padding: 24px 20px 96px;
  background: var(--pp-bg);
  font-size: 14px;
  line-height: 1.8;
  color: var(--pp-text);
  box-sizing: border-box;
}
.archem-pp *,
.archem-pp *::before,
.archem-pp *::after {
  box-sizing: border-box;
}

/* --- گرید اصلی دسکتاپ --- */
.archem-pp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.archem-pp__main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* --- کارت عمومی --- */
.archem-pp__card {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  padding: 28px;
  width: 100%;
}

/* تیتر سکشن‌ها */
.archem-pp__card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--pp-primary);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--pp-bg);
  position: relative;
}
.archem-pp__card-title::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 56px;
  height: 2px;
  background: var(--pp-accent);
}

/* ==================================================================
   بخش ۱: هدر محصول — گالری + مشخصات
   ================================================================== */
.archem-pp__hero {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 32px;
}

/* ===== گالری ===== */
.archem-wc-gallery {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
}

.archem-wc-gallery__main-wrap {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.archem-wc-gallery__main-link {
  display: block;
  width: 100%;
  text-align: center;
  position: relative;
  cursor: zoom-in;
}

.archem-wc-gallery__main-link img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  max-height: 380px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.archem-wc-gallery__zoom-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.archem-wc-gallery__sale-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #e11d48;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
}

.archem-wc-gallery__thumbs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.archem-wc-gallery__thumb {
  width: 64px !important;
  height: 64px !important;
  padding: 2px !important;
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
  flex: 0 0 auto !important;
}

.archem-wc-gallery__thumb:hover,
.archem-wc-gallery__thumb.is-active {
  border-color: #0e2a47 !important;
  box-shadow: 0 2px 8px rgba(14, 42, 71, 0.15) !important;
}

.archem-wc-gallery__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 6px !important;
}

div.product div.images .flex-control-thumbs img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  opacity: 1 !important;
}

/* عنوان H1 */
.archem-pp__title {
  font-size: 30px;
  font-weight: 900;
  color: var(--pp-primary);
  line-height: 1.4;
  margin: 0 0 18px;
}

/* بج‌ها */
.archem-pp__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.archem-pp__badges .archem-badge,
.archem-pp__badges > * {
  background: #eef3f8;
  border: 1px solid var(--pp-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pp-primary);
}

/* توضیح کوتاه */
.archem-pp__excerpt {
  color: #334155;
  text-align: justify;
  margin: 0 0 22px;
}

/* دکمه‌های دانلود */
.archem-pp__docs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px dashed var(--pp-border);
}
.archem-pp__docs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--pp-border);
  border-radius: 8px;
  color: var(--pp-primary);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.archem-pp__docs a:hover {
  border-color: var(--pp-accent);
  background: #fff5f7;
}

/* ==================================================================
   بخش ۲: جدول آنالیز
   ================================================================== */
.archem-pp__table {
  width: 100%;
  border-collapse: collapse;
}
.archem-pp__table th,
.archem-pp__table td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--pp-border);
}
.archem-pp__table th {
  width: 38%;
  background: #f8fafc;
  color: var(--pp-primary);
  font-weight: 700;
}
.archem-pp__table tr:last-child th,
.archem-pp__table tr:last-child td {
  border-bottom: 0;
}
.archem-pp__ltr {
  direction: ltr;
  text-align: left;
  font-family: monospace;
  letter-spacing: .5px;
}

/* ==================================================================
   بخش ۳: NFPA + نگهداری
   ================================================================== */
.archem-pp__safety {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: start;
}

/* ==================================================================
   بخش ۴: FAQ
   ================================================================== */
.archem-pp__faq details {
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.archem-pp__faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--pp-primary);
  padding: 14px 18px;
  background: #f8fafc;
  list-style: none;
  position: relative;
}
.archem-pp__faq summary::-webkit-details-marker { display: none; }
.archem-pp__faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 18px;
  font-size: 20px;
  color: var(--pp-accent);
  transition: transform .2s;
}
.archem-pp__faq details[open] summary::after {
  content: "−";
}
.archem-pp__faq details p {
  padding: 14px 18px;
  margin: 0;
}

/* ==================================================================
   بخش ۵: سایدبار — کارت کارشناس + RFQ
   ================================================================== */
.archem-pp__sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 20px;
  min-width: 0;
}

.archem-pp__expert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.archem-pp__expert-avatar img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pp-surface);
  box-shadow: 0 2px 8px rgb(2 42 74 / .12);
}
.archem-pp__expert-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--pp-primary);
}
.archem-pp__expert-role {
  font-size: 12px;
  color: var(--pp-muted);
}

.archem-pp__call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  background: var(--pp-primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s;
}
.archem-pp__call-btn:hover,
.archem-pp__call-btn:focus-visible {
  background: #013a63;
  color: #fff;
}

.archem-pp__rfq .archem-rfq-box {
  margin: 0;
}

/* ==================================================================
   نوار چسبان موبایل (Sticky Bottom Bar) — در دسکتاپ مخفی
   ================================================================== */
.archem-pp__mobile-bar {
  display: none;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */

/* لپ‌تاپ کوچک */
@media (max-width: 1280px) {
  .archem-pp { padding: 20px 16px 80px; }
  .archem-pp__hero { grid-template-columns: 340px minmax(0, 1fr); gap: 24px; }
}

/* تبلت و موبایل: شکستن گرید + ترتیب جدید + نوار چسبان */
@media (max-width: 1024px) {
  .archem-pp__grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* main هموار می‌شود تا سکشن‌ها با order چیده شوند */
  .archem-pp__main {
    display: contents;
  }

  /* --- سایدبار: کارت کارشناس حذف، فقط RFQ در جریان صفحه --- */
  .archem-pp__sidebar {
    display: contents;
  }
  /* کارت کارشناس فروش (کارت اول سایدبار) در موبایل مخفی می‌شود */
  .archem-pp__sidebar > .archem-pp__card:first-child {
    display: none !important;
  }

  /* --- ترتیب سکشن‌ها در موبایل --- */
  /* ۱. هیرو */
  .archem-pp__hero { order: 1 !important; }
  /* ۳. فرم استعلام (بعد از هیرو، چون کارشناس دیگر در جریان نیست) */
  .archem-pp__rfq { order: 2 !important; }
  /* ۴. سایر سکشن‌ها */
  .archem-pp__main > section:nth-of-type(2) { order: 3 !important; }
  .archem-pp__main > section:nth-of-type(3) { order: 4 !important; }
  .archem-pp__main > section:nth-of-type(4) { order: 5 !important; }
  .archem-pp__main > section:nth-of-type(5) { order: 6 !important; }
  .archem-pp__main > section:nth-of-type(6) { order: 7 !important; }

  /* --- نوار چسبان پایین --- */
  .archem-pp__mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--pp-border);
    box-shadow: 0 -4px 16px rgba(2, 42, 74, 0.10);
    backdrop-filter: blur(6px);
  }
  .archem-pp__mobile-bar a {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    transition: filter .2s;
  }
  .archem-pp__mobile-bar a:active { filter: brightness(0.92); }

  /* دکمه سبز: تماس با کارشناس */
  .archem-pp__mobile-bar__call {
    background: var(--pp-green);
  }
  /* دکمه سرمه‌ای: استعلام قیمت */
  .archem-pp__mobile-bar__rfq {
    background: var(--pp-primary);
  }

  /* فاصله انتهای صفحه تا نوار روی محتوا نیفتد */
  .archem-pp { padding-bottom: 88px; }
}

/* موبایل استاندارد */
@media (max-width: 768px) {
  .archem-pp__hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .archem-pp__title { font-size: 24px; }
  .archem-pp__card { padding: 20px; }
  .archem-pp__safety { grid-template-columns: 1fr; }

  /* جدول آنالیز: کارت‌های key/value بدون اسکرول افقی */
  .archem-pp__table,
  .archem-pp__table tbody,
  .archem-pp__table tr,
  .archem-pp__table th,
  .archem-pp__table td {
    display: block;
    width: 100%;
  }
  .archem-pp__table th {
    background: transparent;
    padding-bottom: 4px;
    color: var(--pp-muted);
    font-size: 12px;
  }
  .archem-pp__table td {
    padding-top: 0;
    padding-bottom: 14px;
    font-weight: 700;
  }
}

/* موبایل کوچک */
@media (max-width: 480px) {
  .archem-pp { padding: 12px 12px 88px; }
  .archem-pp__title { font-size: 21px; }
  .archem-pp__card-title { font-size: 17px; }
  .archem-pp__mobile-bar a { font-size: 13px; padding: 12px 8px; }
}

/* --- Reduce Motion --- */
@media (prefers-reduced-motion: reduce) {
  .archem-pp * { transition: none !important; }
}

/* --- دسترس‌پذیری --- */
.archem-pp .screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute;
}

/* ==========================================================================
   یکپارچه‌سازی فونت
   ========================================================================== */
.archem-pp,
.archem-pp *,
.archem-spec-table,
.archem-spec-table *,
.archem-rfq-form,
.archem-rfq-form input,
.archem-rfq-form select,
.archem-rfq-form textarea,
.archem-rfq-form button,
.archem-expert-card,
.archem-expert-card * {
    font-family: inherit !important;
}

input, select, textarea, button {
    font-family: var(--e-global-typography-primary-font-family, inherit) !important;
}

.archem-spec-table td,
.archem-spec-table th,
.archem-pp__badge,
.archem-pp__meta-item {
    font-feature-settings: "ss01" on, "numr" on;
    letter-spacing: normal !important;
}

/* ==========================================================================
   باتم‌شیت تماس با کارشناس (Expert Contact Bottom Sheet)
   ========================================================================== */
dialog#expert-contact-sheet.archem-bottom-sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  z-index: 100000;
  overflow: visible;
}

dialog#expert-contact-sheet.archem-bottom-sheet::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.archem-bottom-sheet .sheet-container {
  position: relative;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: archemSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes archemSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.archem-bottom-sheet .sheet-grabber {
  width: 44px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  margin: -4px auto 6px;
}

.archem-bottom-sheet .sheet-close-btn {
  position: absolute;
  top: 14px;
  left: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.archem-bottom-sheet .sheet-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.archem-bottom-sheet .sheet-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 36px; /* فاصله از دکمه ضربدر */
}

.archem-bottom-sheet .expert-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.archem-bottom-sheet .expert-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}
.archem-bottom-sheet .online-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.archem-bottom-sheet .expert-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.archem-bottom-sheet .expert-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.archem-bottom-sheet .expert-role {
  font-size: 12.5px;
  color: #64748b;
}

.archem-bottom-sheet .sheet-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.archem-bottom-sheet .sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archem-bottom-sheet .btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.archem-bottom-sheet .btn-action:active {
  transform: scale(0.98);
}

.archem-bottom-sheet .btn-call {
  background: #013a63;
  color: #ffffff !important;
}
.archem-bottom-sheet .btn-whatsapp {
  background: #25D366;
  color: #ffffff !important;
}/* End custom CSS */