/* ==========================================================================
   فروشگاه اینترنتی کتاب «ظهیری استور» (Zahiri Store)
   استایل‌های مدرن با فونت وزیرمتن و طراحی اختصاصی راست‌چین (RTL)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-main: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* رنگ‌بندی برند ظهیری استور */
  --primary: #1e293b;
  --primary-dark: #0f172a;
  --primary-light: #334155;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-light: #fef3c7;
  --secondary: #059669;
  --secondary-hover: #047857;
  --secondary-light: #ecfdf5;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  direction: rtl;
  text-align: right;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button {
  font-family: var(--font-main);
  border: none;
  outline: none;
  cursor: pointer;
  background: none;
  transition: var(--transition);
}

input, select, textarea {
  font-family: var(--font-main);
  direction: rtl;
  text-align: right;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }
}

/* --------------------------------------------------------------------------
   Top Notification Bar
   -------------------------------------------------------------------------- */
.top-bar {
  background: linear-gradient(90deg, #1e1b4b, #312e81, #1e1b4b);
  color: #fbbf24;
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
  font-weight: 500;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.top-bar-notice span.badge-pill {
  background-color: #f59e0b;
  color: #1e1b4b;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 11px;
}

.top-bar-contact {
  display: none;
  gap: 15px;
  font-size: 12px;
  color: #cbd5e1;
}

@media (min-width: 768px) {
  .top-bar-contact {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f59e0b;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.logo-title span {
  color: var(--accent);
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Search Bar */
.search-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 16px;
  transition: var(--transition);
}

.search-input-box:focus-within {
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.search-input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  color: var(--text-main);
}

.search-icon {
  color: var(--text-muted);
  font-size: 16px;
}

.search-clear-btn {
  color: var(--text-light);
  display: none;
  padding: 4px;
}

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

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-track {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-track:hover {
  background-color: #e2e8f0;
  color: var(--primary-dark);
}

.btn-cart {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  position: relative;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
}

.btn-cart:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  transform: translateY(-1px);
}

.cart-badge {
  background-color: #ef4444;
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Navigation Links Bar */
.nav-subbar {
  border-top: 1px solid var(--border-light);
  background-color: #fafbfc;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
}

.category-nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.category-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  background-color: transparent;
  transition: var(--transition);
}

.category-tab-btn:hover {
  color: var(--primary-dark);
  background-color: #e2e8f0;
}

.category-tab-btn.active {
  background-color: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.nav-extra-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-extra-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   ریسپانسیو هدر و ناوبری در موبایل و تبلت (Mobile & Tablet Header)
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .top-bar {
    padding: 6px 0;
  }

  .top-bar-inner {
    flex-direction: column;
    gap: 4px;
  }
  
  .top-bar-notice {
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  .top-bar-notice span.badge-pill {
    font-size: 10px;
    padding: 1px 7px;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .header-main {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .brand-logo {
    order: 1;
    gap: 8px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 17px;
    border-radius: 9px;
  }

  .logo-title {
    font-size: 17px;
  }

  .logo-subtitle {
    display: none; /* مخفی‌سازی زیرعنوان در موبایل جهت جلوگیری از فشردگی */
  }

  .header-actions {
    order: 2;
    margin-right: auto; /* در راست‌چین المان‌ها را به سمت چپ هدر هدایت می‌کند */
    gap: 6px;
  }

  .action-btn {
    padding: 7px 10px;
    font-size: 13px;
    border-radius: var(--radius-sm);
  }

  /* مخفی‌سازی متون دکمه‌ها و نمایش آیکون در موبایل */
  .action-btn span:not(.cart-badge) {
    display: none;
  }

  #openOrdersHistoryBtn {
    display: none; /* در نوار ناوبری پایین صفحه موبایل موجود است */
  }

  .btn-cart {
    padding: 7px 12px;
  }

  .search-wrapper {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  .search-input-box {
    padding: 3px 12px;
    border-radius: var(--radius-md);
  }

  .search-input {
    font-size: 13px;
    padding: 6px 8px;
  }

  /* نوار اسکرول افقی دسته‌بندی‌ها */
  .nav-subbar {
    padding: 8px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-subbar::-webkit-scrollbar {
    display: none;
  }

  .category-nav-list {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .category-tab-btn {
    padding: 5px 12px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .nav-extra-links {
    display: none; /* مخفی‌سازی لینک‌های متنی در موبایل برای حفظ نظم اسکرول */
  }
}

/* --------------------------------------------------------------------------
   Hero Banner Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 28px 0;
}

.hero-banner-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #172554 50%, #0f172a 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-banner-card {
    grid-template-columns: 1.3fr 1fr;
    padding: 48px;
  }
}

@media (max-width: 640px) {
  .hero-banner-card {
    padding: 22px 18px;
    gap: 20px;
    border-radius: var(--radius-md);
  }
  .hero-title {
    font-size: 22px;
  }
  .hero-desc {
    font-size: 13.5px;
    margin-bottom: 18px;
  }
  .btn-primary-hero, .btn-outline-hero {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13.5px;
  }
}

.hero-decor-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0) 70%);
  top: -100px;
  left: -100px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero-title span {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.hero-desc {
  font-size: 15px;
  color: #cbd5e1;
  margin-bottom: 24px;
  max-width: 520px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary-hero {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.btn-primary-hero:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-2px);
}

.btn-outline-hero {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.btn-outline-hero:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Hero Visual / Realistic Stack of Books */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-book-showcase {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  perspective: 1000px;
}

.hero-book-card {
  width: 140px;
  height: 200px;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -8px 12px 25px rgba(0, 0, 0, 0.45);
  border-left: 5px solid rgba(0, 0, 0, 0.35);
  transform: rotateY(-10deg) rotateZ(-3deg);
  transition: var(--transition);
}

.hero-book-card:hover {
  transform: translateY(-10px) rotateY(-5deg) scale(1.04);
}

.hero-book-card:nth-child(2) {
  transform: rotateY(-5deg) rotateZ(2deg) scale(1.08);
  z-index: 2;
}

.hero-book-card:nth-child(3) {
  transform: rotateY(-12deg) rotateZ(-6deg) scale(0.95);
  display: none;
}

@media (min-width: 600px) {
  .hero-book-card:nth-child(3) {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   Value Propositions / Benefits
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.feature-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.feature-cod {
  background-color: #ecfdf5;
  color: #059669;
}

.feature-fast {
  background-color: #eff6ff;
  color: #2563eb;
}

.feature-guarantee {
  background-color: #fef3c7;
  color: #d97706;
}

.feature-support {
  background-color: #f5f3ff;
  color: #7c3aed;
}

.feature-texts h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.feature-texts p {
  font-size: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Section Headers & Controls
   -------------------------------------------------------------------------- */
.section-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-indicator {
  width: 5px;
  height: 24px;
  background-color: var(--accent);
  border-radius: 4px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Book Cards & Catalog Grid (ویترین کتاب‌ها: ۴ ستون در دسکتاپ، ۳ در لپ‌تاپ/تبلت)
   -------------------------------------------------------------------------- */
.books-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

@media (min-width: 480px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .books-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.book-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.book-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background-color: #ef4444;
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

/* Realistic Book Cover Visual */
.book-cover-container {
  width: 100%;
  height: 210px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 600px;
  cursor: pointer;
  background-color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 10px;
}

.book-3d {
  width: 125px;
  height: 180px;
  border-radius: 4px 9px 9px 4px;
  position: relative;
  box-shadow: -6px 8px 16px rgba(0, 0, 0, 0.22);
  border-left: 4px solid rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  transition: var(--transition);
  overflow: hidden;
}

.book-cover-container:hover .book-3d {
  transform: rotateY(-8deg) scale(1.03);
  box-shadow: -10px 14px 22px rgba(0, 0, 0, 0.3);
}

.book-spine-line {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.15), rgba(0,0,0,0.02));
}

.book-cover-pub {
  font-size: 9px;
  font-weight: 700;
  opacity: 0.8;
  letter-spacing: 0.2px;
}

.book-cover-body {
  text-align: center;
}

.book-cover-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 4px;
}

.book-cover-author {
  font-size: 10px;
  opacity: 0.85;
}

.book-cover-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  opacity: 0.7;
}

/* Book Details in Card */
.book-category {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.book-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.4;
  margin-bottom: 4px;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-title:hover {
  color: var(--accent);
}

.book-author {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-rating-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.rating-stars {
  color: #f59e0b;
  display: flex;
  gap: 1px;
}

/* Pricing */
.book-price-box {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.price-values {
  display: flex;
  flex-direction: column;
}

.original-price {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
}

.final-price {
  font-size: 17px;
  font-weight: 900;
  color: var(--primary-dark);
}

.final-price span.currency {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 3px;
}

.discount-badge-percent {
  background-color: var(--danger-light);
  color: var(--danger);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
}

/* Card Action Buttons */
.book-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn-add-to-cart {
  background-color: var(--primary-dark);
  color: #ffffff;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-add-to-cart:hover {
  background-color: var(--accent);
}

.btn-quick-view {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 1px solid var(--border-color);
}

.btn-quick-view:hover {
  background-color: #e2e8f0;
  color: var(--primary-dark);
}

/* Empty State */
.no-results-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.no-results-icon {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Cash on Delivery Notice Banner (اعلان پرداخت در محل)
   -------------------------------------------------------------------------- */
.cod-banner {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-md);
}

.cod-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cod-icon-large {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #34d399;
  flex-shrink: 0;
}

.cod-texts h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.cod-texts p {
  font-size: 13.5px;
  color: #a7f3d0;
  max-width: 600px;
}

.cod-badges-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cod-badge-item {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 32px;
  margin-bottom: 48px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fafbfc;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

.faq-question:hover {
  background-color: var(--bg-subtle);
}

.faq-answer {
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  margin-top: auto;
  border-top: 1px solid #1e293b;
  padding-top: 50px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1e293b;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-brand h3 span {
  color: var(--accent);
}

.footer-brand p {
  font-size: 13.5px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.footer-social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 36px;
  height: 36px;
  background-color: #1e293b;
  color: #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.social-btn:hover {
  background-color: var(--accent);
  color: #ffffff;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.footer-links-list a:hover {
  color: #fbbf24;
  padding-right: 4px;
}

.footer-trust-badge {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.trust-icon {
  font-size: 32px;
  color: #38bdf8;
  margin-bottom: 8px;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   Cart Drawer (کشوی سبد خرید)
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background-color: var(--bg-card);
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
}

.drawer-close-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--danger);
}

/* Free Shipping Notice in Cart */
.cart-free-shipping-box {
  background-color: #f0fdf4;
  border-bottom: 1px solid #dcfce7;
  padding: 12px 20px;
  font-size: 12.5px;
  color: #166534;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background-color: #bbf7d0;
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: #16a34a;
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* Cart Items Body */
.cart-items-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-empty-state {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
}

.cart-empty-icon {
  font-size: 54px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.cart-item-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  position: relative;
}

.cart-item-book-mini {
  width: 55px;
  height: 80px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  padding: 4px;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: -2px 3px 6px rgba(0, 0, 0, 0.15);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.35;
  margin-bottom: 4px;
}

.cart-item-author {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.cart-qty-counter {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
}

.qty-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-main);
}

.qty-btn:hover {
  background-color: #e2e8f0;
}

.qty-num {
  width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
}

.cart-item-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-dark);
}

.cart-item-remove-btn {
  color: var(--text-light);
  font-size: 14px;
  padding: 4px;
}

.cart-item-remove-btn:hover {
  color: var(--danger);
}

/* Cart Footer */
.drawer-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border-color);
  background-color: #fafbfc;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cart-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-dark);
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  margin-bottom: 16px;
}

.btn-proceed-checkout {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  padding: 13px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-proceed-checkout:hover {
  background: linear-gradient(135deg, #047857, #065f46);
}

/* --------------------------------------------------------------------------
   Checkout Modal (فرم ثبت سفارش با پرداخت در محل)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-backdrop.active .modal-window {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafbfc;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 24px;
}

/* Form Styles */
.form-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (min-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.form-label span.req {
  color: var(--danger);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.form-textarea {
  min-height: 75px;
  resize: vertical;
}

/* Payment Method Card */
.payment-method-card {
  background-color: #ecfdf5;
  border: 2px solid #059669;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 18px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.payment-radio {
  accent-color: #059669;
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.payment-texts h5 {
  font-size: 14.5px;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.payment-texts p {
  font-size: 12.5px;
  color: #047857;
  line-height: 1.6;
}

/* Order Summary Box inside Checkout */
.checkout-summary-box {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-dark);
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.btn-submit-order {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-submit-order:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Order Success & Printable Invoice
   -------------------------------------------------------------------------- */
.order-success-card {
  text-align: center;
  padding: 10px 0;
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  background-color: #ecfdf5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 16px;
  border: 4px solid #a7f3d0;
}

.tracking-code-banner {
  background: linear-gradient(135deg, #1e1b4b, #172554);
  color: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tracking-code-val {
  font-family: monospace;
  font-size: 20px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 2px;
}

.btn-copy-code {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.btn-copy-code:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Invoice Box */
.printable-invoice {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: right;
  margin: 20px 0;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.invoice-table th, .invoice-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}

.invoice-table th {
  background-color: var(--bg-subtle);
  font-weight: 700;
}

.invoice-footer-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.invoice-stamp {
  border: 2px dashed #059669;
  color: #059669;
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 12px;
  transform: rotate(-6deg);
}

.success-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 500px) {
  .success-actions-row {
    flex-direction: row;
  }
}

.btn-whatsapp-share {
  flex: 1;
  background-color: #25d366;
  color: #ffffff;
  padding: 11px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-whatsapp-share:hover {
  background-color: #1eb956;
}

.btn-print-invoice {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-print-invoice:hover {
  background-color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Order Tracking Timeline Modal
   -------------------------------------------------------------------------- */
.tracking-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
  position: relative;
  padding-right: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 11px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-marker {
  position: absolute;
  right: -28px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-light);
  z-index: 2;
}

.timeline-step.completed .step-marker {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
}

.timeline-step.active .step-marker {
  background-color: #d97706;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.2);
}

.step-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
}

.step-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Quick View Modal
   -------------------------------------------------------------------------- */
.quickview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 650px) {
  .quickview-grid {
    grid-template-columns: 200px 1fr;
  }
}

.quickview-meta-table {
  width: 100%;
  font-size: 13px;
  margin: 14px 0;
}

.quickview-meta-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.quickview-meta-table td:first-child {
  color: var(--text-muted);
  width: 90px;
}

.quickview-meta-table td:last-child {
  font-weight: 600;
  color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background-color: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
  max-width: 340px;
  border-right: 4px solid var(--accent);
}

.toast.toast-success {
  border-right-color: #10b981;
}

.toast.toast-error {
  border-right-color: #ef4444;
}

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

/* --------------------------------------------------------------------------
   Mobile Bottom Navigation Bar
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 90;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  gap: 3px;
  position: relative;
  flex: 1;
  height: 100%;
}

.mobile-nav-item i {
  font-size: 18px;
}

.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-cart-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  background-color: var(--danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  border-radius: var(--radius-full);
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  .printable-invoice, .printable-invoice * {
    visibility: visible;
  }
  .printable-invoice {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    border: none;
  }
}
