/* ========================================= */
/* 1. Fonts & Variables                      */
/* ========================================= */

:root {
  --bg: #0a0e1a;
  --surface: #151b2e;
  --surface-2: #1f2940;
  --surface-3: #2a3654;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --text: #0f172a;
  --text-dim: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* ========================================= */
/* 2. Reset & Base Styles                    */
/* ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  padding-bottom: 20px;
}

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

/* ========================================= */
/* 3. Header & Navigation                    */
/* ========================================= */
.header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.icon-btn .badge {
  position: absolute;
  top: -3px;
  left: -3px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ========================================= */
/* 4. Search & Categories                    */
/* ========================================= */
.search-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 44px 12px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  background: var(--surface-2);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

/* Mobile Category Dropdown */
.cat-dropdown {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 12px;
  padding: 0 16px;
}

.cat-dropdown-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.cat-dropdown-btn:hover {
  background: var(--surface-2);
}

.cat-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 16px;
  right: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 50;
  box-shadow: var(--shadow);
}

.cat-dropdown-menu.show {
  display: block;
  animation: slideDown 0.2s;
}

.cat-item {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-item:hover {
  background: var(--surface-2);
}

.cat-item.active {
  background: var(--primary);
  color: white;
}

.cat-count {
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.cat-item.active .cat-count {
  background: rgba(255, 255, 255, 0.2);
}

/* Desktop Categories */
.cat-chips {
  display: none;
  max-width: 1200px;
  margin: 0 auto 14px;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-chips::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  padding: 8px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cat-chip:hover {
  background: var(--surface-2);
  color: var(--text);
}

.cat-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

@media (min-width: 768px) {
  .cat-dropdown {
    display: none;
  }
  .cat-chips {
    display: flex;
  }
}

/* ========================================= */
/* 5. Product Grid & Cards                   */
/* ========================================= */
.stats {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 10px;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

.grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px;
}

.site-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.site-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.site-card:active {
  transform: scale(0.97);
}

.site-card.hidden {
  display: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.site-card:hover .product-image img {
  transform: scale(1.05);
}

.discount-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--danger);
  color: white;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}

.pin-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
  z-index: 2;
}

.product-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}

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

.price-old {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: line-through;
}

.price-current {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.price-unit {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 500;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  grid-column: 1 / -1;
  display: none;
}

.empty.show {
  display: block;
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
  font-weight: 600;
}

/* Grid Responsive Breakpoints */
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

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

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

/* ========================================= */
/* 6. Single Product Page                    */
/* ========================================= */
.breadcrumb {
  padding: 12px 16px;
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 600;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.main-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  cursor: zoom-in;
  position: relative;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.thumbnails {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.thumb {
  aspect-ratio: 1;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Override product title for single page */
.product-layout .product-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 10px;
  min-height: auto;
  display: block;
  -webkit-line-clamp: unset;
}

.rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 15px;
}

.stars {
  color: var(--warning);
}

.price-box {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 15px;
}

.price-box .price-current {
  font-size: 28px;
}

.price-currency {
  font-size: 13px;
  color: var(--text-dim);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.feature-icon {
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.description {
  color: var(--text);
  line-height: 1.8;
  font-size: 14px;
}

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

.tag {
  background: var(--surface-2);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--border);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.show {
  display: flex;
}

.modal-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

@media (min-width: 768px) {
  .product-layout .product-title {
    font-size: 28px;
  }
}

@media (min-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .gallery {
    position: sticky;
    top: 80px;
  }
}

/* ========================================= */
/* 7. Cart & Checkout                        */
/* ========================================= */
.cart-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s;
}

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

.cart-card.error {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.item-info {
  flex: 1;
  min-width: 200px;
}

.item-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.item-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.item-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 16px;
  white-space: nowrap;
}

.btn-remove {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: var(--danger);
  color: #fff;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  color: var(--success);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.download-link:hover {
  background: rgba(16, 185, 129, 0.1);
}

.summary-box {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-top: 25px;
  position: sticky;
  top: 80px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-of-type {
  border: none;
}

.summary-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  padding-top: 15px;
  margin-top: 10px;
  border-top: 2px dashed var(--border);
}

.btn-checkout {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  transition: all 0.2s;
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state span {
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
}

.mobile-cart {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 90;
  backdrop-filter: blur(20px);
}

@media (max-width: 600px) {
  .cart-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-remove {
    align-self: flex-end;
    margin-top: -30px;
  }
}

@media (min-width: 900px) {
  .mobile-cart {
    display: none;
  }
}

/* ========================================= */
/* 8. User Panel, Tabs & Tables              */
/* ========================================= */
.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

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

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.info-item {
  background: var(--surface-2);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: block;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  font-size: 13px;
}

th {
  background: var(--surface-2);
  color: var(--text-dim);
  font-weight: 600;
  text-align: right;
  padding: 14px;
}

td {
  padding: 14px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

tr:hover td {
  background: var(--surface-2);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}

.st-1 {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}
.st-2 {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.st-3 {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
}
.st-4 {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
.st-6 {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-dim);
}

/* ========================================= */
/* 9. Contact Page & Profile                 */
/* ========================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.contact-form-card,
.profile-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.contact-form-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea,
.comment-form input,
.comment-form textarea,
.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus,
.form-control:focus {
  border-color: var(--primary);
  background: var(--surface-3);
}

.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group textarea {
  min-height: 120px;
}

.captcha-box {
  background: var(--surface-2);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  margin-bottom: 6px;
  letter-spacing: 1px;
  border: 1px dashed var(--border);
}

.profile-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.profile-info-list {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.profile-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.profile-info-list li .icon {
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.profile-info-list li .label {
  font-weight: 600;
  color: var(--text);
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

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

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 2fr 1fr;
  }
}

/* ========================================= */
/* 10. Comments                              */
/* ========================================= */
.comment-item {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.comment-author {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.comment-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.comment-text {
  font-size: 13px;
  line-height: 1.8;
}

.comment-form button {
  width: 100%;
}

/* ========================================= */
/* 11. Shared Components (Buttons, Toast...) */
/* ========================================= */
.section {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-group {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-3);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 12px;
  padding: 8px 15px;
  border-radius: 8px;
  text-decoration: none;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 300;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

.ctx-menu {
  position: fixed;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
  z-index: 250;
  display: none;
  min-width: 160px;
}

.ctx-menu.show {
  display: block;
  animation: fadeIn 0.2s;
}

.ctx-item {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.ctx-item:hover {
  background: var(--surface-2);
}

/* ========================================= */
/* 12. Footer                                */
/* ========================================= */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 16px 20px;
  margin-top: 40px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.footer-col h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.footer-about p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.contact-icon {
  width: 28px;
  height: 28px;
  background: var(--surface-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

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

/* ========================================= */
/* 13. Animations                            */
/* ========================================= */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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