/* =======================================
   🎨 PersianGem Theme Variables (Light)
   Based on Baziti v8.0
======================================= */
:root{
  --pg-primary:#0077b6;
  --pg-secondary:#0096c7;
  --pg-accent:#00b4d8;

  --pg-bg:#f8f9fb;
  --pg-card:#ffffff;
  --pg-surface:#f5f7fa;

  --pg-text:#1a1a1a;
  --pg-muted:#6c757d;
  --pg-border:#e6e9ef;

  --pg-shadow:0 4px 16px rgba(0,0,0,.08);
  --pg-shadow-lg:0 10px 30px rgba(0,0,0,.12);
  --divider:#e9ecef;

  --pg-success:#06d6a0;
  --pg-warning:#ffd166;
  --pg-error:#ef476f;

  /* Dark Mode (Future) */
  --pg-dark-bg:#101418;
  --pg-dark-card:#1a1f25;
  --pg-dark-text:#f1f3f6;
  --pg-dark-muted:#8b97a3;
}

/* ================================
   🔤 Global Typography
================================= */
html, body {
  font-family: 'Vazirmatn', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--pg-bg);
  color: var(--pg-text);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================================
   📦 Container (اصلی و ثابت)
================================== */
.container,
.pg-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* موبایل */
@media (max-width: 768px) {
  .container,
  .pg-container {
    padding: 0 14px;
  }
}
/* ================================
   📱 Mobile Menu – Final Clean Version
=================================== */

.pg-menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  transition: opacity 0.35s ease;
}
.pg-menu-drawer.open {
  display: flex;
  opacity: 1;
}

/* Menu Panel */
.pg-menu-panel {
  position: relative;
  width: 90%;
  max-width: 380px;
  max-height: calc(100vh - 70px);
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--pg-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuPop 0.35s ease;
}
@keyframes menuPop {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.pg-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 10px;
  border-bottom: 1px solid #eceef1;
  background: #fff;
}
.pg-menu-head strong {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}
.pg-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #444;
  cursor: pointer;
}

/* Scroll Area */
.pg-menu-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.pg-menu-scroll::-webkit-scrollbar { width: 6px; }
.pg-menu-scroll::-webkit-scrollbar-thumb {
  background: #cfd8e3;
  border-radius: 4px;
}

/* Items */
.pg-menu-list {
  list-style: none;
  margin: 0;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-menu-list li a,
.pg-cat-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--pg-text);
  background: transparent;
  text-decoration: none;
  transition: 0.25s ease;
}

.pg-menu-list li a:hover,
.pg-cat-toggle-btn:hover {
  background: #f7f9fb;
  color: var(--pg-primary);
}

/* Category Toggle */
.pg-cat-toggle-btn {
  justify-content: flex-start;
  gap: 8px;
}
.pg-cat-toggle-btn b {
  margin-right: auto;
  font-size: 20px;
  color: var(--pg-primary);
  font-weight: 700;
}

/* Subcategories */
.pg-subcats {
  list-style: none;
  padding: 0 22px 0 0;
  display: none;
}
.pg-subcats li a {
  display: block;
  font-size: 15px;
  color: #666;
  padding: 6px 0;
}
.pg-subcats li a:hover { color: var(--pg-primary); }

/* Footer Link */
.pg-menu-footer {
  padding: 18px 20px 26px;
  border-top: 1px solid #f0f2f5;
}
.pg-menu-footer a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  background: linear-gradient(135deg,#0077b6,#0096c7);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,119,182,0.25);
  transition: 0.3s ease;
}
.pg-menu-footer a:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg,#0096c7,#00b4d8);
}
/* ===================================
   🧭 Header – Modern Final (Option C)
====================================== */

.pg-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: var(--pg-shadow);
  border-radius: 0 0 22px 22px;
  overflow: hidden;
}

/* Inner */
.pg-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  height: 70px;
}

/* Logo */
.pg-logo img {
  height: 48px;
  width: auto;
}

/* Actions */
.pg-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Icon Buttons */
.pg-icon-btn {
  background: transparent !important;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  cursor: pointer;
  transition: color 0.2s ease;
}
.pg-icon-btn:hover {
  color: var(--pg-primary);
}

.pg-icon-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.4;
}

/* Offset (Space under header) */
.pg-offset {
  height: 20px;
}

/* Mobile */
@media (max-width: 768px) {
  .pg-header-inner {
    padding: 8px 14px;
    height: 64px;
  }
  .pg-logo img { height: 50px; }
  .pg-offset { height: 64px; }
}
/* ===================================
   🎞 Hero Slider – Clean Final Version
====================================== */

.pg-hero-slider {
  margin-top: 10px;
  margin-bottom: 10px;
}

.pg-slider {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  height: 180px; /* Mobile default */
}

/* Slides */
.pg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.pg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Active */
.pg-slide.active {
  opacity: 1;
}

/* Desktop Height */
@media (min-width: 768px) {
  .pg-slider { height: 380px; }
}
/* ===================================
   🏠 Home Page Sections – Clean Final
====================================== */

.pg-home {
  background: var(--pg-bg);
  color: var(--pg-text);
}

.pg-section {
  padding: 60px 0;
}

/* Section Head */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
}
.section-link {
  font-size: 15px;
  color: var(--pg-primary);
  text-decoration: none;
}
.section-link:hover {
  color: var(--pg-accent);
}

/* Product Grid */
.pg-products-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 20px;
}
.pg-product-card {
  background: var(--pg-card);
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--pg-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.pg-product-card img {
  width: 100%;
  height: auto;
}
.pg-product-card h3 {
  font-size: 15px;
  font-weight: 600;
  padding: 14px 0;
}
.pg-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pg-shadow-lg);
}

/* Testimonials */
.pg-testimonials {
  padding: 60px 0;
  text-align: center;
}
.pg-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.pg-testimonial {
  background: var(--pg-card);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--pg-shadow);
  font-size: 15px;
}
.pg-testimonial span {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--pg-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .pg-products-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .pg-testimonials-grid {
    grid-template-columns: 1fr;
  }
}
/* ===================================
   💬 PG Modal System – Final Clean
====================================== */

.pg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}
.pg-modal.open {
  display: flex !important;
}

/* Modal Container */
.pg-sheet {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--pg-shadow-lg);
  width: 90%;
  max-width: 420px;
  animation: popupFade .35s ease;
  overflow: hidden;
}
@keyframes popupFade {
  from { transform: translateY(25px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Header */
.pg-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #eceef1;
  font-weight: 600;
  font-size: 16px;
}
.pg-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #555;
}

/* Body */
.pg-sheet-body {
  padding: 18px;
}

/* Tabs */
.pg-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.pg-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e6e9ef;
  font-weight: 500;
  cursor: pointer;
}
.pg-tabs button.active {
  background: var(--pg-primary);
  color: #fff;
  border-color: transparent;
}

/* Form */
.pg-sheet-body form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Labels */
.pg-sheet-body label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* Inputs (Digits Original Style Restored) */
.pg-sheet-body input[type="text"],
.pg-sheet-body input[type="tel"],
.pg-sheet-body input[type="email"],
.pg-sheet-body input[type="password"],
.pg-sheet-body input[type="number"],
.pg-sheet-body .digits_input,
.pg-sheet-body .mobile_field {
  width: 100%;
  border: 1px solid #e2e5e9;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #f9fafc;
  transition: 0.25s;
}
.pg-sheet-body input:focus {
  border-color: var(--pg-secondary);
  box-shadow: 0 0 0 3px rgba(0,150,199,0.1);
}

/* Submit Button */
.pg-sheet-body .digits-submit,
.pg-sheet-body button[type="submit"],
.pg-sheet-body input[type="submit"] {
  width: 100%;
  padding: 12px 0;
  border-radius: 10px;
  background: linear-gradient(135deg,#0077b6,#0096c7);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}
.pg-sheet-body .digits-submit:hover {
  background: linear-gradient(135deg,#0096c7,#00b4d8);
}

/* OTP Button */
.pg-sheet-body .digits_login_otp {
  background: rgba(0,119,182,0.08);
  border: 1px solid rgba(0,119,182,0.25);
  color: #0077b6;
  border-radius: 10px;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.pg-sheet-body .digits_login_otp:hover {
  background: rgba(0,119,182,0.15);
}

/* Message */
.pg-sheet-body .digits-message {
  background: #e9f7fc;
  color: #0077b6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

/* OTP Code Input */
.pg-sheet-body input.digits_code {
  text-align: center;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: bold;
}

/* 🟦 گاتر سراسری – فقط برای کانتینرهای اصلی */
.pg-wrap,
.container,
.pg-container,
.pg-header-inner,
.pg-content,
.pg-footer-inner,
.woocommerce > .container,
.woocommerce-page > .container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* 📱 موبایل */
@media (max-width:768px) {
  .pg-wrap,
  .container,
  .pg-container,
  .pg-header-inner,
  .pg-content,
  .pg-footer-inner,
  .woocommerce > .container,
  .woocommerce-page > .container {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ===========================================
   🔵 PersianGem – Step Slider (Final Stable)
   Infinite – Smooth – No White Gap
=========================================== */

.pg-step-slider {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.pg-step-track {
    display: flex;
    align-items: center;
    gap: 16px;
    will-change: transform;
}

/* کارت‌ها */
.pg-step-slider .pg-product-card {
    flex: 0 0 auto;
    width: 120px;                /* موبایل */
    background: var(--pg-card);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    text-align: center;
    padding: 10px;
    transition: transform .25s ease;
}

.pg-step-slider .pg-product-card img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.pg-step-slider .pg-product-card h3 {
    font-size: 14px;
    margin-top: 8px;
    color: var(--pg-text);
}

/* دسکتاپ */
@media (min-width: 768px) {
    .pg-step-slider .pg-product-card {
        width: 150px;
    }
}
/* ============================
   🎯 PersianGem Step Slider – FIXED
   ============================ */

.pg-step-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
}

.pg-step-track {
  display: flex;
  align-items: center;
  gap: 16px;
  will-change: transform;
  transition: transform .45s ease;
}

/* کارت‌ها */
.pg-step-slider .pg-product-card {
  flex: 0 0 auto;        /* ⬅ مانع شکسته شدن فلکس */
  width: 130px;          /* ⬅ موبایل */
  background: var(--pg-card);
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}

.pg-step-slider .pg-product-card img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.pg-step-slider .pg-product-card h3 {
  font-size: 14px;
  margin-top: 8px;
  color: var(--pg-text);
}

/* دسکتاپ */
@media (min-width: 768px) {
  .pg-step-slider .pg-product-card {
    width: 150px;
  }
}
