:root {
  --primary-dark: #0F5132;
  --primary: #198754;
  --primary-light: #e8f5e9;
  --gold: #D4A72C;
  --gold-light: #fef9e7;
  --bg: #F7F8F7;
  --card-bg: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --success: #16A34A;
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --font: "Segoe UI", Tahoma, -apple-system, BlinkMacSystemFont, "Vazirmatn", "Noto Sans Arabic", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header & Navigation */
.header-top {
  background-color: var(--primary-dark);
  color: #fff;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.main-header {
  background-color: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.main-header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  text-decoration: none;
}
.brand-icon {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--gold);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(15, 81, 50, 0.3);
}
.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
  margin: 0;
}
.brand-subtitle {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nav-tab-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-tab-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}
.nav-tab-btn.active {
  background-color: var(--primary-dark);
  color: #fff;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* Hero Banner */
.hero-card {
  background: linear-gradient(135deg, #0F5132 0%, #198754 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 81, 50, 0.2);
}
.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-block;
  background-color: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: #ffffff;
}
.hero-desc {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 1.5rem;
}

/* Search Bar */
.search-box {
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.4rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  gap: 0.5rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 180px;
  border: none;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}
.search-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

/* Cards & Grids */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.item-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.item-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background-color: #eee;
}
.item-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.item-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
  line-height: 1.4;
}
.item-card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: auto;
  padding-top: 0.5rem;
}
.item-card-price .orig {
  font-size: 0.85rem;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-inline-start: 0.5rem;
  font-weight: normal;
}

/* Badges */
.badge-gold {
  background-color: var(--gold-light);
  color: #856404;
  border: 1px solid #ffeeba;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}
.badge-green {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}
.badge-gray {
  background-color: #f3f4f6;
  color: #4b5563;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background-color 0.2s, opacity 0.2s;
}
.btn:hover {
  opacity: 0.92;
}
.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-dark {
  background-color: var(--primary-dark);
  color: #fff;
}
.btn-gold {
  background-color: var(--gold);
  color: #111;
  font-weight: 700;
}
.btn-secondary {
  background-color: #fff;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background-color: #fff;
  color: var(--text);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
}

/* CV Document Print Styling */
.cv-preview-sheet {
  background: #fff;
  color: #222;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 850px;
  margin: 1.5rem auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.cv-header {
  border-bottom: 2px solid var(--primary-dark);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.cv-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0;
}
.cv-role {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
}
.cv-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  border-bottom: 1px solid #eee;
  padding-bottom: 0.35rem;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

@media print {
  body {
    background: #fff !important;
  }
  .header-top, .main-header, .btn, .no-print, .nav-tabs {
    display: none !important;
  }
  .cv-preview-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 0.8rem 1rem;
  text-align: inherit;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background-color: #f9fafb;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.main-footer {
  background-color: #0b3420;
  color: #fff;
  margin-top: 4rem;
  padding: 3rem 1rem 1.5rem;
  border-top: 3px solid var(--gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}
.footer-col h4 {
  color: var(--gold);
  margin-top: 0;
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: #e2e8f0;
}
.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  z-index: 1001;
  box-shadow: 0 0 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}
[dir="rtl"] .cart-drawer {
  left: 0;
}
[dir="ltr"] .cart-drawer {
  right: 0;
}
