:root {
  --primary: #9b51e0;
  --primary-dark: #7b38be;
  --accent: #f2994a;
  --bg-color: #fcfbfe;
  --card-bg: #ffffff;
  --text-main: #2d2d2d;
  --text-light: #777777;
  --border-color: #eee;
  --shadow: 0 4px 20px rgba(155, 81, 224, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.header {
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
}

.logo-icon {
  background: var(--primary);
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  padding: 5px;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: white;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.lang-switch {
  background: #f0e6fc;
  color: var(--primary);
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Views Management */
.view {
  display: none;
  flex: 1;
}

.view.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

/* General Layout Elements */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--text-main);
  text-align: center;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f3ebff 0%, #fef8f0 100%);
  padding: 60px 20px;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-content p {
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #eee;
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #ddd;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border-color);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(155, 81, 224, 0.15);
}

.category-icon {
  font-size: 40px;
  margin-bottom: 15px;
  display: block;
}

.category-name {
  font-size: 18px;
  font-weight: 700;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  height: 220px;
  cursor: pointer;
  overflow: hidden;
  background: #f9f9f9;
}

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

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

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 5px;
}

.product-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.product-price-row {
  margin-top: auto;
  margin-bottom: 12px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.btn-add-cart {
  width: 100%;
  background: #f3ebff;
  color: var(--primary);
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-add-cart:hover {
  background: var(--primary);
  color: white;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
}

.search-box input, .filter-select, .form-input {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  font-size: 14px;
}

.filter-group {
  min-width: 180px;
}

/* Cart Styles */
.cart-container {
  max-width: 800px;
}

.cart-item {
  background: var(--card-bg);
  padding: 15px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-price {
  font-weight: bold;
  color: var(--primary);
}

.cart-summary {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 20px;
  border: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 16px;
}

.summary-row.total {
  font-weight: bold;
  font-size: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* Auth Pages */
.auth-container {
  max-width: 400px;
  margin: 60px auto;
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.auth-title {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: 800;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #27ae60;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-state-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
    text-align: center;
  }
  .mobile-menu-btn {
    display: block;
  }
}