/* Full-Page RTL Catalog - Dark/Glass Theme */
:root {
  --bg: #0a0a0f;
  --glass: rgba(255,255,255,0.08);
  --glass-hover: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.15);
  --text: #f0f0f5;
  --text-muted: #a8a8b8;
  --accent: #a68cf3;
  --accent-2: #f59fd1;
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { 
  scroll-behavior: smooth; 
  direction: rtl;
}
body {
  margin: 0; padding: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
}

/* Navigation */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  backdrop-filter: blur(20px);
  background: rgba(10,10,15,0.85);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.logo {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111; font-weight: 900; font-size: 18px;
}
.nav-bar h1 { margin: 0; font-size: 20px; font-weight: 600; }
.nav-controls { display: flex; align-items: center; gap: 16px; }
.nav-controls input {
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  outline: none;
  width: 200px;
}
.nav-controls button {
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}
.nav-controls button:hover { background: var(--glass-hover); }

/* Main Catalog */
.catalog {
  padding-top: 80px;
}

.catalog-item {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 400px 1fr;
  align-items: center;
  direction: rtl;
}

.item-image {
  position: relative;
  height: 600px;
  max-width: 400px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: rgba(255,255,255,0.02);
}
.item-badge {
  position: absolute;
  top: 32px; right: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.item-content {
  padding: 48px 40px;
  background: linear-gradient(135deg, rgba(10,10,15,0.95), rgba(15,15,25,0.9));
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  min-height: 600px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  direction: rtl;
  text-align: right;
}
.item-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.item-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 32px;
}
.item-section {
  margin-bottom: 28px;
}
.item-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}
.item-section ul {
  margin: 0;
  padding-right: 20px;
  list-style: none;
  direction: rtl;
  text-align: right;
}
.item-section li {
  position: relative;
  padding: 6px 0;
  color: var(--text-muted);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
}
.item-section li::before {
  content: '●';
  color: var(--accent);
  position: absolute;
  right: -16px;
  top: 6px;
}

/* Progress Indicator */
.progress-indicator {
  position: fixed;
  bottom: 32px; right: 32px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 20px;
  z-index: 50;
  direction: rtl;
  text-align: right;
}
.progress-bar {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: var(--progress, 0%);
  transition: width 0.3s ease;
}
.progress-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Light theme */
body.light {
  --bg: #f8f9fc;
  --glass: rgba(255,255,255,0.9);
  --glass-hover: rgba(255,255,255,1);
  --border: rgba(0,0,0,0.1);
  --text: #1a1a24;
  --text-muted: #5a5a6a;
}
body.light .item-content {
  background: linear-gradient(135deg, rgba(248,249,252,0.95), rgba(255,255,255,0.9));
}
body.light .nav-bar {
  background: rgba(248,249,252,0.9);
}

/* Responsive */
@media (max-width: 1024px) {
  .catalog-item {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .item-image {
    height: 400px;
    max-width: 350px;
    margin: 20px auto;
  }
  .item-content {
    min-height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .nav-controls input {
    width: 150px;
  }
}

@media (max-width: 640px) {
  .nav-bar {
    padding: 12px 20px;
  }
  .nav-controls {
    gap: 8px;
  }
  .nav-controls input {
    width: 120px;
    font-size: 14px;
  }
  .item-image {
    height: 300px;
    max-width: 280px;
    margin: 16px auto;
  }
  .item-content {
    padding: 32px 24px;
  }
  .item-title {
    font-size: 20px;
  }
  .item-badge {
    top: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }
}
