@import url('/assets/fonts/dana/dana.css');
/*
Theme Name: Friendly Shop Pro (قالب فروشگاهی فرندلی شاپ - نسخه نکسوس دیجیتال)
Theme URI: http://37.32.43.186/
Author: استودیو توسعه نکسوس و فرندلی شاپ
Author URI: http://37.32.43.186/
Description: پیشرفته‌ترین و سریع‌ترین قالب فروشگاهی ایرانی الهام‌گرفته از دیجی‌کالا. دارای درگاه و تسهیلات اقساطی اسنپ‌پی و دیجی‌پی، اعتبارسنجی دقیق کد ملی، سامانه تیکتینگ ۲۴ ساعته متصل به دیتابیس MariaDB، استعلام و رهگیری مرسولات پست پیشتاز، ثبت چند آدرس تحویل، صفحه‌ساز اختصاصی زنده و بهینه‌سازی ۱۰۰٪ برای سئو و موبایل. مجهز به گارد لایسنس راست‌چین جهت تضمین اصالت و فروش قانونی.
Version: 5.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Commercial - Rastchin Guard Protected
License URI: https://www.rtl-theme.com/
Tags: e-commerce, rtl, shop, snapppay, digipay, digikala, persian, responsive-layout, dark-mode, modern, high-performance
Text Domain: friendly-shop
*/
/* ==========================================================
   DIGIKALA-GRADE E-COMMERCE THEME (NEXUS STORE)
   ========================================================== */
/* 1. ULTRA-FAST ZERO-FOUT LOCAL VAZIRMATN FONTS */
@font-face {
  font-family: 'Dana', 'Vazirmatn';
  src: url('/assets/fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana', 'Vazirmatn';
  src: url('/assets/fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-family: 'Dana', 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --primary: #ef394e;
  --primary-hover: #d92d40;
  --primary-light: #fff1f2;
  --accent: #f59e0b;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-body: #070b14;
  --bg-card: #0c1222;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-light: #151d30;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
}

/* TOP TICKER BAR */
.top-ticker {
  background: linear-gradient(90deg, #1e1b4b, #312e81, #1e1b4b);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ticker-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ticker-badge {
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

/* MAIN HEADER */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), #b91c1c);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(239, 57, 78, 0.35);
}
.logo-text h1 {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}
.logo-text span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* SEARCH BOX */
.header-search {
  flex: 1;
  max-width: 580px;
  position: relative;
}
.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 44px;
  transition: var(--transition);
}
.search-wrapper:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(239, 57, 78, 0.12);
}
.search-wrapper i {
  color: var(--text-muted);
  font-size: 15px;
  margin-left: 10px;
}
.search-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--text-main);
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  transition: var(--transition);
}
.btn-auth {
  border: 1px solid var(--border);
  color: var(--text-main);
  background: var(--bg-card);
}
.btn-auth:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-cart {
  background: var(--primary-light);
  color: var(--primary);
  position: relative;
}
.btn-cart:hover {
  background: var(--primary);
  color: #fff;
}
.cart-count {
  position: absolute;
  top: -5px;
  left: -5px;
  background: var(--primary);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.theme-toggle-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* MEGA MENU & SECONDARY NAVBAR */
.header-nav {
  border-top: 1px solid var(--border-light);
  padding: 6px 0;
  font-size: 12px;
  font-weight: 700;
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.category-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.category-btn:hover {
  color: var(--primary);
}
.nav-item {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 6px 0;
}
.nav-item:hover, .nav-item.active {
  color: var(--text-main);
}
.nav-item.special {
  color: var(--primary);
  font-weight: 800;
}
.city-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
}
.city-picker i {
  color: var(--primary);
}

/* HERO SECTION */
.hero-section {
  padding: 20px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}
.hero-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 420px;
  box-shadow: var(--shadow-sm);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.slide.active {
  opacity: 1;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(270deg, rgba(7, 11, 20, 0.85) 0%, rgba(7, 11, 20, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  color: #fff;
}
.slide-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.slide-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 10px;
  max-width: 500px;
}
.slide-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  max-width: 440px;
  margin-bottom: 20px;
  line-height: 1.7;
}
.slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  align-self: flex-start;
  transition: var(--transition);
}
.slide-btn:hover {
  background: var(--primary);
  color: #fff;
}
.slider-arrows {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.slider-arrow {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition);
}
.slider-arrow:hover {
  background: #fff;
  color: #0f172a;
}
.hero-side-banners {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-banner {
  flex: 1;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.side-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.side-banner:hover img {
  transform: scale(1.04);
}

/* STORY CIRCLES */
.story-circles-section {
  padding: 16px 0;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
  text-align: center;
}
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.story-ring {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  padding: 2.5px;
  background: linear-gradient(135deg, #ef394e, #f59e0b);
  transition: transform 0.3s ease;
}
.story-item:hover .story-ring {
  transform: scale(1.08);
}
.story-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}
.story-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
}

/* INCREDIBLE OFFERS SECTION (DIGIKALA RED BOX) */
.incredible-section {
  padding: 20px 0;
}
.incredible-box {
  background: linear-gradient(135deg, #ef394e, #d92d40);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.incredible-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  gap: 14px;
}
.incredible-sidebar h2 {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
}
.incredible-icon {
  font-size: 48px;
  color: #fde047;
}
.countdown-timer {
  display: flex;
  gap: 6px;
  direction: ltr;
}
.timer-unit {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 16px;
  font-weight: 900;
  min-width: 36px;
  text-align: center;
  font-family: monospace;
}
.see-all-incredible {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-top: 8px;
}
.incredible-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.product-badge-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 900;
}
.product-img-wrap {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.product-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}
.product-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}
.discount-pill {
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 900;
  font-family: monospace;
}
.price-block {
  text-align: left;
  font-family: monospace;
}
.price-orig {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-curr {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
}
.price-curr span {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 700;
}

/* BANNER GRIDS */
.quad-banners-section, .duo-banners-section {
  padding: 16px 0;
}
.quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.promo-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.promo-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.promo-banner:hover img {
  transform: scale(1.03);
}

/* BRAND FILTER & CATALOG SHOWCASE */
.catalog-section {
  padding: 20px 0;
}
.catalog-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}
.catalog-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.catalog-title i {
  color: var(--primary);
  font-size: 20px;
}
.catalog-title h3 {
  font-size: 17px;
  font-weight: 900;
}
.brand-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.brand-pill {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 800;
  background: var(--border-light);
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}
.brand-pill:hover, .brand-pill.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 57, 78, 0.3);
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* NEXUS CLUB BANNER */
.club-section {
  padding: 20px 0;
}
.club-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}
.club-content {
  display: flex;
  align-items: center;
  gap: 18px;
}
.club-icon {
  width: 60px;
  height: 60px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--accent);
}
.club-btn {
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(239, 57, 78, 0.25);
  transition: var(--transition);
}
.club-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* 4 GUARANTEES ROW */
.guarantees-section {
  padding: 24px 0;
}
.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.guarantee-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.guarantee-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.guarantee-info h4 {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 2px;
}
.guarantee-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* FOOTER */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-top: 40px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}
.back-to-top {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.back-to-top:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 36px 0;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--text-main);
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-col ul a:hover {
  color: var(--primary);
  padding-right: 4px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--border-light);
  color: var(--text-main);
  font-size: 11px;
  outline: none;
}
.newsletter-form button {
  background: var(--primary);
  color: #fff;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 800;
}
.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 20px 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side-banners { display: grid; grid-template-columns: 1fr 1fr; }
  .incredible-box { grid-template-columns: 1fr; }
  .incredible-products-grid { grid-template-columns: repeat(2, 1fr); }
  .quad-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .guarantees-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header-search { display: none; }
  .story-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-side-banners { grid-template-columns: 1fr; }
  .duo-grid { grid-template-columns: 1fr; }
  .quad-grid { grid-template-columns: 1fr; }
  .incredible-products-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .guarantees-grid { grid-template-columns: 1fr; }
  .club-box { flex-direction: column; text-align: center; }
  .club-content { flex-direction: column; }
  .footer-links-grid { grid-template-columns: 1fr; }
}


/* ==========================================================
   ADDITIONAL E-COMMERCE PAGES CSS
   ========================================================== */

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 16px 0;
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb i {
  font-size: 9px;
  opacity: 0.6;
}

/* ==========================================================
   SHOP / CATALOG PAGE
   ========================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding-bottom: 40px;
}
.shop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.filter-widget-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-main);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
}
.filter-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-main);
}
.filter-checkbox-label input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.toggle-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.shop-main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.shop-sort-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}
.sort-options {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sort-item {
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}
.sort-item:hover, .sort-item.active {
  color: var(--primary);
  font-weight: 900;
}
.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}
.page-num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.page-num.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================
   PRODUCT DETAIL PAGE
   ========================================================== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 420px 1fr 320px;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}
.gallery-main {
  width: 100%;
  height: 380px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
}
.thumb-item {
  width: 70px;
  height: 70px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.thumb-item.active, .thumb-item:hover {
  border-color: var(--primary);
}
.thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-main-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
}
.product-en-title {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}
.product-rating-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.rating-stars {
  color: #f59e0b;
}
.color-picker-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.color-swatches {
  display: flex;
  gap: 10px;
}
.swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.swatch.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.2);
}
.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}
.features-list li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  display: inline-block;
  width: 14px;
}

/* BUY BOX (STICKY SIDEBAR) */
.buy-box {
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}
.buy-box-price {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.btn-add-cart-large {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(239, 57, 78, 0.3);
  transition: var(--transition);
}
.btn-add-cart-large:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* PRODUCT TABS */
.product-tabs-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 30px;
}
.tabs-nav {
  display: flex;
  gap: 24px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-main);
}

/* ==========================================================
   CART PAGE
   ========================================================== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding-bottom: 40px;
}
.cart-items-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.cart-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cart-item-img {
  width: 90px;
  height: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  gap: 12px;
  font-family: monospace;
  font-weight: 900;
}
.cart-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.summary-row.total {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.btn-checkout {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 4px 14px rgba(239, 57, 78, 0.3);
  transition: var(--transition);
}
.btn-checkout:hover {
  background: var(--primary-hover);
}

/* ==========================================================
   CHECKOUT PAGE
   ========================================================== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding-bottom: 40px;
}
.form-section-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.form-group input, .form-group textarea, .form-group select {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--border-light);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 12px;
}
.form-group input:focus {
  border-color: var(--primary);
}

/* ==========================================================
   DASHBOARD PAGE
   ========================================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding-bottom: 40px;
}
.dashboard-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}
.user-profile-widget {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 10px;
}
.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.dash-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: var(--transition);
}
.dash-link.active, .dash-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

/* RESPONSIVE ADDITIONS */
@media (max-width: 1024px) {
  .shop-layout { grid-template-columns: 1fr; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
}

/* ==========================================================
   MASTER COMMERCIAL E-COMMERCE STYLING (COMMERCE UI KIT)
   ========================================================== */

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--border-light);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- SKELETON SHIMMER LOADING --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* --- BADGES & TAGS --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.badge-discount {
  background: var(--primary);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(239, 57, 78, 0.35);
}
.badge-express {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
[data-theme="dark"] .badge-express {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}
.badge-original {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
[data-theme="dark"] .badge-original {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

/* STATUS BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.status-badge.processing {
  background: #fef3c7;
  color: #d97706;
}
[data-theme="dark"] .status-badge.processing {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
}
.status-badge.delivered {
  background: #dcfce7;
  color: #15803d;
}
[data-theme="dark"] .status-badge.delivered {
  background: rgba(21, 128, 61, 0.15);
  color: #4ade80;
}
.status-badge.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}
[data-theme="dark"] .status-badge.cancelled {
  background: rgba(185, 28, 28, 0.15);
  color: #f87171;
}

/* --- BUTTONS & CONTROLS --- */
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(239, 57, 78, 0.25);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239, 57, 78, 0.35);
  color: #ffffff;
}
.btn-secondary {
  background: var(--border-light);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--border);
  color: var(--text-main);
}
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-outline-primary:hover {
  background: var(--primary-light);
}

/* --- RANGE SLIDER (PRICE FILTER) --- */
.price-slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0;
}
.price-range-inputs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.price-box {
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
  text-align: center;
}
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(239, 57, 78, 0.4);
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* --- TOGGLE SWITCH --- */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: .3s;
  border-radius: 34px;
}
.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .slider-round {
  background-color: var(--primary);
}
input:checked + .slider-round:before {
  transform: translateX(18px);
}

/* --- QUANTITY STEPPER (CART & PRODUCT) --- */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.qty-btn:hover {
  background: var(--border-light);
  color: var(--primary);
}
.qty-val {
  width: 38px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  border: none;
  background: transparent;
}

/* --- PRODUCT DETAILS & SPECIFICATIONS TABLE --- */
.specs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 16px;
}
.specs-table tr {
  border-bottom: 1px solid var(--border-light);
}
.specs-table tr:nth-child(even) {
  background: var(--border-light);
}
.specs-table td {
  padding: 14px 18px;
  font-size: 12px;
}
.specs-table td.spec-title {
  width: 220px;
  color: var(--text-muted);
  font-weight: 700;
  border-left: 1px solid var(--border-light);
}
.specs-table td.spec-val {
  color: var(--text-main);
  font-weight: 800;
}

/* --- TRUST BADGES GRID --- */
.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.trust-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}
.trust-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--border-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* --- CHECKOUT PROCESS STEPPER --- */
.checkout-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto 36px;
  position: relative;
}
.checkout-stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  background: var(--bg-body);
  padding: 0 16px;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  transition: var(--transition);
}
.step-item.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-light);
}
.step-item.done .step-circle {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}
.step-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}
.step-item.active .step-text {
  color: var(--primary);
}

/* --- ADDRESS & SHIPPING CARDS --- */
.address-card, .shipping-option, .gateway-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
}
.address-card:hover, .shipping-option:hover, .gateway-card:hover {
  border-color: var(--primary);
}
.address-card.selected, .shipping-option.selected, .gateway-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
[data-theme="dark"] .address-card.selected, 
[data-theme="dark"] .shipping-option.selected, 
[data-theme="dark"] .gateway-card.selected {
  background: rgba(239, 57, 78, 0.08);
}

/* --- PROMO COUPON BOX --- */
.coupon-box {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.coupon-box input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
}
.coupon-box input:focus {
  border-color: var(--primary);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- RATINGS BREAKDOWN PROGRESS BAR --- */
.rating-breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}
.rating-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}
.rating-bar-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 999px;
}


/* ==========================================================
   MEGA MENU STYLES (DIGIKALA LEVEL)
   ========================================================== */
.category-menu-wrapper {
  position: relative;
  display: inline-block;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.category-btn:hover, .category-btn.active {
  color: var(--primary);
  background: var(--primary-light);
}
[data-theme="dark"] .category-btn:hover, [data-theme="dark"] .category-btn.active {
  background: rgba(239, 57, 78, 0.12);
}

.mega-menu-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 860px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 9999;
  overflow: hidden;
  animation: megaSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .mega-menu-dropdown {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

@keyframes megaSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-menu-dropdown.show {
  display: flex !important;
}

/* SIDEBAR TABS */
.mega-sidebar {
  width: 240px;
  background: var(--border-light);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 4px;
}
.mega-cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.mega-cat-item i:first-child {
  font-size: 16px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}
.mega-cat-item .arrow {
  margin-right: auto;
  font-size: 10px;
  opacity: 0;
  transition: var(--transition);
}
.mega-cat-item:hover, .mega-cat-item.active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.mega-cat-item:hover i:first-child, .mega-cat-item.active i:first-child {
  color: var(--primary);
}
.mega-cat-item:hover .arrow, .mega-cat-item.active .arrow {
  opacity: 1;
  color: var(--primary);
}

/* CONTENT AREA */
.mega-content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-height: 440px;
}
.mega-tab-panel {
  display: none;
}
.mega-tab-panel.active {
  display: block;
  animation: megaFadeIn 0.2s ease;
}
@keyframes megaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.mega-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mega-col-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-main);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mega-col-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}
.mega-col-title a:hover {
  color: var(--primary);
}
.mega-col-title i {
  font-size: 10px;
  color: var(--primary);
}
.mega-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: block;
}
.mega-link:hover {
  color: var(--primary);
  transform: translateX(-4px);
}
.mega-link-all {
  font-size: 12px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  margin-top: 6px;
  display: inline-block;
}


/* ==========================================================
   AUTHENTICATION & MY ACCOUNT STYLES
   ========================================================== */
.auth-page-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 16px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  position: relative;
}
[data-theme="dark"] .auth-card {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(239, 57, 78, 0.35);
}
.auth-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* AUTH TABS */
.auth-tabs-nav {
  display: flex;
  background: var(--border-light);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}
.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-tab-content {
  display: none;
}
.auth-tab-content.active {
  display: block;
  animation: authFadeIn 0.25s ease;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-field-group {
  margin-bottom: 18px;
}
.auth-field-group label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon i {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  padding: 12px 42px 12px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}
.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
[data-theme="dark"] .auth-input:focus {
  box-shadow: 0 0 0 3px rgba(239, 57, 78, 0.15);
}

.btn-auth-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(239, 57, 78, 0.3) !important;
  transition: var(--transition);
  margin-top: 10px;
}
.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 57, 78, 0.45) !important;
}

.auth-footer-terms {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
.auth-footer-terms a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* WOOCOMMERCE DASHBOARD OVERRIDES */
.woocommerce-MyAccount-navigation {
  float: right;
  width: 25%;
}
.woocommerce-MyAccount-content {
  float: left;
  width: 72%;
}
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
  background: var(--primary-light);
  color: var(--primary);
}
[data-theme="dark"] .woocommerce-MyAccount-navigation li.is-active a,
[data-theme="dark"] .woocommerce-MyAccount-navigation li a:hover {
  background: rgba(239, 57, 78, 0.12);
}
@media (max-width: 900px) {
  .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
  }
}


/* ==========================================================
   ADMIN MASTER PANEL & WP-ADMIN UPGRADES
   ========================================================== */
.admin-master-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}
.admin-master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-crown-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-admin-wp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(239, 57, 78, 0.35);
  transition: var(--transition);
}
.btn-admin-wp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(239, 57, 78, 0.5);
  color: #ffffff;
}
.admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.admin-action-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}
.admin-action-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #ffffff;
}
@media (max-width: 900px) {
  .admin-quick-actions { grid-template-columns: 1fr 1fr; }
}


/* ==========================================================
   ULTRA COMMERCIAL USER DASHBOARD STYLES
   ========================================================== */
.dash-master-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

/* SIDEBAR CARD */
.dash-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  position: relative;
}
.profile-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 14px;
}
.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 3px solid var(--border-light);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
}
.avatar-edit-badge:hover {
  transform: scale(1.15);
}
.profile-user-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 4px;
}
.profile-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}
[data-theme="dark"] .profile-user-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.profile-user-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* SIDEBAR NAVIGATION */
.dash-sidebar-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}
.dash-nav-item i {
  font-size: 15px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  transition: var(--transition);
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}
[data-theme="dark"] .dash-nav-item:hover, [data-theme="dark"] .dash-nav-item.active {
  background: rgba(239, 57, 78, 0.12);
}
.dash-nav-item:hover i, .dash-nav-item.active i {
  color: var(--primary);
}
.dash-nav-item.logout-link {
  color: #ef4444;
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.dash-nav-item.logout-link:hover {
  background: #fef2f2;
}
[data-theme="dark"] .dash-nav-item.logout-link:hover {
  background: rgba(239, 68, 68, 0.12);
}
.nav-badge-count {
  margin-right: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
}
.nav-badge-points {
  margin-right: auto;
  background: #fef3c7;
  color: #b45309;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
}
[data-theme="dark"] .nav-badge-points {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

/* 1. METRICS ROW */
.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition);
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.metric-card .metric-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.metric-card.wallet .metric-icon-box {
  background: #eff6ff;
  color: #2563eb;
}
[data-theme="dark"] .metric-card.wallet .metric-icon-box {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}
.metric-card.club .metric-icon-box {
  background: #fffbeb;
  color: #d97706;
}
[data-theme="dark"] .metric-card.club .metric-icon-box {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
}
.metric-card.coupon .metric-icon-box {
  background: #fff1f2;
  color: var(--primary);
}
[data-theme="dark"] .metric-card.coupon .metric-icon-box {
  background: rgba(239, 57, 78, 0.15);
  color: #ff6b7b;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.metric-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
}
.metric-value small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.metric-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
}
.metric-btn-action:hover {
  background: var(--primary-hover);
  color: #ffffff;
}
.metric-btn-action.secondary {
  background: var(--border-light);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.metric-btn-action.secondary:hover {
  background: var(--border);
}

/* 2. DASH CARD */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

/* 3. ORDER PIPELINE */
.orders-pipeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 0;
  position: relative;
}
.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  z-index: 2;
}
.pipeline-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  transition: var(--transition);
  border: 2px solid var(--border);
}
.pipeline-step.active .pipeline-icon {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 6px rgba(239, 57, 78, 0.12);
}
.pipeline-step.done .pipeline-icon {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #16a34a;
}
[data-theme="dark"] .pipeline-step.done .pipeline-icon {
  background: rgba(22, 163, 74, 0.15);
}
.pipeline-count {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pipeline-count.done {
  background: #16a34a;
}
.pipeline-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}
.pipeline-subtitle {
  font-size: 10px;
  color: var(--text-muted);
}
.pipeline-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: -24px 8px 0;
  z-index: 1;
}
.pipeline-connector.active {
  background: var(--primary);
}

/* 4. ORDER ITEMS PREVIEW CARD */
.order-items-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--border-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.order-product-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-product-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.item-qty-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-main);
  color: var(--bg-card);
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-product-details {
  flex: 1;
}
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

@media (max-width: 1024px) {
  .dash-master-layout { grid-template-columns: 1fr; }
  .dash-metrics-grid { grid-template-columns: 1fr; }
  .orders-pipeline-row { flex-wrap: wrap; gap: 16px; }
  .pipeline-connector { display: none; }
}


/* ==========================================================
   ENHANCED MASTER DASHBOARD V4 (MERGED & CLUTTER-FREE)
   ========================================================== */
.dash-master-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}

/* SIDEBAR CARD */
.dash-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 20px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  position: relative;
  transition: var(--transition);
}
.dash-profile-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}
.profile-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
}
.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  border: 3px solid var(--border-light);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}
.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.avatar-edit-badge:hover {
  transform: scale(1.15);
}
.profile-user-name {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
}
.profile-user-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}
[data-theme="dark"] .profile-user-badge-verified {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.profile-user-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: rtl;
}

/* SIDEBAR NAVIGATION */
.dash-sidebar-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
}
.dash-nav-item i {
  font-size: 16px;
  color: var(--text-muted);
  width: 22px;
  text-align: center;
  transition: var(--transition);
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}
[data-theme="dark"] .dash-nav-item:hover, [data-theme="dark"] .dash-nav-item.active {
  background: rgba(239, 57, 78, 0.14);
}
.dash-nav-item:hover i, .dash-nav-item.active i {
  color: var(--primary);
}
.dash-nav-item.logout-link {
  color: #ef4444;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.dash-nav-item.logout-link:hover {
  background: #fef2f2;
}
[data-theme="dark"] .dash-nav-item.logout-link:hover {
  background: rgba(239, 68, 68, 0.12);
}
.nav-badge-count {
  margin-right: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
}

/* 4 METRICS GRID */
.dash-metrics-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.metric-card-modern:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.metric-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.metric-icon-bubble.blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}
.metric-icon-bubble.emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.metric-icon-bubble.amber {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.metric-icon-bubble.rose {
  background: rgba(239, 57, 78, 0.1);
  color: var(--primary);
}
.metric-body {
  display: flex;
  flex-direction: column;
}
.metric-title-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.metric-num-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}
.metric-num-val small {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 2px;
}

/* ACTIVE ORDER TRACKER CARD */
.active-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.active-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.active-order-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pulse-indicator {
  position: relative;
  width: 12px;
  height: 12px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}
.pulse-indicator::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.45, 0, 0.55, 1);
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* 4-STEP PIPELINE */
.stepper-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  margin: 28px 0 32px;
}
.stepper-pipeline::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 12%;
  left: 12%;
  height: 4px;
  background: var(--border-light);
  z-index: 1;
}
.stepper-node {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stepper-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.stepper-node.completed .stepper-circle {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.stepper-node.active .stepper-circle {
  background: var(--primary);
  border-color: #fee2e2;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(239, 57, 78, 0.2);
  animation: active-glow 2s infinite ease-in-out;
}
@keyframes active-glow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(239, 57, 78, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(239, 57, 78, 0.4); }
}
.stepper-node .step-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}
.stepper-node .step-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* PRODUCT PREVIEW BOX IN ACTIVE ORDER */
.order-product-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle, rgba(0,0,0,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
[data-theme="dark"] .order-product-strip {
  background: rgba(255,255,255,0.03);
}
.order-prod-thumb-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.order-prod-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
}
.order-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ORDERS HISTORY TABLE / CARDS */
.orders-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
  padding-bottom: 2px;
}
.orders-filter-tab {
  padding: 10px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: var(--transition);
  position: relative;
}
.orders-filter-tab:hover {
  color: var(--primary);
}
.orders-filter-tab.active {
  color: var(--primary);
}
.orders-filter-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.order-history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bg-card);
  transition: var(--transition);
}
.order-history-item:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .dash-master-layout { grid-template-columns: 1fr; }
  .dash-metrics-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dash-metrics-grid-4 { grid-template-columns: 1fr; }
  .stepper-pipeline { grid-template-columns: 1fr; gap: 16px; }
  .stepper-pipeline::before { display: none; }
  .stepper-node { flex-direction: row; gap: 14px; text-align: right; }
}


/* ==========================================================
   MEGA MENU HOVER, COLOR SWATCHES & TABS EXTENSIONS
   ========================================================== */
.category-dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.category-dropdown-wrapper:hover .mega-menu-dropdown {
  display: flex !important;
}

a.product-card {
  text-decoration: none;
  color: inherit;
  display: flex;
}
a.product-card:hover {
  text-decoration: none;
}
a.product-card .product-title {
  color: var(--text-main);
}

.product-color-swatches-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.product-color-swatch {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-color-swatch.black {
  background: #0f172a;
  border: 2px solid #334155;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.product-color-swatch.white {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.product-color-swatch.active {
  transform: scale(1.15);
}
.product-color-swatch.active.black,
.product-color-swatch.active.white {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239, 57, 78, 0.4);
}
.product-color-swatch .swatch-check {
  font-size: 13px;
  display: none;
}
.product-color-swatch.active .swatch-check {
  display: block;
}
.product-color-swatch.black .swatch-check {
  color: #ffffff;
}
.product-color-swatch.white .swatch-check {
  color: #0f172a;
}

/* SPECS TABLE */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.specs-table tr {
  border-bottom: 1px solid var(--border-light);
}
.specs-table td {
  padding: 14px 16px;
}
.specs-table td.spec-name {
  width: 220px;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-subtle, rgba(0,0,0,0.015));
}
.specs-table td.spec-val {
  font-weight: 700;
  color: var(--text-main);
}



/* =======================================================
   NEXUS MODALS, INVOICE PRINT & TOAST STYLING
   ======================================================= */
.nexus-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
}
.nexus-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 560px;
  padding: 24px;
  position: relative;
  animation: modalFadeIn 0.25s ease-out;
}
.nexus-modal-box.invoice-box {
  max-width: 820px;
  padding: 0;
  background: #fff;
  color: #1e293b;
  overflow: hidden;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.invoice-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}
.invoice-paper {
  padding: 32px 36px;
  background: #ffffff;
  color: #0f172a;
  font-family: 'Dana', 'Vazirmatn', sans-serif;
  line-height: 1.6;
}
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ef394e;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.invoice-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.invoice-logo {
  width: 44px;
  height: 44px;
  background: #ef394e;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.invoice-brand h2 {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
  color: #0f172a;
}
.invoice-brand span {
  font-size: 11px;
  color: #64748b;
}
.invoice-meta-head {
  text-align: left;
  direction: ltr;
}
.invoice-meta-head h3 {
  font-size: 15px;
  font-weight: 900;
  color: #ef394e;
  margin: 0 0 8px;
  text-align: right;
  direction: rtl;
}
.invoice-meta-head .meta-row {
  font-size: 12px;
  color: #475569;
  margin-bottom: 2px;
  text-align: right;
  direction: rtl;
}
.invoice-meta-head .meta-row strong {
  color: #0f172a;
  margin-right: 6px;
}
.invoice-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 12px;
}
.invoice-parties-grid h4 {
  font-size: 13px;
  font-weight: 900;
  margin: 0 0 10px;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 6px;
}
.invoice-parties-grid p {
  margin: 0 0 6px;
  color: #334155;
  line-height: 1.6;
}
.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 12px;
}
.invoice-items-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 12px;
  text-align: right;
  font-weight: 800;
}
.invoice-items-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}
.invoice-totals-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
.digital-seal {
  border: 2px dashed #059669;
  border-radius: 12px;
  padding: 14px;
  background: #f0fdf4;
  text-align: center;
  display: inline-block;
}
.invoice-summary-table {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 12px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #475569;
}
.summary-line.total-due {
  border-top: 2px solid #0f172a;
  padding-top: 10px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 900;
  color: #ef394e;
}
.nexus-toast-msg {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-right: 4px solid #10b981;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 9999999;
  display: none;
  animation: toastIn 0.3s ease;
}
.nexus-toast-msg.show {
  display: block;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

button.sort-item {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
  transition: var(--transition);
}
button.sort-item:hover, button.sort-item.active {
  color: var(--primary);
  background: rgba(239, 57, 78, 0.08);
  font-weight: 900;
}

@media print {
  body * {
    visibility: hidden;
  }
  #nexusInvoiceModal, #nexusInvoiceModal * {
    visibility: visible;
  }
  #nexusInvoiceModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: none;
    padding: 0;
  }
  .no-print {
    display: none !important;
  }
  .invoice-box {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
  }
}


/* ==========================================================
   PERFECTED PRODUCT DETAIL, GALLERY & INCREDIBLE 4-GRID FIXES
   ========================================================== */

/* 1. PRODUCT DETAIL PAGE (3-COLUMN SHOWCASE) */
.product-showcase-grid {
  display: grid;
  grid-template-columns: 380px 1fr 340px;
  gap: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 30px;
  align-items: start;
}

.product-gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-main-img-wrap {
  width: 100%;
  height: 350px;
  max-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.gallery-main-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.thumb-item {
  width: 68px;
  height: 68px;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  background: #ffffff;
  transition: var(--transition);
}

.thumb-item.active, .thumb-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(239, 57, 78, 0.15);
}

.thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.buy-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* 2. INCREDIBLE DEALS EXACT 4-COLUMN ROW */
.incredible-box {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: center;
}

.incredible-products-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 14px !important;
}

.incredible-products-grid .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.06);
}

/* 3. PRODUCT CARDS IMAGE SIZING (NEVER HUGE) */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-light);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.product-img-wrap {
  width: 100% !important;
  height: 160px !important;
  max-height: 160px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 12px !important;
  background: #ffffff !important;
  border-radius: var(--radius-md) !important;
  padding: 8px !important;
  overflow: hidden !important;
}

.product-img-wrap img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  transition: transform 0.3s ease !important;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.05) !important;
}

/* 4. MEGA MENU HOVER & CLICK UNIFORMITY */
.category-dropdown-wrapper {
  position: relative !important;
  display: inline-block !important;
}

.category-dropdown-wrapper:hover .mega-menu-dropdown,
.category-dropdown-wrapper .mega-menu-dropdown.show {
  display: flex !important;
}

@media (max-width: 1100px) {
  .product-showcase-grid {
    grid-template-columns: 340px 1fr;
  }
  .buy-box {
    grid-column: 1 / -1;
  }
  .incredible-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .product-showcase-grid {
    grid-template-columns: 1fr;
  }
  .gallery-main-img-wrap {
    height: 280px;
  }
  .incredible-box {
    grid-template-columns: 1fr;
  }
  .incredible-products-grid {
    grid-template-columns: 1fr !important;
  }
}


.btn-card-add-cart {
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--primary, #ef394e);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 57, 78, 0.25);
  font-family: inherit;
}
.btn-card-add-cart:hover {
  background: #dc2626;
  transform: translateY(-1px);
}


/* ==========================================================
   COMPACT & SCROLLABLE TAX INVOICE MODAL (FIXED SIZE & EASY CLOSE)
   ========================================================== */
#nexusInvoiceModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  padding: 14px;
  overflow: hidden;
}

.nexus-modal-box.invoice-box {
  max-width: 680px !important;
  width: 95% !important;
  max-height: 86vh !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  border-radius: 18px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden !important;
  position: relative !important;
  animation: modalFadeIn 0.25s ease-out !important;
}

.invoice-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 18px !important;
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  flex-shrink: 0 !important;
}

.invoice-toolbar .btn-close-invoice {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 7px 16px !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
  transition: all 0.2s ease !important;
}
.invoice-toolbar .btn-close-invoice:hover {
  background: #dc2626 !important;
  transform: translateY(-1px) !important;
}

.invoice-paper {
  padding: 18px 22px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-family: 'Dana', 'Vazirmatn', -apple-system, sans-serif !important;
  line-height: 1.5 !important;
  overflow-y: auto !important;
  max-height: calc(86vh - 55px) !important;
  flex: 1 !important;
}

.invoice-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 2px solid #ef394e !important;
  padding-bottom: 12px !important;
  margin-bottom: 14px !important;
}

.invoice-logo {
  width: 36px !important;
  height: 36px !important;
  background: #ef394e !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
}

.invoice-brand h2 {
  font-size: 14px !important;
  font-weight: 900 !important;
  margin: 0 !important;
  color: #0f172a !important;
}

.invoice-brand span {
  font-size: 10px !important;
  color: #64748b !important;
}

.invoice-meta-head h3 {
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #ef394e !important;
  margin: 0 0 4px !important;
}

.invoice-meta-head .meta-row {
  font-size: 11px !important;
  color: #475569 !important;
  margin-bottom: 2px !important;
}

.invoice-parties-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  margin-bottom: 14px !important;
  font-size: 11px !important;
}

.invoice-parties-grid h4 {
  font-size: 11px !important;
  font-weight: 900 !important;
  margin: 0 0 6px !important;
  color: #0f172a !important;
  border-bottom: 1px solid #cbd5e1 !important;
  padding-bottom: 4px !important;
}

.invoice-parties-grid p {
  margin: 0 0 4px !important;
  color: #334155 !important;
  line-height: 1.5 !important;
  font-size: 10.5px !important;
}

.invoice-items-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-bottom: 14px !important;
  font-size: 11px !important;
}

.invoice-items-table th {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 7px 10px !important;
  text-align: right !important;
  font-weight: 800 !important;
  font-size: 11px !important;
}

.invoice-items-table td {
  padding: 7px 10px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  font-size: 11px !important;
}

.invoice-totals-grid {
  display: grid !important;
  grid-template-columns: 1fr 1.2fr !important;
  gap: 14px !important;
  align-items: start !important;
}

.digital-seal {
  border: 2px dashed #059669 !important;
  border-radius: 10px !important;
  padding: 8px !important;
  background: #f0fdf4 !important;
  text-align: center !important;
  display: inline-block !important;
}

.invoice-summary-table {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 11px !important;
}

.summary-line {
  display: flex !important;
  justify-content: space-between !important;
  margin-bottom: 5px !important;
  color: #475569 !important;
  font-size: 11px !important;
}

.summary-line.total-due {
  border-top: 2px solid #0f172a !important;
  padding-top: 8px !important;
  margin-top: 8px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #ef394e !important;
}

@media (max-width: 640px) {
  .invoice-parties-grid {
    grid-template-columns: 1fr !important;
  }
  .invoice-totals-grid {
    grid-template-columns: 1fr !important;
  }
  .nexus-modal-box.invoice-box {
    max-height: 92vh !important;
    width: 98% !important;
  }
  .invoice-paper {
    padding: 12px !important;
  }
}




.btn-installment-digikala {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  border-radius: var(--radius-md) !important;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
  color: #ffffff !important;
  border: 1px solid #4338ca !important;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(49, 46, 129, 0.25) !important;
  transition: all 0.25s ease !important;
}
.btn-installment-digikala:hover {
  background: linear-gradient(135deg, #312e81 0%, #3730a3 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(49, 46, 129, 0.35) !important;
}


/* ==============================================================
   DIGIKALA-STYLE INSTALLMENT PROMO CARD (REPLACES PLUS CARD)
   ============================================================== */
.product-installment-banner-card {
  margin-top: 24px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .product-installment-banner-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.product-installment-banner-card:hover {
  border-color: #a855f7;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.08);
}

.installment-banner-main {
  flex: 1;
  min-width: 0;
}

.installment-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.installment-sparkle-icon {
  color: #9333ea;
  font-size: 16px;
}

.installment-banner-title {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text-main, #0f172a);
}

.installment-conditions-list {
  list-style: none;
  margin: 0 0 14px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.installment-conditions-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}

.condition-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a855f7;
  flex-shrink: 0;
}

.installment-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #0284c7;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.installment-banner-link:hover {
  color: #0369a1;
  gap: 9px;
}

.installment-banner-link i {
  font-size: 10px;
}

.installment-banner-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .product-installment-banner-card {
    flex-direction: column;
    align-items: stretch;
  }
  .installment-banner-visual {
    justify-content: center;
    margin-top: 10px;
  }
}



/* REMOVE FLOATING BACK TO TOP & HIDE ADD TO CART BUTTONS ON PRODUCT CARDS */
.floating-back-to-top, #floatingBackToTop {
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 14px !important;
  background: var(--primary, #ef394e) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(239, 57, 78, 0.45) !important;
  cursor: pointer !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-family: 'Dana', 'Vazirmatn', sans-serif !important;
}
.floating-back-to-top:hover, #floatingBackToTop:hover {
  transform: translateY(-4px) scale(1.06) !important;
  box-shadow: 0 10px 25px rgba(239, 57, 78, 0.6) !important;
}

.btn-card-add-cart {
  display: none !important;
}

.product-card {
  cursor: pointer !important;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}



/* DIGIKALA-STYLE CIRCULAR COLOR SWATCHES (MATCH IMAGE 1) */
.product-color-swatches-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.product-color-swatch {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  padding: 2px !important;
  background: #ffffff !important;
  border: 1.5px solid #d1d5db !important; /* Inactive light gray outer ring */
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
  outline: none;
}

[data-theme="dark"] .product-color-swatch {
  background: #1e293b !important;
  border-color: #475569 !important;
}

.product-color-swatch:hover {
  border-color: #94a3b8 !important;
  transform: scale(1.05);
}

.product-color-swatch.active {
  border: 2.5px solid #0070f3 !important; /* Vivid Blue outer ring */
  box-shadow: 0 0 0 2px rgba(0, 112, 243, 0.2) !important;
}

/* Inner colored dot */
.product-color-swatch .swatch-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

/* Checkmark inside active dot */
.product-color-swatch .swatch-check-icon {
  display: none;
  font-size: 11px;
  color: #ffffff;
}

.product-color-swatch.active .swatch-check-icon {
  display: block;
}

/* If color is white or bright */
.product-color-swatch[data-color-hex="#ffffff"] .swatch-check-icon,
.product-color-swatch[data-color-hex="white"] .swatch-check-icon {
  color: #0f172a !important;
}



/* ==============================================================
   NEXUS 2026: ENHANCED ANCHOR SCROLLING & BRAND SHOWCASE & STOCK MODAL
   ============================================================== */
#incredible, #bestsellers, #brands, #club, #categories, #blog,
.incredible-section, .catalog-section, .brands-section, .club-section {
  scroll-margin-top: 140px !important;
}

/* Glowing Story Category Rings */
.story-ring-glow {
  background: linear-gradient(135deg, #ef394e, #ec4899, #8b5cf6) !important;
  box-shadow: 0 4px 14px rgba(239, 57, 78, 0.28);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.story-item:hover .story-ring-glow {
  transform: scale(1.12) rotate(3deg);
  box-shadow: 0 8px 24px rgba(239, 57, 78, 0.45);
}

/* Modern Brand Showcase Cards */
.brand-showcase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.brand-showcase-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-glow, var(--primary));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1), 0 0 16px var(--brand-glow-subtle, rgba(239, 57, 78, 0.15));
}
.brand-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}
.brand-showcase-card:hover .brand-logo-wrap {
  transform: scale(1.1);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.brand-name {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--text-main);
}
.brand-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Out of Stock Styling */
.badge-outofstock-overlay {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}
.outofstock-box-card {
  background: rgba(239, 68, 68, 0.06);
  border: 1.5px dashed #ef4444;
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 16px;
}
.btn-stock-notify {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 900;
  font-size: 14.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
  transition: all 0.25s ease;
}
.btn-stock-notify:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

/* Modal for Stock Notification */
.stock-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.stock-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  padding: 26px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  direction: rtl;
  text-align: right;
  position: relative;
  font-family: 'Dana', 'Vazirmatn', sans-serif;
  animation: nexusModalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes nexusModalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}


/* --- BRAND PILLS ACTIVE & INTERACTION --- */
.brand-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 10px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.brand-pills::-webkit-scrollbar {
  display: none;
}
.brand-pill {
  cursor: pointer !important;
  padding: 8px 18px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  background: var(--bg-card, #ffffff) !important;
  color: var(--text-muted, #64748b) !important;
  border: 1.5px solid var(--border, #e2e8f0) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  outline: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  user-select: none !important;
}
.brand-pill:hover {
  border-color: #ef394e !important;
  color: #ef394e !important;
  background: rgba(239, 57, 78, 0.06) !important;
  transform: translateY(-1px);
}
.brand-pill.active {
  background: #ef394e !important;
  color: #ffffff !important;
  border-color: #ef394e !important;
  box-shadow: 0 4px 14px rgba(239, 57, 78, 0.38) !important;
  transform: translateY(-1px);
}
@keyframes fadeInBestsellerCard {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.catalog-grid .product-card.catalog-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
