/**
 * BarghPro Vendor Store - Dedicated Stylesheet
 * 100% RTL, Mobile-First, Namespace-Protected
 * Version: 1.0.0
 */

/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
.barghpro-vendor-store-wrap {
  --bp-font: 'Peyda', 'IRANSans', 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bp-primary: #0284c7;
  --bp-primary-hover: #0369a1;
  --bp-primary-light: #e0f2fe;
  --bp-success: #10b981;
  --bp-success-light: #ecfdf5;
  --bp-danger: #ef4444;
  --bp-danger-light: #fef2f2;
  --bp-warning: #f59e0b;
  --bp-warning-light: #fffbeb;
  --bp-bg: #f8fafc;
  --bp-card-bg: #ffffff;
  --bp-text-main: #0f172a;
  --bp-text-muted: #64748b;
  --bp-text-light: #94a3b8;
  --bp-border: #e2e8f0;
  --bp-border-light: #f1f5f9;
  --bp-radius-sm: 8px;
  --bp-radius-md: 12px;
  --bp-radius-lg: 16px;
  --bp-radius-full: 9999px;
  --bp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --bp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --bp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --bp-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.barghpro-vendor-store {
  font-family: var(--bp-font);
  direction: rtl;
  text-align: right;
  color: var(--bp-text-main);
  box-sizing: border-box;
}

.barghpro-vendor-store * {
  box-sizing: border-box;
}

/* ==========================================================================
   Header Section (Mobile First)
   ========================================================================== */
.barghpro-vendor-store .bp-store-header {
  background: var(--bp-card-bg);
  border-radius: var(--bp-radius-lg);
  border: 1px solid var(--bp-border);
  overflow: hidden;
  box-shadow: var(--bp-shadow-sm);
  margin-bottom: 1.5rem;
  position: relative;
}

.barghpro-vendor-store .bp-store-banner {
  position: relative;
  width: 100%;
  height: 140px;
  background-color: var(--bp-primary-light);
  overflow: hidden;
}

.barghpro-vendor-store .bp-store-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.barghpro-vendor-store .bp-store-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5) 100%);
}

.barghpro-vendor-store .bp-store-header-content {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
}

.barghpro-vendor-store .bp-store-header.has-banner .bp-store-avatar-wrap {
  margin-top: -50px;
}

.barghpro-vendor-store .bp-store-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: var(--bp-radius-full);
  border: 4px solid #ffffff;
  background: #ffffff;
  box-shadow: var(--bp-shadow-md);
  flex-shrink: 0;
}

.barghpro-vendor-store .bp-store-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--bp-radius-full);
  display: block;
}

.barghpro-vendor-store .bp-store-badge-verified {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--bp-primary);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: var(--bp-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: var(--bp-shadow-sm);
}

.barghpro-vendor-store .bp-store-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.barghpro-vendor-store .bp-store-title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.barghpro-vendor-store .bp-store-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: var(--bp-text-main);
  line-height: 1.4;
}

.barghpro-vendor-store .bp-store-company {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--bp-text-muted);
  background: var(--bp-border-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--bp-radius-full);
}

.barghpro-vendor-store .bp-store-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.barghpro-vendor-store .bp-store-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bp-warning-light);
  padding: 0.3rem 0.75rem;
  border-radius: var(--bp-radius-full);
  border: 1px solid rgba(245, 158, 11, 0.2);
  cursor: pointer;
  transition: var(--bp-transition);
}

.barghpro-vendor-store .bp-store-rating-pill:hover {
  background: #fef3c7;
}

.barghpro-vendor-store .bp-store-stars {
  position: relative;
  display: inline-block;
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 2px;
  direction: ltr;
}

.barghpro-vendor-store .bp-store-stars-empty {
  color: #cbd5e1;
}

.barghpro-vendor-store .bp-store-stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  color: var(--bp-warning);
}

.barghpro-vendor-store .bp-store-rating-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: #b45309;
}

.barghpro-vendor-store .bp-store-rating-count {
  font-size: 0.8rem;
  color: #b45309;
}

.barghpro-vendor-store .bp-store-stat-item {
  font-size: 0.85rem;
  color: var(--bp-text-muted);
  background: var(--bp-border-light);
  padding: 0.3rem 0.75rem;
  border-radius: var(--bp-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.barghpro-vendor-store .bp-store-stat-value {
  color: var(--bp-text-main);
}

/* Header Tablet & Desktop Query */
@media (min-width: 768px) {
  .barghpro-vendor-store .bp-store-banner {
    height: 200px;
  }
  .barghpro-vendor-store .bp-store-header-content {
    flex-direction: row;
    text-align: right;
    align-items: flex-end;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .barghpro-vendor-store .bp-store-header.has-banner .bp-store-avatar-wrap {
    margin-top: -65px;
  }
  .barghpro-vendor-store .bp-store-avatar-wrap {
    width: 110px;
    height: 110px;
  }
  .barghpro-vendor-store .bp-store-meta {
    align-items: flex-start;
  }
  .barghpro-vendor-store .bp-store-title-row {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
  .barghpro-vendor-store .bp-store-title {
    font-size: 1.65rem;
  }
  .barghpro-vendor-store .bp-store-stats-row {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Navigation Tabs (Mobile First)
   ========================================================================== */
.barghpro-vendor-store .bp-store-nav-tabs-wrap {
  position: sticky;
  top: 10px;
  z-index: 20;
  margin-bottom: 1.5rem;
}

.barghpro-vendor-store .bp-store-nav-tabs {
  display: flex;
  align-items: center;
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md);
  padding: 0.35rem;
  gap: 0.35rem;
  box-shadow: var(--bp-shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.barghpro-vendor-store .bp-store-nav-tabs::-webkit-scrollbar {
  display: none;
}

.barghpro-vendor-store .bp-tab-btn {
  flex: 1;
  min-width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bp-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--bp-radius-sm);
  cursor: pointer;
  transition: var(--bp-transition);
  white-space: nowrap;
}

.barghpro-vendor-store .bp-tab-btn:hover {
  color: var(--bp-primary);
  background: var(--bp-primary-light);
}

.barghpro-vendor-store .bp-tab-btn.active {
  color: #ffffff;
  background: var(--bp-primary);
  box-shadow: var(--bp-shadow-sm);
}

.barghpro-vendor-store .bp-tab-count {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--bp-radius-full);
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.barghpro-vendor-store .bp-tab-btn.active .bp-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   Tab Content & Transitions
   ========================================================================== */
.barghpro-vendor-store .bp-tab-content {
  display: none;
  animation: bpFadeIn 0.3s ease-in-out;
}

.barghpro-vendor-store .bp-tab-content.active {
  display: block;
}

@keyframes bpFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.barghpro-vendor-store .bp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.barghpro-vendor-store .bp-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: var(--bp-text-main);
  position: relative;
  padding-right: 0.75rem;
}

.barghpro-vendor-store .bp-section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--bp-primary);
  border-radius: var(--bp-radius-full);
}

.barghpro-vendor-store .bp-store-select {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--bp-text-main);
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  padding: 0.45rem 1.8rem 0.45rem 0.75rem;
  border-radius: var(--bp-radius-sm);
  outline: none;
  cursor: pointer;
  transition: var(--bp-transition);
}

.barghpro-vendor-store .bp-store-select:focus {
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 2px var(--bp-primary-light);
}

/* ==========================================================================
   Products Grid (Mobile First)
   ========================================================================== */
.barghpro-vendor-store .bp-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (max-width: 420px) {
  .barghpro-vendor-store .bp-product-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .barghpro-vendor-store .bp-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .barghpro-vendor-store .bp-product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.barghpro-vendor-store .bp-product-card {
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--bp-shadow-sm);
  transition: var(--bp-transition);
}

.barghpro-vendor-store .bp-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bp-shadow-lg);
  border-color: #cbd5e1;
}

.barghpro-vendor-store .bp-product-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f1f5f9;
  overflow: hidden;
}

.barghpro-vendor-store .bp-product-thumb-link {
  position: absolute;
  inset: 0;
  display: block;
}

.barghpro-vendor-store .bp-product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.barghpro-vendor-store .bp-product-card:hover .bp-product-thumb {
  transform: scale(1.05);
}

.barghpro-vendor-store .bp-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--bp-radius-sm);
  z-index: 2;
}

.barghpro-vendor-store .bp-badge-sale {
  background: var(--bp-danger);
  color: #ffffff;
}

.barghpro-vendor-store .bp-badge-out {
  background: var(--bp-text-muted);
  color: #ffffff;
}

.barghpro-vendor-store .bp-product-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem;
}

.barghpro-vendor-store .bp-product-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7rem;
}

.barghpro-vendor-store .bp-product-title a {
  color: var(--bp-text-main);
  text-decoration: none;
  transition: var(--bp-transition);
}

.barghpro-vendor-store .bp-product-title a:hover {
  color: var(--bp-primary);
}

.barghpro-vendor-store .bp-product-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.barghpro-vendor-store .bp-product-rating-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bp-text-muted);
}

.barghpro-vendor-store .bp-product-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--bp-border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.barghpro-vendor-store .bp-product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bp-text-main);
  line-height: 1.2;
}

.barghpro-vendor-store .bp-product-price del {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--bp-text-light);
  margin-left: 0.35rem;
}

.barghpro-vendor-store .bp-product-price ins {
  text-decoration: none;
  color: var(--bp-danger);
}

.barghpro-vendor-store .bp-product-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--bp-primary-light);
  color: var(--bp-primary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--bp-radius-sm);
  transition: var(--bp-transition);
  min-height: 36px;
}

.barghpro-vendor-store .bp-product-btn:hover {
  background: var(--bp-primary);
  color: #ffffff;
}

/* ==========================================================================
   Pagination (Clean & Accessible)
   ========================================================================== */
.barghpro-vendor-store .bp-store-pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.barghpro-vendor-store .bp-store-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.4rem;
}

.barghpro-vendor-store .bp-store-pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  border-radius: var(--bp-radius-sm);
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  color: var(--bp-text-main);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--bp-transition);
}

.barghpro-vendor-store .bp-store-pagination .page-numbers:hover {
  border-color: var(--bp-primary);
  color: var(--bp-primary);
}

.barghpro-vendor-store .bp-store-pagination .page-numbers.current {
  background: var(--bp-primary);
  border-color: var(--bp-primary);
  color: #ffffff;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.barghpro-vendor-store .bp-about-card {
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md);
  padding: 1.5rem;
  box-shadow: var(--bp-shadow-sm);
}

.barghpro-vendor-store .bp-about-content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #334155;
}

.barghpro-vendor-store .bp-about-content p {
  margin: 0 0 1rem 0;
}

.barghpro-vendor-store .bp-about-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Reviews Section
   ========================================================================== */
.barghpro-vendor-store .bp-reviews-summary-card {
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--bp-shadow-sm);
  text-align: center;
}

.barghpro-vendor-store .bp-reviews-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.barghpro-vendor-store .bp-reviews-big-score {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--bp-text-main);
  line-height: 1;
}

.barghpro-vendor-store .bp-reviews-total-text {
  font-size: 0.85rem;
  color: var(--bp-text-muted);
}

.barghpro-vendor-store .bp-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.barghpro-vendor-store .bp-review-item {
  background: var(--bp-card-bg);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md);
  padding: 1.25rem;
  box-shadow: var(--bp-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.barghpro-vendor-store .bp-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.barghpro-vendor-store .bp-review-author-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.barghpro-vendor-store .bp-review-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--bp-radius-full);
  object-fit: cover;
  border: 1px solid var(--bp-border);
}

.barghpro-vendor-store .bp-review-author-info {
  display: flex;
  flex-direction: column;
}

.barghpro-vendor-store .bp-review-author-name {
  font-size: 0.9rem;
  color: var(--bp-text-main);
}

.barghpro-vendor-store .bp-review-date {
  font-size: 0.75rem;
  color: var(--bp-text-light);
}

.barghpro-vendor-store .bp-review-product-tag {
  background: var(--bp-border-light);
  padding: 0.4rem 0.75rem;
  border-radius: var(--bp-radius-sm);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.barghpro-vendor-store .bp-review-product-label {
  color: var(--bp-text-muted);
}

.barghpro-vendor-store .bp-review-product-link {
  color: var(--bp-primary);
  text-decoration: none;
  font-weight: 600;
}

.barghpro-vendor-store .bp-review-product-link:hover {
  text-decoration: underline;
}

.barghpro-vendor-store .bp-review-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--bp-text-main);
}

.barghpro-vendor-store .bp-review-content p {
  margin: 0;
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.barghpro-vendor-store .bp-empty-state {
  background: var(--bp-card-bg);
  border: 1px dashed var(--bp-border);
  border-radius: var(--bp-radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.barghpro-vendor-store .bp-empty-icon {
  color: var(--bp-text-light);
}

.barghpro-vendor-store .bp-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--bp-text-main);
}

.barghpro-vendor-store .bp-empty-desc {
  font-size: 0.88rem;
  color: var(--bp-text-muted);
  max-width: 400px;
  margin: 0;
  line-height: 1.6;
}

.barghpro-vendor-store .bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--bp-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--bp-transition);
  margin-top: 0.5rem;
}

.barghpro-vendor-store .bp-btn-primary {
  background: var(--bp-primary);
  color: #ffffff;
  border: none;
}

.barghpro-vendor-store .bp-btn-primary:hover {
  background: var(--bp-primary-hover);
}
