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

body {
  font-family: 'Arial', sans-serif;
  direction: rtl;
  background: #f7f7f7;
  color: #333;
  line-height: 1.6;
}

/* تم تعطيل الحاوية الثابتة لتجنب التعارض مع Bootstrap */
/* 
.container {
  width: 95%;
  max-width: 1100px;
  margin: 0 auto;
}
*/

/* Header */
.site-header {
  background: #fff;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

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

.site-header .logo {
  font-weight: bold;
  font-size: 24px;
}

.site-header .logo a {
  text-decoration: none;
  color: #1f8ef1;
}

.site-header .search {
  flex: 1;
  min-width: 200px;
}

.site-header .search form {
  display: flex;
  gap: 5px;
}

.site-header .search input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.site-header .search button {
  padding: 8px 16px;
  background: #1f8ef1;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.site-header .actions {
  display: flex;
  gap: 15px;
}

.site-header .actions a {
  text-decoration: none;
  color: #1f8ef1;
  font-size: 14px;
}

.site-header .actions a:hover {
  text-decoration: underline;
}

/* Main Content */
main {
  min-height: 60vh;
  padding: 20px 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 20px;
}

/* Featured Section */
.featured {
  margin-bottom: 40px;
}

.featured h2 {
  margin-bottom: 20px;
  font-size: 28px;
}

/* Grid */
/* Grid مرن يدعم الموبايل */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.grid > * {
  flex: 1 1 250px; /* ضمان توزيع العناصر بشكل جيد */
}

@media (max-width: 576px) {
  .grid > * {
    flex: 1 1 100%; /* عنصر واحد في السطر للموبايل الصغير */
  }
}

/* Card */
.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.card h3 {
  padding: 12px;
  font-size: 18px;
}

.card p {
  padding: 0 12px;
  color: #666;
  font-weight: bold;
}

.card .btn {
  margin: 12px;
}

/* Button */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #1f8ef1;
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn:hover {
  background: #1a7bc4;
}

/* Product Detail */
.product-detail {
  display: flex;
  gap: 30px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.product-detail .images {
  flex: 1;
}

.product-detail .images img {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.product-detail .info {
  flex: 1;
}

.product-detail h1 {
  margin-bottom: 15px;
  font-size: 32px;
}

.product-detail p {
  margin-bottom: 10px;
  line-height: 1.8;
}

.product-detail form {
  margin-top: 20px;
}

.product-detail label {
  display: block;
  margin-bottom: 10px;
}

.product-detail input,
.product-detail select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
}

/* Cart Table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.cart-table thead {
  background: #f0f0f0;
}

.cart-table th,
.cart-table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #eee;
}

.cart-table form {
  display: flex;
  gap: 5px;
}

.cart-table input {
  width: 60px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cart-table button {
  padding: 5px 10px;
  background: #1f8ef1;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Cart Total */
.cart-total {
  background: #fff;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Form */
form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

form label {
  display: block;
  margin-bottom: 15px;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  margin-top: 5px;
}

form button {
  margin-top: 10px;
}

/* Admin Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats .box {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #1f8ef1;
  font-size: 18px;
  font-weight: bold;
}

/* Admin Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

table thead {
  background: #f0f0f0;
}

table th,
table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #eee;
}

table a {
  color: #1f8ef1;
  text-decoration: none;
  margin-right: 10px;
}

table a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: #fff;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid #eee;
  text-align: center;
  color: #666;
}

.site-footer .socials {
  margin-top: 10px;
}

.site-footer a {
  color: #1f8ef1;
  text-decoration: none;
  margin: 0 5px;
}

/* Auth Container */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 20px;
}

.auth-box {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.auth-box h1 {
  margin-bottom: 20px;
  text-align: center;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: all 0.3s;
}

.tab-btn.active {
  color: #1f8ef1;
  border-bottom-color: #1f8ef1;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1f8ef1;
  box-shadow: 0 0 5px rgba(31, 142, 241, 0.3);
}

/* Alert Messages */
.alert {
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  border-left: 4px solid;
}

.alert-error {
  background: #fee;
  color: #c33;
  border-left-color: #c33;
}

.alert-success {
  background: #efe;
  color: #3c3;
  border-left-color: #3c3;
}

/* Profile Container */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
}

.profile-info,
.profile-orders {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.profile-info h2,
.profile-orders h2 {
  margin-bottom: 15px;
  border-bottom: 2px solid #1f8ef1;
  padding-bottom: 10px;
}

.profile-info p {
  margin-bottom: 10px;
  line-height: 1.8;
}

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

.orders-table thead {
  background: #f0f0f0;
}

.orders-table th,
.orders-table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #eee;
}

/* Product Form */
.product-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

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

.btn-secondary {
  background: #666;
  margin-right: 10px;
}

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

/* Admin Grid */
.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.info-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.info-box h2 {
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.info-box p {
    margin-bottom: 5px;
}

.form-inline .form-group {
    display: inline-block;
    margin-left: 15px;
}

.form-inline button {
    margin-top: 25px; /* ليتماشى مع ارتفاع حقول الإدخال */
}

/* Responsive */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 32px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .product-detail {
    flex-direction: column;
  }

  .site-header .search form {
    flex-direction: column;
  }

  .site-header .search input,
  .site-header .search button {
    width: 100%;
  }
}




/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.contact-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.contact-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #1f8ef1;
}

.contact-info h2 {
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* About Page */
.about-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.about-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.about-content h2 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1f8ef1;
}

.about-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-content ul {
    list-style: none;
    padding: 0;
}

.about-content ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #1f8ef1;
}

.stat-box h3 {
    margin-bottom: 10px;
    color: #333;
}

.stat-box p {
    font-size: 32px;
    font-weight: bold;
    color: #1f8ef1;
}

@media (max-width: 768px) {
  .contact-container,
  .about-container {
    grid-template-columns: 1fr;
  }
}

