.main-container {
  max-width: 1493px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  font-family: var(--main-font);
}


/* لایه تیره کل صفحه */
#login-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex; /* همیشه توی DOM هست */
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0; /* مخفی پیش‌فرض */
  pointer-events: none; /* کلیک‌ناپذیر وقتی بسته است */
  transition: opacity 0.35s ease;
}

/* وقتی باز است */
#login-popup-overlay.is-open {
  opacity: 1 !important;
  pointer-events: auto;
}

/* باکس داخلی مودال */
#login-popup-overlay .popup-box {
  background: #fff;
  max-width: 420px;
  width: 90%;
  border-radius: 8px;
  position: relative;

  /* شروع انیمیشن */
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* وقتی مودال باز است */
#login-popup-overlay.is-open .popup-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* دکمه بستن */
#login-popup-overlay .popup-close {
  position: absolute;
  top: -1px;
  right: 9px;
  border: none;
  background: transparent;
  font-size: 27px;
  cursor: pointer;
}
#login-popup-overlay .popup-close:hover {
color: red;
}
















/* ---------------------------------------------------------- */
/* --- Blog Page Layout (maghale.php) --- */
.blog-page{
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  font-family: var(--main-font);
}

/* titles */
.blog-page .section-title{
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 800;
  color: #111;
}

/* --- Top cards --- */
.blog-hero{
  margin-bottom: 24px;
}

.blog-hero-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.hero-card{
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  text-decoration: none;
  color: inherit;
}

.hero-card__thumb{
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #f2f2f2;
}

.hero-card__body{
  padding: 10px 12px 12px;
}

.hero-card__title{
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  color: #111;

  /* 2 lines clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card__meta{
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #7a7a7a;
}

/* --- Body layout: sidebar + content --- */
.blog-layout{
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.blog-sidebar{
  background: #f6f6f7;
  border-radius: 14px;
  padding: 14px;
}

.blog-content{
  min-width: 0;
}

/* widgets */
.widget{
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.widget + .widget{
  margin-top: 14px;
}

.widget-title{
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  color: #111;
}

/* categories list */
.cats-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.cats-list li{
  margin: 0;
  padding: 0;
}

.cats-list a{
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #222;
  font-size: 13px;
}

.cats-list a:hover{
  background: #f1f1f3;
}

/* latest list in sidebar */
.latest-list{
  display: grid;
  gap: 8px;
}

.latest-item{
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  background: #f7f7f9;
  text-decoration: none;
  color: #111;
}

.latest-item__title{
  font-size: 13px;
  line-height: 1.7;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Post rows list --- */
.post-row-list{
  display: grid;
  gap: 14px;
}

.post-row{
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.post-row__thumb{
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f2;
}

.post-row__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-row__body{
  min-width: 0;
}

.post-row__cats{
  margin: 0 0 6px;
  font-size: 12px;
  color: #2b70ff;
}

.post-row__cats a{
  color: inherit;
  text-decoration: none;
}

.post-row__title{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.8;
}

.post-row__title a{
  color: #111;
  text-decoration: none;
}

.post-row__excerpt{
  margin: 0 0 10px;
  color: #666;
  font-size: 13px;
  line-height: 1.9;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-row__meta{
  font-size: 12px;
  color: #8a8a8a;
}

/* --- Pagination --- */
.pagination{
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 13px;
}

.pagination .page-numbers.current{
  background: #2b70ff;
  color: #fff;
}

/* --- Responsive --- */
@media (max-width: 1100px){
  .blog-hero-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-layout{ grid-template-columns: 300px minmax(0, 1fr); }
  .post-row{ grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 820px){
  .blog-layout{ grid-template-columns: 1fr; }
  .blog-sidebar{ order: 2; }
  .blog-content{ order: 1; }
}

@media (max-width: 560px){
  .blog-hero-grid{ grid-template-columns: 1fr; }
  .post-row{ grid-template-columns: 1fr; }
  .post-row__thumb{ aspect-ratio: 16/9; }
}
.cats-list a.is-active{
  background:#2b70ff;
  color:#fff;
}


/* ====== Two dynamic banners (responsive) ======

/* layout */
.bazitopia-banners{
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.bazitopia-banner{
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;

  /* اگر contain فضای خالی داد، این رنگ دیده میشه */
  background: #0f172a;
}

/* کل تصویر همیشه کامل دیده میشه */
.bazitopia-banner img{
  width: 100%;
}

/* از 734.5px به پایین تک‌ستونه */
@media (max-width: 734.5px){
  .bazitopia-banners{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bazitopia-banner img{
    height: clamp(120px, 30vw, 200px);
  }
}
/* -------------------------------------------------------------product-info--------------------------------------------------------------------- */
/* بببببببببببببببببببببببببببببب */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

.product-info {
    font-family: var(--main-font);
    -webkit-font-feature-settings: "ss02";
    font-feature-settings: "ss02";
    background: #ffffff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 20px auto;
    /* text-align: center; */
    border: 1px solid var(--color-border-0);
    position: relative;
    overflow: hidden;
}

.product-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
/* ---------------------------------------------------------------------------------------------- */
.product-price {
    position: relative;
    margin-bottom: 20px;
    text-align: center;
}
.product-price .woocommerce-Price-amount .woocommerce-Price-currencySymbol{
      margin-right: 10px;
}
.my-currency {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-right: 6px;
    font-weight: 500;
}

.my-amount {
    font-size: 2em;
    font-weight: 600;
    color: var(--primary-color);
}

.product-info .old-price {
    text-decoration: line-through;
    color: #999;
    margin: 0 10px;
    font-size: 1.1em;
    font-weight: 400;
}

.discount-percent {
    position: relative;
    top: -18px;
    /* left: 0; */
    background: var(--accent-color);
    color: white;
    font-size: 0.95em;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
    /* transform: rotate(10deg); */
}

.product-content {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-info .single_add_to_cart_button {
  background-color: #0071df;
    align-items: center;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: .25rem;
    justify-content: center;
    min-height: 48px;
    padding: .25rem 1.5rem;
    position: relative;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    transition-duration: .1s;
}
.product-info .single_add_to_cart_button:hover{
  background-color: #0058b2;
}
/* =========================
   Recommended products block
   ========================= */

.my-related-swiper{ padding: 2px 2px 10px;}

/* عرض اسلاید ثابت؛ با slidesPerView:'auto' بهترین حالت */
.my-related-swiper .swiper-slide{ width: 200px; }
/* کل سکشن محصولات پیشنهادی */
.my-related{
  width: 100%;
  max-width: 1493px;
  margin: 0 auto;
  font-family: var(--main-font);
    -webkit-font-feature-settings: "ss02";
    font-feature-settings: "ss02";
}

/* کانتینر خود swiper باید بلاک و تمام‌عرض باشد */
.my-related .my-related-swiper,
.my-related .swiper{
  width: 100%;
  
  display: block;
}
.my-related .swiper img{
height: 280px;
border-radius: 15px;
}
/* بعضی قالب‌ها swiper را inline یا fit-content می‌کنند */
.my-related .swiper-wrapper{
  width: 100%;
}

/* اگر داخل ستون/فلکس هست، اجازه بده کش بیاد */
.my-related{
  flex: 0 0 100%;
}


/* -------------------------------------- دکمه تعداد محصول--------------------------------------------- */
.bt-qty-input::-webkit-outer-spin-button,
.bt-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bt-qty-input { -moz-appearance: textfield; }
/* Wrapper */
.btv-qty-wrap{
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(20,20,22,.98), rgba(10,10,12,.98));
  box-shadow:
    0 10px 30px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.06);
}

/* Number */
.btv-qty-input{
  font-family: var(--main-font);
      -webkit-font-feature-settings: "ss02";
    font-feature-settings: "ss02";
  width: 40px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #fff;              /* neon green */
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  line-height: 44px;
  outline: none;
  box-shadow: none;
  margin-right: 10px;
}

/* Hide browser spinners (keep only your chevrons) */
.btv-qty-input::-webkit-outer-spin-button,
.btv-qty-input::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.btv-qty-input{
  -moz-appearance: textfield;
}

/* Right controls column */
.btv-qty-controls{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  margin-left: 10px;
}

/* Each chevron button */
.btv-qty-btn{
  width: 37px;
  height: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.02);
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, border-color .12s ease, color .12s ease, background-color .12s ease;
}

.btv-qty-btn:hover{
  color: rgba(255,255,255,.95);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.04);
}

.btv-qty-btn:active{
  transform: translateY(1px);
}

/* Make svg crisp */
.btv-qty-btn svg{
  width: 18px;
  height: 18px;
  display: block;
}

/* Optional: focus ring if you use tabindex+role=button */
.btv-qty-btn:focus{
  outline: none;
}
.btv-qty-btn:focus-visible{
  box-shadow: 0 0 0 3px rgba(62,234,155,.25);
}

/* Disabled state (when readonly) */
.btv-qty-wrap [aria-disabled="true"]{
  opacity: .55;
  cursor: not-allowed;
}


/* فقط دکمه افزودن به سبد خرید */
.box-btn{
  display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 12px;
}
.woocommerce form.cart .my-btn.my-btn--cart{
  display: inline-flex;
  align-items: center;
  justify-content: center;
width: 100%;
  height: 58px;
  padding: 0 20px;
font-size: 15px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(20,20,22,.98), rgba(10,10,12,.98));

  color: rgba(255,255,255,.92);
  font-weight: 700;
  letter-spacing: .2px;

  box-shadow:
    0 12px 30px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.06);

  cursor: pointer;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;

  transition: transform .12s ease, border-color .12s ease, filter .12s ease, box-shadow .12s ease;
}

.woocommerce form.cart .my-btn.my-btn--cart:hover{
  border-color: rgba(62,234,155,.55);
  filter: brightness(1.06);
}

.woocommerce form.cart .my-btn.my-btn--cart:active{
  transform: translateY(1px);
}

.woocommerce form.cart .my-btn.my-btn--cart:focus{
  outline: none;
}

.woocommerce form.cart .my-btn.my-btn--cart:focus-visible{
  box-shadow:
    0 12px 30px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 3px rgba(62,234,155,.22);
}

/* حالت لودینگ/غیرفعال */
.woocommerce form.cart .my-btn.my-btn--cart:disabled,
.woocommerce form.cart .my-btn.my-btn--cart[disabled]{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}



/* ----------------------------------------------- */
/* Scope فقط برای همین بلاک */
#platform-fields-wrap{
  margin-top: 14px;
}

/* لیبل‌ها */
#platform-fields-wrap label{
  display: block;
  margin-bottom: 10px;
  /* color: rgba(255,255,255,.82); */
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

/* استایل یکسان برای input/select */
#platform-fields-wrap .woocommerce-input-wrapper input.input-text,
#platform-fields-wrap .woocommerce-input-wrapper select{
  width: 100%;
  min-height: 39px;
  padding: 0 14px;
  border-radius: 4px;
  /* border: 1px solid rgba(255,255,255,.18); */
  background-color: #f7f7f7;
  color: #000;
  outline: none;
  -webkit-appearance: none;
  appearance: none;

  transition: border-color .12s ease, filter .12s ease, box-shadow .12s ease;
  border: 1px solid #cfcfcf;
  font-size: 14px;
}
.platform-fields-block{
  margin-bottom: 17px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* placeholder برای input */
#platform-fields-wrap .woocommerce-input-wrapper input.input-text::placeholder{
  color: rgba(255,255,255,.45);
}

/* فوکوس */
#platform-fields-wrap .woocommerce-input-wrapper input.input-text:focus-visible,
#platform-fields-wrap .woocommerce-input-wrapper select:focus-visible{
  /* border-color: rgba(62,234,155,.55); */
}

/* استایل optionها (محدودیت: همه مرورگرها کامل پشتیبانی نمی‌کنند) */
#platform-fields-wrap select option{
  background: #fff;
  color: #000;
}

/* فاصله هر ردیف */
#platform-fields-wrap .form-row{
  margin: 0 0 2px 0;
}

/* فلش سفارشی برای select در platform fields */
#platform-fields-wrap .woocommerce-input-wrapper select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  padding-right: 44px;
  /* دو بک‌گراند همزمان: فلش + گرادیان */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-color: #f7f7f7; /* رنگ ثابت */
  background-repeat: no-repeat, no-repeat;
  background-position: calc(100% - 14px) 50%, 0 0;
  background-size: 18px 18px, auto;
  border: 1px solid #cfcfcf;
}


/* اگر روی ویندوز/Edge هنوز فلش پیش‌فرض موند */
#platform-fields-wrap .woocommerce-input-wrapper select::-ms-expand{ display:none; }




/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------- */


/* دکمه ویژگی های صفحه تک محصول */

/* چیدمان کنار هم */
.woocommerce div.quantity{
        display: flex;
    align-items: stretch;
    gap: 0;
    justify-content: center;
    background-color: rgb(245 245 245);
    width: fit-content;
    border: solid 2px rgb(245 245 245);
    border-radius: .5rem;
    overflow: hidden;
    transition-duration: .2s;
        border: 2px solid #cfcfcf;
}
.woocommerce div.quantity:hover{
border: solid 2px #000;
}
/* input عدد */
.woocommerce div.quantity .qty{
  /* width: 20px; */
    height: 44px;
    text-align: center;
    border-radius: 0;
    background: #fff;
    padding: 0 4px;
    font-size: 16px;
    background-color: rgb(245 245 245);
     field-sizing: content;
  min-width: 2ch;
  max-width: 30ch;
  font-family: var(--main-font);
    -webkit-font-feature-settings: "ss02";
    font-feature-settings: "ss02";
    color: #000;
}

/* دکمه‌ها */
.woocommerce div.quantity .qty_button{

    border: 0;
    background: rgb(245 245 245);
    color: rgb(139 139 139);
    font-size: 18px;
    line-height: 40px;
    border-radius: 0;
        display: flex;
    justify-content: center;
    align-items: center;
        padding: 0px 2px;
        cursor: pointer;
}
.woocommerce div.quantity .qty_button svg{
width: 16px;
  height: 16px;
}
/* اگر قالب‌ت hover عجیب می‌ده */
.woocommerce div.quantity .qty_button:hover{
  color: #000;
}


.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.woocommerce .quantity input.qty{
  -moz-appearance:textfield;
}

.single-product .my-qty-btn-wrap{
  display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 25px;
}


.single_add_to_cart_button{
  background-color: #0071df;
    align-items: center;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: .25rem;
    justify-content: center;
    min-height: 48px;
    padding: .25rem 1.5rem;
    position: relative;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}















/* ----------------------------------------------------------------------------------------------------- */

/* dropdown مخفی */
.single-product form.variations_form table.variations select{
  display:none;
}

/* باکس دکمه‌ها */
.single-product .my-variation-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content: flex-start;
}

.single-product .my-variation-buttons .my-var-radio{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.single-product .my-variation-buttons .my-var-btn{
  border:1px solid #cfcfcf;
  padding:8px 12px;
  border-radius:4px;
  background:#f7f7f7;
  cursor:pointer;
  user-select:none;
      font-size: 14px;
    font-weight: 600;
    color: var(--black);
}
.single-product .my-variation-buttons .my-var-btn:hover{
  border:1px solid #303030;
}
.single-product .my-variation-buttons .my-var-radio:checked + .my-var-btn{
  border-color: #0098fd;
    box-shadow: 0 0 0 2px rgba(30, 115, 190, .15);
    background-color: #0098fd;
    color: #fff;
}
.variations tbody{
  display: flex;
    flex-direction: column;
    gap: 20px;
}
.variations tr{
display: flex;
    flex-direction: column;
    justify-content: center;
}
.variations .label{
  text-align: right;
  margin-bottom: 10px;
}

.single-product .reset_variations{
  margin-top: 10px;
    display: inline-block;
    color: #ff4d4f;
    text-align: left;
    float: left;
    margin-left: 10px;
}
.single-product .reset_variations:hover{
  color: #000;
}


/* --------------------------------------------------------------- */
/* باکس کلی قیمت */
.product-info .product-price,
.product-info  .summary .price{
  display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
}

/* قیمت اصلی (خط خورده) */
.summary .price del,
.product-price del{
  color:#888;
  opacity:.9;
  font-size:14px;
}

/* قیمت تخفیف (قیمت نهایی) */
.summary .price ins,
.product-price ins{
  text-decoration:none;
  color:#111;
  font-size:20px;
  font-weight:700;
}
/* درصد تخفیف تنهایی */

.bz-sale-badge{
      background: #e11d48;
    color: #fff;
    font-weight: 700;
    padding: 6px 8px 5px;
    border-radius: 24px;
    line-height: 1;
    width: fit-content;
    font-size: 16px;
    position: absolute;
    top: 12px;
    left: 12px;
}

#myPriceBox ins {
  font-size: 30px;
}
#myPriceBox bdi {
  font-size: 30px;
}
