/* ============================================================================
 * theme-nexara.css — NetCore Pro v2.0 components
 * Product detail page (digikala/barghchi style), homepage sections,
 * reviews, Q&A, specs, catalog, carousel, modals, flash deals, banners.
 * Built on top of theme-barghchi(-v2).css variables (--bc-*).
 * ========================================================================== */

:root {
  --nx-accent:        #FF7A00;
  --nx-accent-dark:   #e96e00;
  --nx-accent-bg:     #FFF3E6;
  --nx-gold:          #F5A623;
  --nx-success:       #08A54A;
  --nx-danger:        #FF4C51;
}

/* generic buttons used by new components */
body:not([data-admin]) .bc-btn--outline {
  background: #fff !important;
  border: 1.5px solid var(--bc-primary) !important;
  color: var(--bc-primary) !important;
}
body:not([data-admin]) .bc-btn--outline:hover { background: var(--bc-primary-light) !important; }
body:not([data-admin]) .bc-btn--block { width: 100%; display: flex; justify-content: center; }
body:not([data-admin]) .bc-btn--lg { padding: 13px 22px !important; font-size: 15px !important; }

/* ===== stars ===== */
.bc-stars { color: var(--nx-gold); display: inline-flex; gap: 2px; font-size: 15px; }
.bc-stars--sm { font-size: 12px; }
.bc-stars .far { color: var(--bc-text-300); }

/* ===== rating bars (sub-criteria) ===== */
.bc-ratebar { display: grid; grid-template-columns: 70px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 8px; }
.bc-ratebar-label { font-size: 12.5px; color: var(--bc-text-700); }
.bc-ratebar-track { height: 7px; border-radius: 6px; background: var(--bc-text-300); overflow: hidden; }
.bc-ratebar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--bc-primary), #5aa6e6); border-radius: 6px; }
.bc-ratebar-val { font-size: 12px; font-weight: 700; color: var(--bc-text-900); text-align: left; }

/* ============================================================ PRODUCT DETAIL */
.bc-pd-top {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  background: var(--bc-surface); border: 1px solid var(--bc-text-300);
  border-radius: var(--bc-radius-lg); padding: 20px; margin-bottom: 18px;
  box-shadow: var(--bc-shadow-1);
}
@media (min-width: 768px) { .bc-pd-top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .bc-pd-top { grid-template-columns: 360px 1fr 280px; } }

/* gallery */
.bc-pd-gallery { position: relative; }
.bc-pd-off-badge {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  background: var(--nx-danger); color: #fff; border-radius: 10px;
  padding: 6px 10px; font-weight: 800; font-size: 16px; line-height: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bc-pd-off-badge small { font-size: 9px; font-weight: 600; }
.bc-pd-main-img {
  border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius);
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: #fff; overflow: hidden;
}
.bc-pd-main-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bc-pd-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.bc-pd-thumb {
  width: 60px; height: 60px; border: 1.5px solid var(--bc-text-300); border-radius: 10px;
  background: #fff; padding: 4px; cursor: pointer; transition: .15s;
}
.bc-pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.bc-pd-thumb.is-active { border-color: var(--bc-primary); box-shadow: 0 0 0 2px var(--bc-primary-light); }
.bc-pd-share { display: flex; gap: 8px; margin-top: 14px; }
.bc-pd-iconbtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bc-primary-bg); border: none; border-radius: 10px; padding: 8px;
  color: var(--bc-text-700); font-size: 11px; cursor: pointer; transition: .15s;
}
.bc-pd-iconbtn i { font-size: 16px; }
.bc-pd-iconbtn:hover { color: var(--bc-primary); }

/* info */
.bc-pd-brandrow { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.bc-pd-brand { color: var(--bc-primary); font-weight: 700; font-size: 13px; }
.bc-pd-model { color: var(--bc-text-500); font-size: 12px; font-family: monospace; }
.bc-pd-title { font-size: 20px; font-weight: 800; color: var(--bc-text-900); line-height: 1.7; margin: 0 0 12px; }
.bc-pd-ratingrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--bc-text-700); margin-bottom: 14px; }
.bc-pd-ratingrow strong { color: var(--bc-text-900); }
.bc-pd-reviewlink { color: var(--bc-primary); }
.bc-pd-sep { color: var(--bc-text-300); }
.bc-pd-highlight {
  background: var(--nx-accent-bg); color: var(--nx-accent-dark); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.bc-pd-features { border-top: 1px dashed var(--bc-text-300); padding-top: 14px; }
.bc-pd-features-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--bc-text-900); }
.bc-pd-features ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-pd-features li { font-size: 13px; color: var(--bc-text-700); display: flex; gap: 8px; align-items: flex-start; }
.bc-pd-features li i { color: var(--nx-success); margin-top: 3px; font-size: 11px; }
.bc-pd-features-more { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; color: var(--bc-primary); font-size: 13px; font-weight: 600; }
.bc-pd-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; border-top: 1px dashed var(--bc-text-300); padding-top: 14px; }
.bc-pd-trust-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--bc-text-700); }
.bc-pd-trust-item i { color: var(--bc-primary); font-size: 16px; }

/* ===== Buy box — بازطراحی حرفه‌ای (مشکل ۳): تک‌کارت تخت سفید با divider خطی ===== */
.bc-pd-buy {
  background: #fff;
  border: 1px solid var(--bc-text-200, #e6e8ef);
  border-radius: 16px;
  padding: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
}
/* هر بخش داخل کارت یک ردیف با divider خطی نازک */
.bc-pd-buy > * { padding: 16px; border-bottom: 1px solid var(--bc-text-100, #f0f1f6); }
.bc-pd-buy > *:last-child { border-bottom: 0; }

/* فروشنده */
.bc-pd-buy-seller { display: flex; align-items: center; gap: 12px; }
.bc-pd-buy-seller-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bc-primary-light, #f1f9ff); color: var(--bc-primary);
  font-size: 17px;
}
.bc-pd-buy-seller-meta { display: flex; flex-direction: column; gap: 3px; }
.bc-pd-buy-seller-name { font-size: 13px; font-weight: 700; color: var(--bc-text-900); }
.bc-pd-buy-seller-name strong { color: var(--bc-primary); }
.bc-pd-buy-seller-badge { font-size: 11.5px; color: var(--nx-success); display: inline-flex; align-items: center; gap: 5px; }

/* قیمت */
.bc-pd-buy-price { display: flex; flex-direction: column; gap: 6px; }
.bc-pd-buy-off { display: flex; align-items: center; gap: 9px; }
.bc-pd-buy-offpct {
  background: var(--nx-danger); color: #fff; border-radius: 9px;
  padding: 4px 10px; font-size: 14px; font-weight: 800; line-height: 1;
  display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 2px 6px rgba(220,38,38,.28);
}
.bc-pd-buy-offpct small { font-size: 10px; font-weight: 700; }
.bc-pd-buy-old { color: var(--bc-text-500); text-decoration: line-through; font-size: 14px; }
.bc-pd-buy-now { font-size: 28px; font-weight: 900; color: var(--bc-text-900); display: flex; align-items: baseline; gap: 7px; letter-spacing: -.3px; }
.bc-pd-buy-amount { line-height: 1.05; }
.bc-pd-buy-unit { font-size: 13px; font-weight: 600; color: var(--bc-text-500); }

/* وضعیت موجودی */
.bc-pd-buy-stock { display: flex; }

/* تعداد */
.bc-pd-buy-qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--bc-text-700); }
.bc-pd-buy-qty-label { font-weight: 600; }

/* علاقه‌مندی */
.bc-pd-buy-wish {
  background: none; border: none; color: var(--bc-text-700); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 14px 16px; width: 100%;
  transition: color .15s ease;
}
.bc-pd-buy-wish:hover { color: var(--nx-danger); }
.bc-pd-buy-wish.is-on, .bc-pd-buy-wish.is-on i { color: var(--nx-danger); }

/* دکمه افزودن به سبد — solid بدون گرادیان */
.bc-pd-buy-add {
  font-size: 15px; font-weight: 800; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(var(--bc-primary-rgb, 42,117,187), .28);
}

/* selector تعداد — pill تمیز داخل buy-box */
.bc-pd-buy-qty .bc-qty {
  border: 1px solid var(--bc-text-200, #e6e8ef);
  border-radius: 999px;
  background: var(--bc-base-bg, #f7f8fb);
  padding: 3px;
  gap: 2px;
}
.bc-pd-buy-qty .bc-qty button {
  width: 34px; height: 34px; border-radius: 999px;
  color: var(--bc-primary); font-size: 12px;
}
.bc-pd-buy-qty .bc-qty button:hover { background: var(--bc-primary); color: #fff; }
.bc-pd-buy-qty .bc-qty input { width: 42px; font-size: 14px; }
/* پنهان‌سازی فلش‌های number input */
.bc-pd-buy-qty .bc-qty input::-webkit-outer-spin-button,
.bc-pd-buy-qty .bc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bc-pd-buy-qty .bc-qty input { -moz-appearance: textfield; appearance: textfield; }

/* sticky tabs */
.bc-pd-tabs-wrap { position: sticky; top: 56px; z-index: 20; background: var(--bc-base-bg); margin-bottom: 16px; }
.bc-pd-tabs {
  display: flex; gap: 4px; overflow-x: auto; background: var(--bc-surface);
  border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius); padding: 6px;
  box-shadow: var(--bc-shadow-1);
}
.bc-pd-tabs a {
  white-space: nowrap; padding: 9px 16px; border-radius: 8px; font-size: 13px;
  font-weight: 600; color: var(--bc-text-700); transition: .15s;
}
.bc-pd-tabs a.is-active { background: var(--bc-primary); color: #fff !important; }

/* body layout */
.bc-pd-body { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 1024px) { .bc-pd-body { grid-template-columns: 1fr 300px; } }
.bc-pd-block {
  background: var(--bc-surface); border: 1px solid var(--bc-text-300);
  border-radius: var(--bc-radius-lg); padding: 20px; margin-bottom: 18px; scroll-margin-top: 120px;
}
.bc-pd-block-title { font-size: 17px; font-weight: 800; color: var(--bc-text-900); margin: 0 0 16px; }
.bc-pd-block-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.bc-pd-block-head .bc-pd-block-title { margin: 0; }
.bc-pd-desc { line-height: 2.1; color: var(--bc-text-700); font-size: 14px; }
.bc-pd-desc p { margin: 0 0 12px; }

/* catalog */
.bc-catalog-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; margin-bottom: 18px; }
.bc-catalog-card {
  display: flex; align-items: center; gap: 12px; background: var(--bc-primary-bg);
  border: 1px solid var(--bc-text-300); border-radius: 10px; padding: 12px; transition: .15s;
}
.bc-catalog-card:hover { border-color: var(--bc-primary); }
.bc-catalog-ico { width: 42px; height: 42px; border-radius: 8px; background: var(--nx-danger); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.bc-catalog-meta { flex: 1; min-width: 0; }
.bc-catalog-meta strong { display: block; font-size: 13px; color: var(--bc-text-900); }
.bc-catalog-meta small { font-size: 11px; color: var(--bc-text-500); }
.bc-catalog-dl { color: var(--bc-primary); }

/* specs */
.bc-spec-group { margin-bottom: 18px; }
.bc-spec-group-title { font-weight: 700; font-size: 14px; color: var(--bc-primary); background: var(--bc-primary-bg); padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; }
.bc-spec-table { width: 100%; border-collapse: collapse; }
.bc-spec-table th, .bc-spec-table td { text-align: right; padding: 11px 12px; font-size: 13px; border-bottom: 1px solid var(--bc-text-300); vertical-align: top; }
.bc-spec-table th { width: 38%; color: var(--bc-text-700); font-weight: 600; }
.bc-spec-table td { color: var(--bc-text-900); font-weight: 500; }
.bc-spec-table tr:last-child th, .bc-spec-table tr:last-child td { border-bottom: none; }

/* review summary */
.bc-review-summary { display: grid; grid-template-columns: 1fr; gap: 18px; background: var(--bc-primary-bg); border-radius: var(--bc-radius); padding: 18px; margin-bottom: 20px; }
@media (min-width: 700px) { .bc-review-summary { grid-template-columns: 150px 1fr 1fr; } }
.bc-review-score { text-align: center; }
.bc-review-score-num { font-size: 40px; font-weight: 900; color: var(--bc-text-900); line-height: 1; }
.bc-review-score-count { font-size: 12px; color: var(--bc-text-700); margin-top: 6px; }
.bc-review-barrow { display: grid; grid-template-columns: 16px 14px 1fr 28px; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; }
.bc-review-barrow i { color: var(--nx-gold); font-size: 11px; }
.bc-review-bar-track { height: 7px; background: var(--bc-text-300); border-radius: 6px; overflow: hidden; }
.bc-review-bar-fill { display: block; height: 100%; background: var(--nx-gold); border-radius: 6px; }
.bc-review-bar-cnt { text-align: left; color: var(--bc-text-700); }

/* review cards */
.bc-review-list { display: flex; flex-direction: column; gap: 14px; }
.bc-review-card { display: grid; grid-template-columns: 1fr; gap: 14px; border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius); padding: 16px; }
@media (min-width: 600px) { .bc-review-card { grid-template-columns: 120px 1fr; } }
.bc-review-card-side { text-align: center; }
.bc-review-ava { width: 44px; height: 44px; border-radius: 50%; background: var(--bc-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.bc-review-user { font-size: 13px; font-weight: 700; margin-top: 8px; color: var(--bc-text-900); }
.bc-review-recommend { font-size: 11px; color: var(--nx-success); margin-top: 6px; }
.bc-review-date { font-size: 11px; color: var(--bc-text-500); margin-top: 4px; }
.bc-review-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.bc-review-card-title { font-size: 14px; font-weight: 700; margin: 0; color: var(--bc-text-900); }
.bc-review-card-text { font-size: 13.5px; line-height: 2; color: var(--bc-text-700); margin: 0 0 12px; }
.bc-review-proscons { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
@media (min-width: 500px) { .bc-review-proscons { grid-template-columns: 1fr 1fr; } }
.bc-review-pros, .bc-review-cons { border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
.bc-review-pros { background: var(--bc-success-bg); }
.bc-review-cons { background: var(--bc-error-bg); }
.bc-review-pros strong { color: var(--nx-success); display: block; margin-bottom: 6px; }
.bc-review-cons strong { color: var(--nx-danger); display: block; margin-bottom: 6px; }
.bc-review-pros ul, .bc-review-cons ul { margin: 0; padding-right: 16px; color: var(--bc-text-700); display: grid; gap: 3px; }
.bc-review-card-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--bc-text-300); padding-top: 10px; font-size: 12px; color: var(--bc-text-700); }
.bc-review-helpful { background: none; border: 1px solid var(--bc-text-300); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; color: var(--bc-text-700); transition: .15s; }
.bc-review-helpful:hover, .bc-review-helpful.is-on { border-color: var(--bc-primary); color: var(--bc-primary); }

/* empty box */
.bc-empty-box { text-align: center; padding: 30px; color: var(--bc-text-500); }
.bc-empty-box i { font-size: 36px; margin-bottom: 12px; display: block; color: var(--bc-text-300); }
.bc-empty-box p { font-size: 13px; }

/* Q&A */
.bc-qa-list { display: flex; flex-direction: column; gap: 14px; }
.bc-qa-item { border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius); padding: 16px; }
.bc-qa-q, .bc-qa-a { display: flex; gap: 10px; align-items: flex-start; }
.bc-qa-a { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--bc-text-300); padding-right: 12px; }
.bc-qa-badge { flex-shrink: 0; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 4px 9px; }
.bc-qa-badge--q { background: var(--bc-primary-bg); color: var(--bc-primary); }
.bc-qa-badge--a { background: var(--bc-success-bg); color: var(--nx-success); }
.bc-qa-a--seller .bc-qa-badge--a { background: var(--nx-accent-bg); color: var(--nx-accent-dark); }
.bc-qa-q-body p, .bc-qa-a-body p { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--bc-text-900); }
.bc-qa-a-body p { color: var(--bc-text-700); }
.bc-qa-meta { font-size: 11px; color: var(--bc-text-500); margin-top: 6px; }
.bc-qa-noanswer { margin-top: 10px; font-size: 12px; color: var(--bc-text-500); }

/* sidebar */
.bc-pd-body-side { display: flex; flex-direction: column; gap: 16px; }
.bc-expert-card { background: linear-gradient(135deg, var(--bc-primary), var(--bc-primary-dark)); color: #fff; border-radius: var(--bc-radius-lg); padding: 20px; text-align: center; position: sticky; top: 120px; }
.bc-expert-ava { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 10px; }
.bc-expert-title { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.bc-expert-card p { font-size: 12.5px; opacity: .9; line-height: 1.9; margin-bottom: 14px; }
.bc-expert-card .bc-btn { margin-bottom: 8px; }
.bc-expert-card .bc-btn--primary { background: #fff !important; color: var(--bc-primary) !important; }
.bc-expert-card .bc-btn--ghost { background: rgba(255,255,255,.14) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.3) !important; }
.bc-side-card { background: var(--bc-surface); border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius); padding: 16px; }
.bc-side-card-title { font-weight: 700; font-size: 14px; margin-bottom: 12px; color: var(--bc-text-900); }
.bc-side-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-side-features li { font-size: 12.5px; color: var(--bc-text-700); display: flex; gap: 8px; }
.bc-side-features li i { color: var(--nx-success); margin-top: 3px; font-size: 10px; }

/* carousel */
.bc-carousel { overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.bc-carousel-track { display: flex; gap: 14px; }
.bc-carousel-item { width: 220px; flex-shrink: 0; }
.bc-carousel-item .bc-product-card { width: 100%; }

/* mobile sticky buy bar */
.bc-pd-mobilebar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--bc-surface); border-top: 1px solid var(--bc-text-300);
  box-shadow: 0 -4px 16px rgba(131,139,180,.18);
  display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
}
.bc-pd-mobilebar-price { display: flex; align-items: baseline; gap: 6px; font-size: 18px; font-weight: 800; color: var(--bc-text-900); }
.bc-pd-mobilebar-price small { font-size: 11px; font-weight: 600; color: var(--bc-text-700); }
.bc-pd-mobilebar-old { font-size: 12px; text-decoration: line-through; color: var(--bc-text-500); font-weight: 500; }
.bc-pd-mobilebar .bc-btn { flex-shrink: 0; }
@media (max-width: 767px) {
  .bc-pd-mobilebar { display: flex; }
  body:not([data-admin]) { padding-bottom: 70px; }
  .bc-pd-buy { display: none; }
  .bc-pd-tabs-wrap { top: 0; }
}

/* ===== modals ===== */
.bc-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.bc-modal.is-open { display: block; }
.bc-modal-backdrop { position: absolute; inset: 0; background: rgba(43,54,116,.45); backdrop-filter: blur(2px); }
.bc-modal-box {
  position: relative; max-width: 600px; margin: 5vh auto; background: var(--bc-surface);
  border-radius: var(--bc-radius-lg); max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--bc-shadow-md); animation: nxModalIn .2s ease;
}
@keyframes nxModalIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.bc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--bc-text-300); }
.bc-modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--bc-text-900); }
.bc-modal-close { background: none; border: none; font-size: 18px; color: var(--bc-text-500); cursor: pointer; }
.bc-modal-body { padding: 20px; overflow-y: auto; }
.bc-modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--bc-text-300); }
.bc-field { margin-bottom: 14px; }
.bc-field label { display: block; font-size: 13px; font-weight: 600; color: var(--bc-text-900); margin-bottom: 6px; }
.bc-field--inline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bc-field--inline label { margin-bottom: 0; }
.bc-rate-grid { display: grid; grid-template-columns: 1fr; gap: 4px; margin-bottom: 8px; }
@media (min-width: 500px) { .bc-rate-grid { grid-template-columns: 1fr 1fr; gap: 8px 18px; } }
.bc-rate-input { display: inline-flex; gap: 4px; font-size: 22px; color: var(--nx-gold); cursor: pointer; }
.bc-rate-input--sm { font-size: 16px; }
.bc-rate-input .far { color: var(--bc-text-300); }
.bc-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bc-text-700); cursor: pointer; }

/* ============================================================ HOMEPAGE v2 */
/* =========================================================================
   BANNER SIZING SYSTEM (v2.3)
   ------------------------------------------------------------------------
   هدف: اندازهٔ بنر «وابسته به تصویر آپلودی ادمین» باشد، اما هرگز چیدمان را
   خراب نکند و از قاب بیرون نزند. به‌جای نسبت کاملاً ثابت (که تصویر را برش
   شدید می‌داد) از یک «قاب منطقی» با اندازهٔ پیشنهادی + حداقل/حداکثر استفاده
   می‌کنیم و تصویر با object-fit:cover داخل آن می‌نشیند.

   متغیرهای قابل تنظیم:
     --nx-hero-h     : ارتفاع پیشنهادی هیرو (clamp بین حداقل و حداکثر)
     --nx-promo-ar   : نسبت پیشنهادی بنرهای میانی
     --nx-strip-h    : ارتفاع بنر نواری
   ========================================================================= */
:root {
  /* اندازهٔ بنر «وابسته به تصویر آپلودی» است؛ ما فقط یک قاب با اندازهٔ
     پیشنهادی + حداقل/حداکثر تعریف می‌کنیم و تصویر با object-fit:contain
     به‌صورت کامل داخل آن نمایش داده می‌شود تا هیچ بخشی برش نخورد یا از قاب
     بیرون نزند (دلیل اصلی باگ قبلی: cover لبه‌ها و متن بنر را برش می‌داد). */
  /* هیرو: موبایل ~190px، دسکتاپ ~360px، حداقل 180 حداکثر 420 */
  --nx-hero-h: clamp(180px, 30vw, 360px);
  --nx-hero-h-min: 180px;
  --nx-hero-h-max: 420px;
  /* بنر میانی: نسبت پیشنهادی 3:1، حداقل 120 حداکثر 240 */
  --nx-promo-ar: 3 / 1;
  --nx-promo-h-min: 120px;
  --nx-promo-h-max: 240px;
  /* بنر نواری: کوتاه و پهن */
  --nx-strip-h: clamp(110px, 16vw, 180px);
  --nx-strip-h-min: 100px;
  --nx-strip-h-max: 200px;
  /* رنگ پس‌زمینهٔ قاب بنر (هماهنگ با تم ایندیگو؛ با object-fit:cover معمولاً دیده نمی‌شود) */
  --nx-banner-bg: #1e1b4b;
}

/* universal media safeguard — هیچ تصویری از قاب خود بیرون نمی‌زند */
.nx-hero img, .nx-promo img, .nx-flash-card img, .nx-hero-side img,
.nx-hero-slide img { max-width: 100%; }

/* hero slider */
.nx-hero { margin-bottom: 24px; max-width: 100%; }
.nx-hero-slider { position: relative; border-radius: var(--bc-radius-xl); overflow: hidden; box-shadow: var(--bc-shadow-1); width: 100%; }
.nx-hero-slides { display: flex; flex-direction: row; flex-wrap: nowrap; transition: transform .5s ease; width: 100%; will-change: transform; }
.nx-hero-slide { min-width: 100%; max-width: 100%; flex: 0 0 100%; position: relative; }
.nx-hero-slide a { display: block; width: 100%; height: 100%; }
/* قاب هیرو: تصویر کل قاب را پر می‌کند (cover) تا هیچ نوار خالی سورمه‌ای
   دیده نشود. SVGها با preserveAspectRatio=slice بازطراحی شده‌اند تا محتوای
   مرکزی همیشه امن بماند. */
.nx-hero-slide { background: var(--nx-banner-bg); }
.nx-hero-slide img {
  width: 100%;
  height: var(--nx-hero-h);
  min-height: var(--nx-hero-h-min);
  max-height: var(--nx-hero-h-max);
  display: block;
  object-fit: cover;
  object-position: center;
}
.nx-hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.nx-hero-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0; }
.nx-hero-dot.is-active { background: #fff; width: 22px; border-radius: 6px; }
.nx-hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.85); border: none; color: var(--bc-text-900); cursor: pointer; z-index: 3; display: none; align-items: center; justify-content: center; }
@media (min-width: 768px) { .nx-hero-arrow { display: flex; } }
.nx-hero-arrow--prev { right: 12px; }
.nx-hero-arrow--next { left: 12px; }
.nx-hero-side { display: none; }
@media (min-width: 992px) {
  /* در دسکتاپ ارتفاع هیرو و ساید‌بار را برابر و قطعی نگه می‌داریم تا ساید‌بار
     هرگز اسلایدر را از قاب خارج نکند. ارتفاع = همان clamp هیرو. */
  .nx-hero { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 16px; align-items: stretch; }
  .nx-hero-slider { height: var(--nx-hero-h); max-height: var(--nx-hero-h-max); min-width: 0; }
  .nx-hero-slides { height: 100%; align-items: stretch; }
  .nx-hero-slide { height: 100%; background: var(--nx-banner-bg); position: relative; }
  .nx-hero-slide a { height: 100%; position: relative; }
  /* تصویر را با position مطلق وادار می‌کنیم کل اسلاید را پر کند تا هیچ
     شکافی (نوار سورمه‌ای) در پایین/بالای اسلایدر باقی نماند. */
  .nx-hero-slide img {
    position: absolute; inset: 0;
    height: 100% !important; width: 100% !important;
    min-height: 0 !important; max-height: none !important;
    object-fit: cover; display: block;
  }
  .nx-hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-width: 0; height: var(--nx-hero-h); max-height: var(--nx-hero-h-max); }
  .nx-hero-side a { border-radius: var(--bc-radius-lg); overflow: hidden; display: block; min-height: 0; background: var(--nx-banner-bg); }
  .nx-hero-side img { width: 100%; height: 100%; max-height: none; object-fit: cover; display: block; }
}

/* category grid */
.nx-cats { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media (min-width: 600px) { .nx-cats { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 992px) { .nx-cats { grid-template-columns: repeat(8,1fr); } }
.nx-cat {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--bc-surface); border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius);
  padding: 16px 8px; transition: .15s;
}
.nx-cat:hover { transform: translateY(-3px); box-shadow: var(--bc-shadow-2); border-color: var(--bc-primary); }
.nx-cat-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--bc-primary-bg); color: var(--bc-primary); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.nx-cat-name { font-size: 12.5px; font-weight: 600; color: var(--bc-text-900); }

/* flash deals */
.nx-flash { background: linear-gradient(135deg, #FF512F, #DD2476); border-radius: var(--bc-radius-xl); padding: 18px; margin-bottom: 24px; }
.nx-flash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.nx-flash-title { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; }
.nx-flash-title i { font-size: 22px; color: #FFD54A; }
/* Countdown timer is always read left→right (HH:MM:SS) even inside an RTL page.
   Forcing direction:ltr keeps the hours cell on the left and seconds on the right,
   matching how a clock is read, and stops the digits jumping to the wrong side. */
.nx-flash-timer { display: inline-flex; gap: 6px; align-items: center; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.nx-flash-timecell { background: rgba(0,0,0,.25); color: #fff; border-radius: 8px; padding: 5px 9px; font-weight: 800; font-size: 15px; min-width: 34px; text-align: center; direction: ltr; unicode-bidi: isolate; }
.nx-flash-colon { color: #fff; font-weight: 800; }
.nx-flash-track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.nx-flash-card { min-width: 170px; width: 170px; flex-shrink: 0; background: #fff; border-radius: var(--bc-radius); padding: 12px; display: flex; flex-direction: column; }
.nx-flash-card img { width: 100%; aspect-ratio: 1/1; object-fit: contain; margin-bottom: 8px; }
.nx-flash-card-name { font-size: 12.5px; color: var(--bc-text-900); line-height: 1.6; height: 40px; overflow: hidden; margin-bottom: 8px; }
.nx-flash-card-price { display: flex; align-items: center; gap: 6px; }
.nx-flash-off { background: var(--nx-danger); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.nx-flash-now { font-weight: 800; color: var(--bc-text-900); font-size: 14px; }
.nx-flash-old { text-decoration: line-through; color: var(--bc-text-500); font-size: 11px; }
.nx-flash-progress { height: 6px; border-radius: 6px; background: var(--bc-text-300); overflow: hidden; margin-top: 8px; }
.nx-flash-progress span { display: block; height: 100%; background: linear-gradient(90deg, #FF512F, #DD2476); }
.nx-flash-sold { font-size: 10.5px; color: var(--bc-text-500); margin-top: 4px; }

/* promo mid banners */
.nx-promos { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 24px; }
@media (min-width: 700px) { .nx-promos { grid-template-columns: 1fr 1fr; } }
.nx-promo { border-radius: var(--bc-radius-lg); overflow: hidden; display: block; max-width: 100%; line-height: 0; background: var(--nx-banner-bg); }
/* قاب با نسبت پیشنهادی + حداقل/حداکثر ارتفاع؛ تصویر کل قاب را پر می‌کند
   (cover) تا هیچ نوار خالی دیده نشود. محتوای مرکزی SVGها امن طراحی شده. */
.nx-promo img {
  width: 100%; max-width: 100%; display: block;
  aspect-ratio: var(--nx-promo-ar);
  min-height: var(--nx-promo-h-min);
  max-height: var(--nx-promo-h-max);
  object-fit: cover; object-position: center;
}
/* بنر نواری (strip) معمولاً پهن‌تر و کوتاه‌تر است */
.nx-promo--strip img {
  aspect-ratio: auto;
  height: var(--nx-strip-h);
  min-height: var(--nx-strip-h-min);
  max-height: var(--nx-strip-h-max);
}

/* section tab heads (best/discount/special) */
.nx-tabsec { background: var(--bc-surface); border: 1px solid var(--bc-text-300); border-radius: var(--bc-radius-lg); padding: 18px; margin-bottom: 24px; }
.nx-tabsec-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.nx-tabsec-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; color: var(--bc-text-900); }
.nx-tabsec-title i { color: var(--nx-accent); }
.nx-tabsec-more { color: var(--bc-primary); font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

/* ============================================================ FLASH DEAL on product detail */
.bc-pd-flash-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(135deg, #FF512F, #DD2476);
  color: #fff; padding: 12px 16px; margin: 0;
}
.bc-pd-flash-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; }
.bc-pd-flash-label i { color: #FFD54A; }
.bc-pd-flash-timer { display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,.22); border-radius: 8px; padding: 5px 10px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.bc-pd-buy-save { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #16a34a; background: #f0fdf4; border-radius: 8px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.bc-pd-buy-save i { color: #16a34a; }
.bc-pd-flash-left { margin: 0; font-size: 12.5px; font-weight: 700; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; }
.bc-pd-flash-left i { color: #f97316; }

/* product-card rating row */
.bc-product-rating { display: flex; align-items: center; gap: 5px; margin: 4px 0; font-size: 11.5px; color: var(--bc-text-700); }

/* ============================================================ MODERN POLISH (additive) */
/* smoother, springier hovers everywhere */
.bc-product-card, .nx-cat, .nx-flash-card, .nx-promo, .nx-tabsec {
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease, border-color .18s ease;
}
.bc-product-card:hover { transform: translateY(-4px); box-shadow: var(--bc-shadow-md); }
.nx-flash-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.16); }
.nx-promo:hover { transform: translateY(-2px); box-shadow: var(--bc-shadow-2); }
.nx-promo img { transition: transform .4s ease; }
.nx-promo:hover img { transform: scale(1.03); }

/* refined flash badge with subtle pulse */
.bc-product-badge--off { box-shadow: 0 2px 8px rgba(221,36,118,.25); }
@keyframes nxPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.bc-product-badge--off i.fa-bolt { animation: nxPulse 1.4s ease-in-out infinite; display: inline-block; }

/* hero arrows: glassy modern look */
.nx-hero-arrow { backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgba(0,0,0,.18); transition: background .15s ease, transform .15s ease; }
.nx-hero-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }

/* section titles get a subtle accent underline */
.nx-tabsec-title::before {
  content: ''; width: 4px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, var(--bc-primary), #DD2476); display: inline-block; margin-left: 2px;
}

/* buttons: gentle press feedback */
.bc-btn { transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
.bc-btn:active { transform: translateY(1px); }
.bc-btn--primary:hover { box-shadow: 0 6px 18px rgba(42,117,187,.3); }

/* category icon hover glow */
.nx-cat:hover .nx-cat-icon { transform: scale(1.08); box-shadow: 0 6px 16px rgba(42,117,187,.22); transition: transform .18s ease, box-shadow .18s ease; }

/* smooth image loading */
img { background-color: #f6f7fb; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bc-product-card, .nx-cat, .nx-flash-card, .nx-promo, .nx-promo img,
  .bc-product-badge--off i.fa-bolt, .bc-btn, .nx-hero-arrow { transition: none !important; animation: none !important; }
}
