@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
  --primary-color: #e91e63; /* Pink Main */
  --bg-color: #ffffff;
  --background-alt: #f1f5f9;
  --text-color: #111111;
  --text-muted: #666666;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --bg-color: #0f172a;
  --background-alt: #1e293b;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: #1e293b;
  --border-color: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
}

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

/* Header & Nav */
header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
  transition: background-color 0.3s;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s;
}

.logo img:hover {
  transform: scale(1.05);
}

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

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav a:hover {
  color: var(--primary-color);
}

nav a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background-alt);
}

.theme-toggle:hover {
  color: var(--primary-color);
  transform: rotate(15deg);
}

/* Hero Section */
.hero-section {
  padding: 60px 0;
  background: linear-gradient(to bottom, var(--background-alt), var(--bg-color));
}

/* Sections & Typography */
section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  color: var(--text-color);
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

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

.card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-content {
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-color);
  font-weight: 700;
}

.card-price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 20px;
  margin-top: auto; /* pushes to bottom if content is short */
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-whatsapp {
  background-color: #25D366;
  width: 100%;
}

.btn-whatsapp:hover {
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-danger {
  background-color: #ef4444;
}

.btn-danger:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: right;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* Admin Specific */
.admin-login {
  max-width: 450px;
  margin: 100px auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.admin-section {
  padding: 30px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table th, .admin-table td {
  padding: 15px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table th {
  background-color: var(--background-alt);
  font-weight: 700;
  color: var(--text-color);
}

.admin-table tr:hover {
  background-color: var(--background-alt);
}

.file-preview {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Action buttons in table */
.admin-table .btn {
  padding: 8px 12px;
  font-size: 0.9rem;
  margin-left: 5px;
}

/* Floating WhatsApp */
.floating-wa {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background-color: #25D366;
  color: white;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 35px;
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  text-decoration: none;
  transition: var(--transition);
}

.floating-wa:hover {
  transform: scale(1.15) rotate(-10deg);
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.5);
}

/* Footer */
footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .logo {
    order: 1;
    width: auto;
  }
  
  .theme-toggle {
    order: 2;
  }
  
  nav {
    order: 3;
    width: 100%;
  }

  nav ul {
    justify-content: center;
    gap: 15px;
  }
  
  .hero-section h1 {
    font-size: 2rem !important;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    text-align: center;
  }
}
