/* =========================================
   Profile Page CSS (تم صنایع دستی و سنتی)
========================================= */

@import url("../base/variables.css");

:root {
  --profile-max-width: 935px;
  --theme-transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Base Body Override for Theme Compatibility */
body.page-explore {
  transition: var(--theme-transition);
}

/* --- Theme System Custom Variables --- */
body.theme-dark {
  --bg-main: #141412;
  --bg-card: #1E1E1C;
  --bg-muted: #2A2A27;
  --text-primary: #ECE5DC;
  --text-secondary: #C8BFB5;
  --text-muted: #8E8478;
  --border-color: #38322B;
}

body.theme-earthy {
  --bg-main: #F0D9C0;
  --bg-card: #F9EFE4;
  --bg-muted: #E2C09C;
  --text-primary: #4A2E1B;
  --text-secondary: #70472D;
  --text-muted: #997157;
  --border-color: #D3A77C;
  --primary: #C46A2B;
  --secondary: #8B5E3C;
}

/* Base Body Override for Theme Compatibility */
body.page-profile,
body.page-profile *,
body.page-profile *::before,
body.page-profile *::after {
  box-sizing: border-box;
}

/* --- Wrapper and General Layout --- */
.profile-wrapper {
  max-width: var(--profile-max-width);
  margin: 0 auto;
  padding: 30px 20px 80px;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 767px) {
  .profile-wrapper {
    padding: 60px 14px 110px; /* Header top spacing and bottom-nav clearing on mobile */
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* --- Mobile Headers --- */
.profile-mobile-header,
.settings-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 52px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  z-index: 150;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 767px) {
  .profile-mobile-header,
  .settings-mobile-header {
    display: flex;
  }
}

.profile-mobile-header .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-mobile-header .back-btn:active {
  background-color: var(--bg-muted);
}

.profile-mobile-username,
.settings-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 62%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-mobile-username .icon-verified {
  color: #0095f6;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.profile-mobile-actions,
.settings-mobile-header a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.profile-mobile-actions button,
.settings-mobile-header button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.profile-mobile-actions button:hover {
  color: var(--primary);
}

.settings-mobile-header .save-mobile-btn {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

/* --- Profile Info Section --- */
.profile-info-section {
  margin-bottom: 36px;
}

@media (max-width: 767px) {
  .profile-info-section {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, rgba(139, 94, 60, 0.12));
    border-radius: 20px;
    padding: 16px 14px 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 18px rgba(139, 94, 60, 0.05);
  }

  body.theme-dark .profile-info-section {
    background: #18181c;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.3);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .profile-info-section {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, rgba(139, 94, 60, 0.1));
    border-radius: 22px;
    padding: 22px 20px;
    margin-bottom: 24px;
    box-shadow: 0 6px 22px rgba(139, 94, 60, 0.05);
  }

  body.theme-dark .profile-info-section {
    background: #18181c;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.3);
  }
}

.profile-info-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .profile-info-container {
    gap: 24px;
    align-items: center;
  }
}

@media (max-width: 767px) {
  .profile-info-container {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
}

/* 🌟 Mobile Lead Header: Avatar + Quick Stats Side-by-Side */
.profile-header-lead {
  display: flex;
  align-items: flex-start;
}

@media (max-width: 767px) {
  .profile-header-lead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    margin-bottom: 4px;
  }
}

.profile-avatar-area {
  flex: 0 0 140px;
  width: 140px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .profile-avatar-area {
    flex: 0 0 110px;
    width: 110px;
  }
  .profile-avatar-ring {
    width: 110px !important;
    height: 110px !important;
  }
}

@media (max-width: 767px) {
  .profile-avatar-area {
    flex: 0 0 78px;
    width: 78px;
    align-items: center;
  }
}

.profile-avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 3px;
  position: relative;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.profile-avatar-ring:hover {
  transform: scale(1.03);
}

.profile-avatar-ring.has-story {
  background: linear-gradient(135deg, var(--secondary, #C46A2B), var(--primary, #8B5E3C), #E6A217);
  box-shadow: 0 3px 12px rgba(196, 106, 43, 0.25);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  display: block;
}

.avatar-verified-mark {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0095f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  border: 2px solid var(--bg-card, #ffffff);
  box-shadow: 0 2px 6px rgba(0, 149, 246, 0.4);
  z-index: 2;
}

@media (max-width: 767px) {
  .profile-avatar-ring {
    width: 78px;
    height: 78px;
    padding: 2.5px;
  }
  .profile-avatar-img {
    border-width: 2.5px;
  }
  .avatar-verified-mark {
    width: 19px;
    height: 19px;
    font-size: 0.58rem;
    border-width: 1.5px;
  }
}

/* 🔢 Quick Stats Beside Avatar on Mobile */
.profile-stats-mobile {
  display: none;
}

@media (max-width: 767px) {
  .profile-stats-mobile {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(139, 94, 60, 0.05);
    border: 1px solid rgba(139, 94, 60, 0.13);
    border-radius: 16px;
    padding: 10px 4px;
    min-height: 62px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(139, 94, 60, 0.04);
  }
  body.theme-dark .profile-stats-mobile {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
  }
}

.mobile-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  position: relative;
}

.mobile-stat-col:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(139, 94, 60, 0.14);
}

body.theme-dark .mobile-stat-col:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-stat-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  font-family: inherit;
}

.mobile-stat-label {
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.profile-details-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 767px) {
  .profile-details-area {
    width: 100%;
    gap: 10px;
  }
}

.profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .profile-title-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 0;
  }
}

.profile-title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-username {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

@media (max-width: 767px) {
  .profile-username {
    font-size: 1.22rem;
    font-weight: 800;
  }
}

.profile-title-main .icon-verified {
  font-size: 1.20rem;
  color: #0095f6;
}

/* Action Buttons Container */
.profile-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-only-actions {
  display: flex;
}

.mobile-only-actions {
  display: none !important;
}

@media (max-width: 767px) {
  .desktop-only-actions {
    display: none !important;
  }
  .mobile-only-actions {
    display: flex !important;
    width: 100%;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
  }
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.profile-btn:hover {
  background-color: var(--bg-muted);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(139, 94, 60, 0.12);
}

.profile-btn:active {
  transform: scale(0.97);
}

.profile-btn--primary {
  background-color: var(--primary);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(139, 94, 60, 0.25);
}

.profile-btn--primary:hover {
  opacity: 0.94;
  background-color: #724c30;
  color: #ffffff !important;
  box-shadow: 0 5px 14px rgba(139, 94, 60, 0.35);
}

.profile-btn--accent {
  background: linear-gradient(135deg, var(--secondary, #C46A2B), var(--primary, #8B5E3C));
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(196, 106, 43, 0.28);
}

.profile-btn--accent:hover {
  box-shadow: 0 6px 18px rgba(196, 106, 43, 0.4);
  opacity: 0.96;
  color: #ffffff !important;
}

.profile-btn--secondary {
  background-color: var(--bg-card);
  color: var(--primary);
  border-color: rgba(196, 106, 43, 0.35);
}

.profile-btn--secondary:hover {
  background-color: rgba(196, 106, 43, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

.profile-btn--icon {
  padding: 0;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 1rem;
}

.profile-btn--following,
.profile-btn.is-following {
  background-color: var(--bg-muted);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.profile-btn--following:hover,
.profile-btn.is-following:hover {
  background-color: #fff0f0;
  color: #e63946;
  border-color: #ffcdd2;
}

@media (max-width: 767px) {
  .mobile-only-actions .profile-btn {
    height: 42px;
    border-radius: 12px;
    font-size: 0.84rem;
    padding: 0 10px;
    box-shadow: 0 2px 8px rgba(139, 94, 60, 0.08);
  }
  .mobile-only-actions .profile-btn--accent,
  .mobile-only-actions .profile-btn--primary {
    flex: 1.5;
  }
  .mobile-only-actions .profile-btn--secondary {
    flex: 1.2;
  }
  .mobile-only-actions .profile-btn--icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }
}

/* --- Stats Row (Desktop) --- */
.profile-stats-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 767px) {
  .profile-stats-row {
    display: none !important; /* Handled in mobile stats layout */
  }
}

.profile-stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.profile-stat-item strong {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.profile-stat-item .stat-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.stat-divider {
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 0.85rem;
}

/* --- Bio Box --- */
.profile-bio-box {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-artisan-lead {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.artisan-craft-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary, #8B5E3C);
  background: rgba(139, 94, 60, 0.08);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 94, 60, 0.2);
}

.artisan-owner-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-muted, rgba(0, 0, 0, 0.04));
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary, #8B5E3C);
  background: rgba(139, 94, 60, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 94, 60, 0.2);
  margin-top: 2px;
}

.profile-role-badge.is-admin {
  color: #C46A2B;
  background: rgba(196, 106, 43, 0.1);
  border-color: rgba(196, 106, 43, 0.28);
}

body.theme-dark .profile-role-badge {
  color: #d4a373;
  background: rgba(212, 163, 115, 0.12);
  border-color: rgba(212, 163, 115, 0.25);
}

.profile-full-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}

.profile-bio-text {
  margin: 0;
  white-space: pre-line;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.75;
  max-width: 650px;
}

.profile-website-link {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  transition: var(--transition-fast);
}

.profile-website-link:hover {
  text-decoration: underline;
  color: var(--primary);
}

/* --- Sleek Integrated Seller Rating Badge --- */
.seller-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(247, 243, 238, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(139, 94, 60, 0.18);
  border-radius: 999px;
  padding: 6px 18px;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(139, 94, 60, 0.06);
  width: fit-content;
  max-width: 100%;
}

body.theme-dark .seller-rating-badge {
  background: linear-gradient(135deg, #252422 0%, #1E1E1C 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

body.theme-earthy .seller-rating-badge {
  background: linear-gradient(135deg, #FAF1E6 0%, #F5E5D0 100%);
  border-color: rgba(139, 94, 60, 0.22);
}

.rating-stars-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #E6A217;
  font-size: 0.8rem;
}

.rating-val {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.92rem;
}

.rating-separator {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 0.85rem;
}

.satisfaction-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.satisfaction-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
}

.satisfaction-bar-mini {
  width: 64px;
  height: 5px;
  background: rgba(139, 94, 60, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.satisfaction-bar-fill {
  height: 100%;
  background: linear-gradient(to left, #2D6A4F, #52B788);
  border-radius: 999px;
}

@media (max-width: 767px) {
  .seller-rating-badge {
    width: 100%;
    border-radius: 14px;
    justify-content: space-between;
    padding: 8px 12px;
    box-sizing: border-box;
    gap: 6px;
  }
  .satisfaction-label {
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .satisfaction-bar-mini {
    width: 48px;
    height: 5px;
    flex-shrink: 0;
  }
}

/* --- 🛡️ Artisan Trust & Credibility Badges Section (هویت و نشان‌های افتخار کارگاه بقچه) --- */
.artisan-trust-section {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0 24px 0;
  margin-bottom: 24px;
}

.artisan-trust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.artisan-trust-header-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.artisan-trust-header-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(139, 94, 60, 0.08);
  border: 1px solid rgba(139, 94, 60, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
}

.artisan-trust-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 2px;
}

@media (max-width: 1100px) {
  .artisan-trust-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 767px) {
  .artisan-trust-section {
    padding: 12px 0 16px 0;
    margin-bottom: 14px;
  }
  .artisan-trust-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
  }
}

.artisan-trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(145deg, #FFFFFF 0%, #FAF5EE 100%);
  border: 1px solid rgba(139, 94, 60, 0.18);
  border-radius: 18px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 12px rgba(139, 94, 60, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
  text-align: right;
  user-select: none;
}

body.theme-dark .artisan-trust-badge {
  background: linear-gradient(145deg, #252422 0%, #1E1E1C 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 767px) {
  .artisan-trust-badge {
    padding: 8px 10px;
    border-radius: 14px;
    min-width: 0;
    gap: 8px;
  }
}

/* افکت هاله نوری بالای کارت */
.artisan-trust-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: all 0.28s ease;
}

.artisan-trust-badge:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
  border-color: rgba(196, 106, 43, 0.35);
  box-shadow: 0 8px 20px rgba(139, 94, 60, 0.10), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.artisan-trust-badge:hover::before {
  background: linear-gradient(90deg, transparent, var(--secondary), var(--primary), transparent);
}

/* مدال آیکون گرد (Emblem Ring) */
.artisan-trust-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.artisan-trust-badge:hover .artisan-trust-ring {
  transform: scale(1.06) rotate(3deg);
}

@media (max-width: 767px) {
  .artisan-trust-ring {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
}

.artisan-trust-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

@media (max-width: 767px) {
  .artisan-trust-icon {
    font-size: 0.95rem;
  }
}

/* ۱. سابقه ۱۰ ساله (طلای سنتی / زعفرانی بقچه) */
.ring-experience {
  background: linear-gradient(135deg, #FFF9EB 0%, #F5E5C0 100%);
  border: 1.5px solid #D4AF37;
  color: #B8860B;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
}

/* ۲. تایید هویت رسمی (سبز زیتونی / یشمی کارگاهی) */
.ring-verified {
  background: linear-gradient(135deg, #EEF7EF 0%, #D5EDD7 100%);
  border: 1.5px solid #4E8752;
  color: #2D6A4F;
  box-shadow: 0 3px 10px rgba(45, 106, 79, 0.22);
}

/* ۳. اصالت ۱۰۰٪ دست‌ساز (سرخ سفالین / لعاب لاجوردی-عقیقی) */
.ring-authentic {
  background: linear-gradient(135deg, #FDF0ED 0%, #F8D9D2 100%);
  border: 1.5px solid #C0392B;
  color: #A93226;
  box-shadow: 0 3px 10px rgba(192, 57, 43, 0.22);
}

/* ۴. ارسال و بسته‌بندی امن (کهربایی / دارچینی گرم) */
.ring-shipping {
  background: linear-gradient(135deg, #FEF4EC 0%, #FCE3CF 100%);
  border: 1.5px solid #C46A2B;
  color: #A34812;
  box-shadow: 0 3px 10px rgba(196, 106, 43, 0.22);
}

/* محتوا و متادیتای متنی نشان */
.artisan-trust-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.artisan-trust-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.artisan-trust-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* برچسب‌های کپسولی مینیاتوری */
.artisan-trust-pill {
  font-size: 0.60rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}

.pill-gold {
  background: rgba(212, 175, 55, 0.16);
  color: #8A6407;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.pill-green {
  background: rgba(46, 125, 50, 0.14);
  color: #1B5E20;
  border: 1px solid rgba(46, 125, 50, 0.32);
}

.pill-terracotta {
  background: rgba(192, 57, 43, 0.12);
  color: #922B21;
  border: 1px solid rgba(192, 57, 43, 0.28);
}

.pill-cinnamon {
  background: rgba(196, 106, 43, 0.13);
  color: #873600;
  border: 1px solid rgba(196, 106, 43, 0.32);
}

.artisan-trust-sub {
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

@media (max-width: 767px) {
  .artisan-trust-title {
    font-size: 0.76rem;
  }
  .artisan-trust-pill {
    font-size: 0.56rem;
    padding: 1px 4px;
  }
  .artisan-trust-sub {
    font-size: 0.65rem;
  }
}

/* --- Profile Tabs & Post Grid --- */
.profile-tabs-header {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
  position: relative;
}

.profile-tab-btn {
  background: none;
  border: none;
  border-top: 2.5px solid transparent;
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 0.90rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  top: -1px;
}

.profile-tab-btn:hover {
  color: var(--text-primary);
}

.profile-tab-btn.active {
  color: var(--primary);
  font-weight: 800;
  border-top-color: var(--primary);
}

.profile-tab-btn i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.profile-tab-btn.active i {
  transform: scale(1.08);
}

/* Tab Counter Badge */
.tab-counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary, #8B5E3C);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(139, 94, 60, 0.22);
  transition: all 0.22s ease;
  margin-inline-start: 4px;
}

.profile-tab-btn.active .tab-counter-badge {
  background: var(--secondary, #C46A2B);
  color: #fff;
}

@media (max-width: 767px) {
  .profile-tabs-header {
    margin-bottom: 14px;
    gap: 6px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    justify-content: stretch;
  }
  .profile-tab-btn {
    flex: 1;
    justify-content: center;
    border-top: none !important;
    border-bottom: none !important;
    padding: 10px 4px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 10px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: static;
    top: 0;
  }
  .profile-tab-btn > span.tab-label {
    display: inline !important; /* SHOW labels on mobile! */
    font-size: 0.82rem;
  }
  .profile-tab-btn .tab-counter-badge {
    position: static;
    margin-right: 0;
    margin-inline-start: 4px;
    font-size: 0.66rem;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  }
  .profile-tab-btn.active {
    background: rgba(196, 106, 43, 0.12);
    color: var(--primary, #8B5E3C);
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(139, 94, 60, 0.08);
  }
}

/* --- Grid of Posts --- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

@media (max-width: 767px) {
  .profile-grid {
    gap: 3px;
    margin-bottom: 12px;
  }
}

.profile-grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-muted);
  overflow: hidden;
  cursor: pointer;
}

.profile-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.profile-grid-item:hover img {
  transform: scale(1.04);
}

.grid-item-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.grid-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.25s ease;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  z-index: 3;
}

.profile-grid-item:hover .grid-item-overlay {
  opacity: 1;
}

.overlay-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-empty-tab {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.empty-tab-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(139, 94, 60, 0.08);
  border: 1px solid rgba(139, 94, 60, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.9rem;
  margin-bottom: 6px;
  box-shadow: 0 4px 14px rgba(139, 94, 60, 0.06);
}

body.theme-dark .empty-tab-icon-wrap {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--primary);
}

.empty-tab-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.empty-tab-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* =========================================
   Side Drawers (شبیه به دراور جستجو/اعلان اینستاگرام)
========================================= */
.side-drawer {
  position: fixed;
  top: 0;
  right: 80px; /* Aligns next to the desktop sidebar */
  width: 397px;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.04);
  z-index: 950;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

body.theme-dark .side-drawer {
  background-color: rgba(30, 30, 28, 0.94);
}

.side-drawer.is-open {
  transform: translateX(0);
}

.side-drawer__header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-drawer__header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.side-drawer__header button {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.side-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.side-drawer__search-input-wrap {
  position: relative;
  margin-bottom: 24px;
}

.side-drawer__search-input-wrap input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  padding: 0 40px 0 14px;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.side-drawer__search-input-wrap input:focus {
  border-color: var(--primary);
}

.side-drawer__search-input-wrap i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.side-drawer__section h4 {
  font-size: 0.9rem;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.recent-searches {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-searches li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.recent-searches .clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

/* Notifications Items */
.notif-group h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 12px 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(221, 211, 199, 0.4);
}

.notif-avatar {
  font-size: 1.7rem;
  color: var(--primary);
}

.notif-text {
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.notif-time {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.notif-media img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.notif-item .follow-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: 4px;
}

@media (max-width: 991px) {
  .side-drawer {
    width: 320px;
  }
}

@media (max-width: 767px) {
  .side-drawer {
    right: 0;
    width: 100%;
    z-index: 1050; /* Above mobile top bar */
  }
}

/* =========================================
   Theme Popover
========================================= */
.theme-popover {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.theme-popover.is-open {
  opacity: 1;
  visibility: visible;
}

.theme-popover__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.theme-popover__content {
  position: relative;
  background-color: var(--bg-card);
  width: 90%;
  max-width: 380px;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.theme-popover.is-open .theme-popover__content {
  transform: scale(1);
}

.theme-popover h4 {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: var(--text-primary);
  text-align: center;
}

.theme-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-opt-btn:hover {
  border-color: var(--primary);
}

.theme-opt-btn.active {
  background-color: rgba(139, 94, 60, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.color-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

/* =========================================
   Create Post Modal Styling (۳ مرحله‌ای صنایع دستی)
========================================= */
.create-post-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.create-post-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.create-post-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.create-post-modal__content {
  position: relative;
  background-color: var(--bg-card);
  width: 92%;
  max-width: 680px;
  min-height: 480px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.create-post-modal.is-open .create-post-modal__content {
  transform: translateY(0);
}

.create-post-modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.create-post-modal__header h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
}

.create-post-modal__header button {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.create-post-modal__body {
  display: none;
  flex: 1;
  padding: 24px;
}

.create-post-modal__body.active {
  display: flex;
  flex-direction: column;
}

/* Step 1: Upload Dropzone */
.upload-dropzone {
  flex: 1;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  transition: border-color 0.2s ease;
  cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(139, 94, 60, 0.03);
}

.upload-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.upload-dropzone p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.upload-btn {
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* Step 2: Editor Form Layout */
.post-editor-layout {
  display: flex;
  gap: 20px;
  height: 100%;
}

@media (max-width: 575px) {
  .post-editor-layout {
    flex-direction: column;
  }
}

.editor-media-preview {
  flex: 1;
  background-color: var(--bg-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 320px;
}

.editor-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-details-form {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 400px;
  padding-left: 6px;
}

.editor-details-form textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  padding: 10px;
  outline: none;
  font-size: 0.88rem;
  resize: none;
  font-family: inherit;
}

.editor-details-form select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  padding: 0 10px;
  outline: none;
}

.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}

.product-fields {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.product-fields input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  padding: 0 10px;
  outline: none;
}

.share-submit-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-inverse);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
}

/* Step 3: Success Screen */
.success-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.success-icon-wrap {
  font-size: 5rem;
  color: var(--success);
  margin-bottom: 20px;
  animation: scalePop 0.4s ease;
}

.success-screen h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.success-screen p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.success-close-btn {
  background-color: var(--bg-muted);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* =========================================
   Settings View Layout (ویرایش تنظیمات)
========================================= */
.settings-wrapper {
  max-width: var(--profile-max-width);
  margin: 0 auto;
  padding: 30px 20px 40px;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .settings-wrapper {
    padding: 52px 0 60px; /* Accommodate mobile top/bottom bars */
  }
}

.settings-container {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 620px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 767px) {
  .settings-container {
    flex-direction: column;
    border: none;
    border-radius: 0;
    min-height: auto;
    box-shadow: none;
    background: transparent;
  }
}

/* Settings Sidebar Left Menu */
.settings-tabs-menu {
  flex: 1;
  border-left: 1px solid var(--border-color);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 767px) {
  .settings-tabs-menu {
    border-left: none;
    padding: 16px;
    background: var(--bg-card);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    gap: 8px;
  }
}

.settings-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 24px 8px;
  margin: 0;
}

.settings-tab-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: none;
  border: none;
  border-right: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-tab-link:hover {
  background-color: var(--bg-main);
  color: var(--primary);
}

.settings-tab-link.active {
  background-color: rgba(139, 94, 60, 0.05);
  color: var(--primary);
  border-right-color: var(--primary);
}

@media (max-width: 767px) {
  .settings-tab-link {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
  }
  .settings-tab-link.active {
    border-color: var(--primary);
    border-right-color: var(--primary);
  }
  .settings-section-title {
    padding: 0 4px 4px;
  }
}

/* Settings Content Panel */
.settings-content-area {
  flex: 2.8;
  padding: 30px 40px;
}

@media (max-width: 767px) {
  .settings-content-area {
    flex: none;
    padding: 16px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
  }
}

.settings-panel__header {
  margin-bottom: 24px;
}

.settings-panel__header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Avatar Edit Box */
.avatar-edit-box {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.avatar-edit-box img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.avatar-username {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.change-photo-btn {
  background: none;
  border: none;
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.change-photo-btn:hover {
  text-decoration: underline;
}

/* Settings Form Controls */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
}

@media (max-width: 767px) {
  .settings-form {
    max-width: 100%;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-help-text {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.submit-settings-btn {
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  width: max-content;
  margin-top: 10px;
}

@media (max-width: 767px) {
  .submit-settings-btn {
    width: 100%;
    display: none; /* Mobile handles save in top header */
  }
}

.submit-settings-btn:hover {
  opacity: 0.9;
}

/* Seller Toggle Group */
.toggle-group {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 80%;
}

.toggle-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Theme Grid Selector in Settings */
.theme-grid-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.theme-card {
  border: 1px solid var(--border-color);
  background-color: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.theme-card:hover {
  border-color: var(--primary);
}

.theme-card.active {
  border-color: var(--primary);
  background-color: rgba(139, 94, 60, 0.05);
  box-shadow: var(--shadow-sm);
}

.theme-color-palette {
  display: flex;
  gap: 6px;
}

.theme-color-palette span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

.theme-card span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.appearance-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* =============================================================================
   SHOP PRODUCTS TAB & COMMERCE STYLES (بخش محصولات و ریلزهای متصل)
   ============================================================================= */

/* Tab Counter Badge */
.tab-counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(139, 94, 60, 0.12);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 12px;
  margin-right: 4px;
}

body.theme-dark .tab-counter-badge {
  background-color: rgba(211, 158, 130, 0.2);
  color: #D39E82;
}

.profile-tab-btn.active .tab-counter-badge {
  background-color: var(--primary);
  color: var(--text-inverse);
}

/* --- Products Toolbar --- */
.shop-products-toolbar {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shop-products-controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

/* Search Box */
.shop-prod-search-box {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.shop-prod-search-box .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.shop-prod-search-box input {
  width: 100%;
  height: 42px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 42px 0 36px;
  font-size: 0.88rem;
  color: var(--text-primary);
  box-sizing: border-box;
  transition: all 0.25s ease;
  outline: none;
}

.shop-prod-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.15);
}

.clear-search-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  color: var(--primary);
}

/* Desktop Filters & Sort */
.shop-prod-filters-desktop {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 767px) {
  .shop-prod-filters-desktop {
    display: none;
  }
}

.filter-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-select-wrap i {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.shop-prod-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 34px 8px 16px;
  font-size: 0.86rem;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.shop-prod-select:focus {
  border-color: var(--primary);
}

.stock-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.stock-toggle-label input {
  display: none;
}

.toggle-custom {
  width: 38px;
  height: 20px;
  background-color: var(--border-color);
  border-radius: 20px;
  position: relative;
  transition: background-color 0.25s ease;
}

.toggle-custom::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.stock-toggle-label input:checked + .toggle-custom {
  background-color: var(--primary);
}

.stock-toggle-label input:checked + .toggle-custom::before {
  transform: translateX(18px);
}

/* Mobile Filter Trigger */
.mobile-filter-open-btn {
  display: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  height: 42px;
  padding: 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  gap: 8px;
  position: relative;
}

@media (max-width: 767px) {
  .mobile-filter-open-btn {
    display: inline-flex;
    flex-shrink: 0;
  }
}

.filter-active-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 8px;
}

/* Category Chips Scroll */
.shop-categories-chips-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}

.shop-categories-chips-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex-shrink: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-chip:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background-color: var(--bg-muted);
}

.cat-chip.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(139, 94, 60, 0.25);
}

/* Active Filters Bar */
.active-filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  margin-bottom: 20px;
}

.active-filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.active-filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag-pill {
  background-color: var(--bg-muted);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-tag-pill button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
}

.filter-tag-pill button:hover {
  color: #e53935;
}

.reset-all-filters-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.reset-all-filters-btn:hover {
  text-decoration: underline;
}

/* --- Products Grid Layout --- */
.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

@media (max-width: 1024px) {
  .shop-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .shop-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
}

/* --- Product Card Design --- */
.shop-product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  position: relative;
}

.shop-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(139, 94, 60, 0.35);
}

.prod-card-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-muted);
  overflow: hidden;
}

.prod-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.2, 0, 0.2, 1);
}

.shop-product-card:hover .prod-card-img-wrap img {
  transform: scale(1.06);
}

/* Badges inside Image */
.prod-card-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.prod-discount-badge {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.prod-out-stock-badge {
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* Connected Reels Pill Badge */
.prod-reels-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
}

.prod-reels-badge i {
  color: #FF5252;
  font-size: 0.82rem;
  transition: transform 0.2s ease;
}

.prod-reels-badge:hover {
  background: rgba(196, 106, 43, 0.95);
  border-color: transparent;
  transform: scale(1.05);
}

.prod-reels-badge:hover i {
  transform: scale(1.2);
  color: #fff;
}

/* Product Card Details Body */
.prod-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

@media (max-width: 767px) {
  .prod-card-body {
    padding: 10px;
    gap: 6px;
  }
}

.prod-card-category {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

@media (max-width: 767px) {
  .prod-card-title {
    font-size: 0.84rem;
    height: 2.8em;
  }
}

.prod-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  color: #FFB300;
  font-weight: 700;
}

.prod-card-rating .rating-num {
  color: var(--text-secondary);
}

.prod-card-price-row {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prod-price-original {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.prod-price-final-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.prod-price-final {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.prod-price-currency {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.prod-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.prod-add-cart-btn {
  flex: 1;
  height: 36px;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prod-add-cart-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
}

.prod-add-cart-btn.is-added {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.prod-quick-view-btn {
  width: 36px;
  height: 36px;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.prod-quick-view-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background-color: rgba(139, 94, 60, 0.08);
}

/* --- Skeleton Loaders --- */
@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.product-skeleton-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-color) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite;
}

.sk-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-color) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite;
}

.sk-title { width: 80%; }
.sk-price { width: 45%; }

/* --- Empty Search & Filter State --- */
.shop-products-empty {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  background-color: var(--bg-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  margin: 0 auto 16px;
}

.shop-products-empty h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.shop-products-empty p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.empty-reset-btn {
  background-color: var(--primary);
  color: var(--text-inverse);
  border: none;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.empty-reset-btn:hover {
  opacity: 0.9;
}

/* --- Pagination Controls --- */
.shop-products-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.load-more-prod-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  padding: 10px 28px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.load-more-prod-btn:hover {
  background-color: var(--bg-muted);
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-pages-wrap {
  display: flex;
  gap: 6px;
}

.page-num-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.page-num-btn:hover {
  border-color: var(--primary);
}

.page-num-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
}

/* --- Connected Reels Player Modal --- */
.connected-reels-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.connected-reels-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.connected-reels-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.connected-reels-dialog {
  position: relative;
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

.connected-reels-modal.is-open .connected-reels-dialog {
  transform: scale(1);
}

.connected-reels-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reels-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reels-header-title i {
  color: #FF5252;
  font-size: 1.2rem;
}

.reels-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.reels-close-btn:hover {
  color: var(--text-primary);
}

.connected-reels-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.reels-cards-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.connected-reel-card {
  position: relative;
  aspect-ratio: 9 / 16;
  background-color: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.connected-reel-card video,
.connected-reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.connected-reel-card:hover img,
.connected-reel-card:hover video {
  transform: scale(1.05);
}

.reel-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  color: #fff;
}

.reel-play-icon {
  align-self: center;
  margin-top: auto;
  margin-bottom: auto;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  transition: transform 0.2s ease;
}

.connected-reel-card:hover .reel-play-icon {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.4);
}

.reel-caption-preview {
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-meta-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* --- Mobile Filter Bottom Sheet --- */
.mobile-filter-sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-filter-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.mobile-filter-sheet__panel {
  position: relative;
  background-color: var(--bg-card);
  border-radius: 20px 20px 0 0;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  z-index: 2;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.2, 1);
}

.mobile-filter-sheet.is-open .mobile-filter-sheet__panel {
  transform: translateY(0);
}

.mobile-filter-sheet__handle {
  width: 40px;
  height: 5px;
  background-color: var(--border-color);
  border-radius: 3px;
  margin: 12px auto 0;
}

.mobile-filter-sheet__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-filter-sheet__header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
}

.mobile-filter-sheet__body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: block;
}

.filter-radio-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-radio-item input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.filter-group.inline-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-color);
  transition: 0.3s;
  border-radius: 24px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch-toggle input:checked + .slider {
  background-color: var(--primary);
}

.switch-toggle input:checked + .slider:before {
  transform: translateX(20px);
}

.mobile-filter-sheet__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.sheet-reset-btn {
  flex: 1;
  height: 42px;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}

.sheet-apply-btn {
  flex: 2;
  height: 42px;
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-inverse);
  cursor: pointer;
}

/* =========================================
   Edit Profile Modal (مودال ویرایش سریع پروفایل غرفه)
========================================= */
.edit-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  box-sizing: border-box;
}

.edit-profile-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.edit-profile-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 20, 10, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.edit-profile-modal__dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  background-color: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.edit-profile-modal.is-open .edit-profile-modal__dialog {
  transform: scale(1);
}

.edit-profile-modal__header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(139, 94, 60, 0.04);
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-header-title i {
  color: var(--primary);
}

.edit-profile-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.edit-profile-modal__close:hover {
  color: var(--error);
  background: rgba(220, 53, 69, 0.08);
}

.edit-profile-form {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(85vh - 70px);
  overflow-y: auto;
}

.edit-profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
}

.edit-profile-avatar-preview {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}

.edit-profile-avatar-preview img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.avatar-change-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.avatar-change-badge:hover {
  transform: scale(1.1);
}

.avatar-change-hint {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avatar-change-hint strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.avatar-change-hint span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.form-group-slr {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group-slr label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.edit-profile-input,
.edit-profile-textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 14px;
  background-color: var(--bg-main, #FAF8F5);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.edit-profile-input:focus,
.edit-profile-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 106, 43, 0.14);
}

.edit-profile-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.char-counter {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: left;
  direction: ltr;
}

.edit-profile-modal__footer {
  display: flex;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
}

.btn-cancel-edit {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--radius-sm, 8px);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-cancel-edit:hover {
  background: var(--bg-muted);
}

.btn-save-edit {
  flex: 2;
  height: 42px;
  border: none;
  background: linear-gradient(135deg, var(--secondary, #8B5E3C), var(--primary, #C46A2B));
  color: white;
  border-radius: var(--radius-sm, 8px);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(196, 106, 43, 0.25);
  transition: all 0.2s ease;
}

.btn-save-edit:hover {
  box-shadow: 0 6px 16px rgba(196, 106, 43, 0.35);
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-save-edit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .edit-profile-modal {
    align-items: flex-end;
    padding: 0;
  }
  .edit-profile-modal__dialog {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
  }
}

/* ==========================================================================
   Desktop Modal Post Actions Bar (Instagram-Style Like, Comment, Share, Save)
   ========================================================================== */
.explore-desktop-modal__footer {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  background: var(--bg-card, #ffffff);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.theme-dark .explore-desktop-modal__footer {
  background: #1c1c1f;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.explore-post__actions-bar,
.explore-desktop-modal__actions-bar {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 18px;
  padding: 2px 0 6px;
  direction: rtl;
}

.explore-post__action-btn,
.explore-desktop-modal__action-btn {
  background: none;
  border: none;
  padding: 4px;
  font-size: 1.55rem;
  color: var(--text-primary, #2b1810);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

body.theme-dark .explore-post__action-btn,
body.theme-dark .explore-desktop-modal__action-btn {
  color: #f3f3f3;
}

.explore-post__action-btn:hover,
.explore-desktop-modal__action-btn:hover {
  transform: scale(1.2);
  color: var(--primary, #8B5E3C);
}

.explore-post__action-btn:active,
.explore-desktop-modal__action-btn:active {
  transform: scale(0.9);
}

/* Push Save / Bookmark to opposite end */
.explore-post__action-btn--save,
.explore-post__action-btn.js-save-btn,
.explore-desktop-modal__action-btn--save {
  margin-inline-start: auto;
}

/* Liked state */
.explore-post__action-btn.is-liked i,
.explore-desktop-modal__action-btn.is-liked i {
  color: #ff334b !important;
  animation: modalHeartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Saved state */
.explore-post__action-btn.is-saved i,
.explore-desktop-modal__action-btn.is-saved i {
  color: var(--primary, #8B5E3C) !important;
}

body.theme-dark .explore-post__action-btn.is-saved i,
body.theme-dark .explore-desktop-modal__action-btn.is-saved i {
  color: #d4a373 !important;
}

@keyframes modalHeartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Comment Form in Modal */
.explore-desktop-modal__comment-form {
  margin-top: 2px;
}

.explore-desktop-modal__comment-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main, #f7f3ee);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  transition: all 0.2s ease;
}

body.theme-dark .explore-desktop-modal__comment-input-wrap {
  background: #25252a;
  border-color: rgba(255, 255, 255, 0.1);
}

.explore-desktop-modal__comment-input-wrap:focus-within {
  border-color: var(--primary, #8B5E3C);
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.15);
  background: #fff;
}

body.theme-dark .explore-desktop-modal__comment-input-wrap:focus-within {
  background: #18181c;
}

.explore-desktop-modal__comment-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary, #1e1e1c);
  padding: 6px 4px;
}

body.theme-dark .explore-desktop-modal__comment-input {
  color: #f3f3f3;
}

.explore-desktop-modal__comment-input::placeholder {
  color: var(--text-muted, #888);
}

.explore-desktop-modal__comment-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary, #8B5E3C);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explore-desktop-modal__comment-submit:hover {
  background: var(--secondary, #C46A2B);
  transform: translateY(-1px);
}

/* ==========================================================================
   Feed & Explore Parity Modal Styling (Close button, Vendor Header, Caption, Likes)
   ========================================================================== */
.explore-desktop-modal__close-btn {
  position: fixed !important;
  top: 20px !important;
  right: 24px !important;
  left: auto !important;
  width: 44px !important;
  height: 44px !important;
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  font-size: 1.35rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 1002 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
}

.explore-desktop-modal__close-btn:hover {
  background: rgba(220, 53, 69, 0.9) !important;
  color: #ffffff !important;
  transform: rotate(90deg) scale(1.1) !important;
}

.explore-desktop-modal__vendor-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.explore-desktop-modal__follow-btn {
  background: transparent;
  border: 1px solid var(--primary, #8B5E3C);
  color: var(--primary, #8B5E3C);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.explore-desktop-modal__follow-btn:hover {
  background: var(--primary, #8B5E3C);
  color: #fff;
}

.explore-desktop-modal__follow-btn.is-following {
  background: rgba(139, 94, 60, 0.12);
  border-color: transparent;
  color: var(--text-secondary, #666);
}

/* Feed-style Caption Block */
.explore-desktop-modal__caption-block {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

body.theme-dark .explore-desktop-modal__caption-block {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.explore-desktop-modal__caption-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--primary, #8B5E3C);
}

.explore-desktop-modal__caption-content {
  flex: 1;
  min-width: 0;
}

.explore-desktop-modal__caption-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary, #1e1e1c);
  margin-bottom: 4px;
  word-break: break-word;
}

body.theme-dark .explore-desktop-modal__caption-text {
  color: #f0ede8;
}

.explore-desktop-modal__caption-text strong {
  margin-inline-end: 6px;
  font-weight: 800;
  color: var(--text-primary, #1e1e1c);
}

body.theme-dark .explore-desktop-modal__caption-text strong {
  color: #fff;
}

.explore-desktop-modal__caption-text .post-tag-pill {
  color: var(--primary, #8B5E3C);
  font-weight: 700;
  text-decoration: none;
}

.explore-desktop-modal__caption-time {
  font-size: 0.74rem;
  color: var(--text-muted, #888);
}

/* Likes Counter & Date */
.explore-desktop-modal__likes-info {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary, #1e1e1c);
  margin: 2px 0 0;
}

body.theme-dark .explore-desktop-modal__likes-info {
  color: #fff;
}

.explore-desktop-modal__post-date {
  font-size: 0.72rem;
  color: var(--text-muted, #888);
  margin-bottom: 2px;
}



