:root {
  --primary-color: #2d5016;
  --secondary-color: #4a7c24;
  --accent-color: #f4a261;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --border-color: #dee2e6;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  direction: rtl;
}

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

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo h1 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin: 0;
}

.logo h1 a {
  color: inherit;
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

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

.search-box {
  display: flex;
  gap: 5px;
}

.search-box input {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  width: 250px;
  font-size: 0.95rem;
}

.search-box button {
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: #e76f51;
  transform: translateY(-2px);
}

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

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

.product-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  height: 50px;
  overflow: hidden;
}

.product-info h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.95rem;
}

.current-price {
  color: var(--success-color);
  font-size: 1.3rem;
  font-weight: bold;
}

.discount-badge {
  background: var(--danger-color);
  color: var(--white);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.85rem;
}

/* Cart */
.cart-table {
  width: 100%;
  background: var(--white);
  border-radius: 10px;
  margin: 30px 0;
}

.cart-table table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.cart-table th {
  background: var(--primary-color);
  color: var(--white);
}

.cart-summary {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  margin: 30px auto;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 50px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.9;
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 10px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
