/* ================================================
   متجر الأنتيك - Custom Styles
   ================================================ */

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

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

body {
  background: #fafaf9;
  color: #1c1917;
  margin: 0;
  padding: 0;
}

/* ── Gradients ── */
.antique-gradient {
  background: linear-gradient(135deg, #78350f 0%, #92400e 40%, #d97706 80%, #b45309 100%);
}

.antique-gradient-subtle {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
}

/* ── Buttons ── */
.btn-primary {
  background: #92400e;
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
}
.btn-primary:hover { background: #78350f; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(146,64,14,0.3); }
.btn-primary:disabled { background: #9ca3af; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: #fef3c7;
  color: #92400e;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #d97706;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
}
.btn-secondary:hover { background: #fde68a; transform: translateY(-1px); }

.btn-whatsapp {
  background: #25D366;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
}
.btn-whatsapp:hover { background: #1da851; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.35); }

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #fecaca;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.btn-danger:hover { background: #fca5a5; }

/* ── Form Fields ── */
.input-field {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e7e5e4;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  background: white;
  color: #1c1917;
}
.input-field:focus { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,0.12); }

select.input-field { cursor: pointer; }

/* ── Cards ── */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.product-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: all 0.3s ease;
  border: 1px solid #f5f5f4;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
  border-color: #fde68a;
}

/* ── Typography ── */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 8px;
  line-height: 1.3;
}
.section-subtitle {
  color: #78716c;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── Navigation ── */
.nav-link {
  color: #44403c;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 14px;
}
.nav-link:hover { color: #92400e; background: #fef3c7; }
.nav-link.active { color: #92400e; background: #fef3c7; }

/* ── Badges ── */
.badge-pending    { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-confirmed  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-processing { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-shipped    { background: #ede9fe; color: #4c1d95; border: 1px solid #c4b5fd; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-delivered  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* ── Stars ── */
.star-filled { color: #f59e0b; }
.star-empty  { color: #d1d5db; }

/* ── Loader ── */
.loader {
  border: 3px solid #fef3c7;
  border-top: 3px solid #92400e;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}
.loader-sm {
  border: 2px solid #fef3c7;
  border-top: 2px solid #92400e;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}
[dir="rtl"] .toast-container { right: auto; left: 20px; }

.toast {
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: slideInToast 0.3s ease;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast-success { background: #065f46; border-left: 4px solid #34d399; }
.toast-error   { background: #991b1b; border-left: 4px solid #f87171; }
.toast-info    { background: #1e40af; border-left: 4px solid #60a5fa; }
.toast-warning { background: #854d0e; border-left: 4px solid #fcd34d; }

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

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: white;
  border-radius: 18px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ── Admin Layout ── */
.admin-sidebar {
  min-width: 240px;
  background: white;
  border-left: 2px solid #fef3c7;
  min-height: calc(100vh - 64px);
}
[dir="ltr"] .admin-sidebar { border-left: none; border-right: 2px solid #fef3c7; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 10px;
  color: #44403c;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
}
.admin-nav-item:hover  { background: #fef3c7; color: #92400e; }
.admin-nav-item.active { background: #fef3c7; color: #92400e; border-right: 3px solid #92400e; }
[dir="ltr"] .admin-nav-item.active { border-right: none; border-left: 3px solid #92400e; }

/* ── Stats Cards ── */
.stat-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #f5f5f4;
  transition: all 0.3s ease;
}
.stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.data-table th {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 2px solid #fde68a;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f4;
  font-size: 14px;
  color: #44403c;
}
.data-table tr:hover td { background: #fafaf9; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f5f5f4; }
::-webkit-scrollbar-thumb { background: #d97706; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #92400e; }

/* ── WhatsApp Float Button ── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45);
  z-index: 100;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,0.55); }
[dir="ltr"] .whatsapp-float { left: auto; right: 24px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ── Image Hover Effects ── */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.4s ease;
}
.img-zoom:hover img {
  transform: scale(1.08);
}

/* ── Section Divider ── */
.section-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, #d97706, transparent);
  border: none;
  margin: 0;
}

/* ── Price Tag ── */
.price-tag {
  font-size: 1.5rem;
  font-weight: 800;
  color: #92400e;
}
.price-tag-sm {
  font-size: 1.1rem;
  font-weight: 700;
  color: #92400e;
}

/* ── RTL helpers ── */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
[dir="rtl"] .text-start { text-align: right; }
[dir="rtl"] .text-end   { text-align: left; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .section-title { font-size: 1.5rem; }
  .modal-box { padding: 20px; }
  .admin-sidebar { min-width: 100%; border-left: none; border-bottom: 2px solid #fef3c7; }
  .toast-container { left: 12px; right: 12px; max-width: none; }
}
