/* ==========================================================================
   Creamy - Global & Client Styles (منيو وهوية كريمي)
   ========================================================================== */

:root {
  --font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-primary: #600d17;
  --bg-pattern: #6e2229;
  --bg-card: rgba(80, 5, 16, 0.72);
  --bg-card-hover: rgba(100, 8, 22, 0.85);
  --text-cream: #eeeae0;
  --text-muted: rgba(238, 234, 224, 0.75);
  --border-cream: rgba(238, 234, 224, 0.25);
  --border-cream-strong: rgba(238, 234, 224, 0.4);
  --accent-gold: #d4af37;
  --color-whatsapp: #25d366;
  --color-danger: #e53e3e;
  --color-success: #38a169;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  color: var(--text-cream);
  direction: rtl;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-primary);
  overflow-x: hidden;
  color: var(--text-cream);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-pattern);
  pointer-events: none;
  -webkit-mask: url('https://files.catbox.moe/uckkxp.svg') 0 0/80px auto repeat;
  mask: url('https://files.catbox.moe/uckkxp.svg') 0 0/80px auto repeat;
}

/* الصفحات والتنقل */
.page {
  display: none;
  min-height: 100vh;
  width: 100%;
  padding: 2rem 1rem;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home {
  gap: 0.75rem;
}

/* الشعارات والرموز */
.logo,
.slogan,
.small-logo {
  display: block;
  background: var(--text-cream);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.logo {
  width: min(23rem, 85vw);
  -webkit-mask-image: url('https://files.catbox.moe/fe136h.svg');
  mask-image: url('https://files.catbox.moe/fe136h.svg');
}

.slogan {
  width: min(16rem, 70vw);
  -webkit-mask-image: url('https://files.catbox.moe/4c99xw.svg');
  mask-image: url('https://files.catbox.moe/4c99xw.svg');
}

.small-logo {
  width: 10rem;
  margin-bottom: 1rem;
  -webkit-mask-image: url('https://files.catbox.moe/fe136h.svg');
  mask-image: url('https://files.catbox.moe/fe136h.svg');
}

.logo img,
.slogan img,
.small-logo img {
  display: block;
  width: 100%;
  opacity: 0;
}

/* قوائم الأزرار */
.button-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home .button-list {
  margin-top: 0.75rem;
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16rem;
  max-width: 100%;
  height: 2.625rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.13);
  background-image: linear-gradient(135deg, rgba(148, 56, 56, 0.37), transparent);
  transition: transform 0.25s, background-color 0.25s;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.home .button {
  width: 13.75rem;
  background-color: rgba(255, 255, 255, 0.14);
}

.button:hover {
  transform: scale(1.04);
  background-color: rgba(0, 0, 0, 0.4);
}

.button i {
  position: absolute;
  left: 1rem;
  width: 1.4em;
  text-align: center;
  pointer-events: none;
}

.button span {
  width: 100%;
  text-align: center;
}

/* أيقونات التواصل الاجتماعي */
.socials {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fff;
  color: #bf2526;
  text-decoration: none;
  transition: transform 0.25s;
}

.socials a:hover {
  transform: scale(1.1);
}

.socials span {
  display: none;
}

/* المنيو وقائمة المنتجات */
.menu {
  justify-content: flex-start !important;
  padding-bottom: 4rem;
}

.menu-header {
  text-align: center;
  margin-bottom: 1rem;
}

.menu-header h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 700;
}

.menu-header p {
  margin: 0.25rem 0 0;
  color: var(--text-cream);
  font-size: 1.1rem;
}

.menu-section {
  width: min(62rem, 100%);
  margin: 1.5rem auto;
}

.menu-section h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-cream-strong);
  font-size: 1.55rem;
  font-weight: 600;
}

.menu-section h2 i {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--text-cream);
  color: var(--bg-primary);
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.menu-section h2 .country-icon {
  width: 2rem;
  height: 2rem;
  padding: 0.2rem;
  border-radius: 50%;
  background: var(--text-cream);
  object-fit: contain;
  flex: 0 0 auto;
}

.menu-subtitle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.6rem 0 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.7rem;
  background: rgba(238, 234, 224, 0.12);
  font-size: 1.2rem;
  font-weight: 500;
}

.menu-subtitle .country-icon {
  width: 2rem;
  height: 2rem;
  padding: 0.2rem;
  border-radius: 50%;
  background: var(--text-cream);
  object-fit: contain;
}

.national-products {
  padding: 0.9rem;
  border: 1px solid var(--border-cream-strong);
  border-radius: 1rem;
  background: rgba(80, 5, 16, 0.28);
}

.national-title {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem !important;
  min-height: clamp(3.2rem, 9vw, 5.2rem);
  white-space: nowrap;
  font-size: clamp(0.9rem, 4.4vw, 1.55rem) !important;
  border-bottom: 1px solid var(--border-cream-strong);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.national-icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--text-cream);
  flex: 0 0 auto;
}

.national-icon::before {
  content: "96";
  color: #078d54;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  direction: ltr;
}

.national-mark {
  display: block;
  width: clamp(4rem, 18vw, 9rem);
  height: clamp(2.8rem, 8vw, 4.5rem);
  object-fit: contain;
  flex: 0 1 auto;
}

/* شبكة المنتجات */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.product {
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  border: 1px solid var(--border-cream);
  border-radius: 1rem;
  background: var(--bg-card);
  box-shadow: 0 0.55rem 1.5rem rgba(0, 0, 0, 0.18);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  user-select: none;
}

.product:hover {
  transform: translateY(-3px);
  border-color: rgba(238, 234, 224, 0.5);
}

.product::after {
  content: '+ أضف للسلة';
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(96, 13, 23, 0.9);
  color: var(--text-cream);
  font-size: 0.76rem;
  font-weight: 600;
  pointer-events: none;
  transition: background 0.2s;
}

.product:hover::after {
  background: rgba(140, 20, 35, 0.95);
}

.product.in-cart {
  outline: 2px solid var(--text-cream);
}

.product.in-cart::before {
  content: attr(data-qty);
  position: absolute;
  z-index: 2;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--text-cream);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.product img {
  display: block;
  width: 100%;
  height: 150px;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.product-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem;
}

.product-info h3 {
  flex: 1;
  margin: 0;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.price {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--text-cream);
  color: var(--bg-primary);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.price b {
  font-size: 1.15em;
  font-weight: 700;
  margin-right: 2px;
}

/* النوافذ المنبثقة (Modals) */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 5, 7, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem;
  border: 2px solid var(--text-cream);
  border-radius: 1rem;
  background: #700b18;
  color: var(--text-cream);
  text-align: center;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.close {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-cream);
  font-size: 1.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: background 0.2s;
}

.close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.modal-open {
  overflow: hidden !important;
}

/* بطاقات الكلاسيك (التوريد، والمناسبات) */
.classic-card {
  display: flex;
  flex-direction: column;
  width: min(20rem, calc(100vw - 2.5rem));
  min-height: min(32rem, calc(100vh - 3rem));
  max-height: calc(100vh - 2rem);
  padding: 1.65rem 1.75rem 1.4rem;
  border: 4px solid #58171c;
  border-radius: 0;
  outline: 2px solid #58171c;
  outline-offset: 7px;
  background: #f8f1eb;
  color: #58171c;
  box-shadow: none;
  overflow: auto;
}

.classic-card .close {
  top: 0.45rem;
  left: 0.45rem;
  width: 1.7rem;
  height: 1.7rem;
  background: transparent;
  color: #58171c;
  font-size: 1.25rem;
}

.classic-card h2 {
  margin: 0;
  text-align: center;
  color: #58171c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.15rem;
  font-weight: 400;
  line-height: 1.2;
  direction: ltr;
}

.classic-card.business h2 {
  font-size: 1.58rem;
  white-space: nowrap;
}

.classic-services {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 3rem 0 2rem;
  padding: 0;
  list-style: none;
  text-align: right;
}

.classic-services li {
  position: relative;
  padding-right: 1.35rem;
  color: #58171c;
  font-size: 1rem;
  line-height: 1.8;
}

.classic-services li::before {
  content: '♦';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.8rem;
}

.classic-price {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: center;
  color: #58171c;
}

.classic-price strong {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.classic-price small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.58rem;
}

.business-copy {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 3rem;
  text-align: right;
}

.business-copy p {
  margin: 0;
  color: #58171c;
  font-size: 1.05rem;
  line-height: 2.15;
  font-weight: 500;
}

/* السلة العائمة والنافذة */
.cart-fab {
  position: fixed;
  z-index: 40;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--text-cream);
  color: var(--bg-primary);
  box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.4);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cart-fab:hover {
  transform: scale(1.05);
}

.cart-fab[hidden] {
  display: none !important;
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--bg-primary);
  color: #fff;
  font-size: 0.85rem;
}

.cart-box {
  width: min(36rem, 100%);
  text-align: right;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 48vh;
  overflow-y: auto;
  margin: 1rem 0;
  padding-left: 0.25rem;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 1.1rem;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(238, 234, 224, 0.12);
}

.cart-name {
  font-weight: 600;
  font-size: 1.05rem;
  display: block;
}

.cart-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  direction: ltr;
}

.cart-controls button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(238, 234, 224, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-cream);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.cart-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cart-qty {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin: 1.2rem 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(238, 234, 224, 0.28);
  font-size: 1.3rem;
  font-weight: 700;
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.send-whatsapp,
.clear-cart {
  border: 0;
  border-radius: 0.65rem;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s, transform 0.15s;
}

.send-whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
}

.send-whatsapp:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.clear-cart {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-cream);
}

.clear-cart:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* إشعار التوست للعميل */
.cart-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 5.5rem;
  transform: translate(-50%, 1rem);
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--text-cream);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
}

.cart-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* حالات التحميل والأخطاء في صفحة العميل */
.menu-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  min-height: 250px;
  width: 100%;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(238, 234, 224, 0.2);
  border-top-color: var(--text-cream);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-message {
  font-size: 1.15rem;
  color: var(--text-cream);
  margin-bottom: 1rem;
}

.state-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-cream-strong);
  color: var(--text-cream);
  padding: 0.6rem 1.4rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.state-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   لوحة الإدارة (Admin Panel Styles)
   ========================================================================== */

.admin-body {
  background: #460910;
  color: var(--text-cream);
  font-family: var(--font-family);
  direction: rtl;
  min-height: 100vh;
}

/* رأس لوحة الإدارة */
.admin-navbar {
  background: rgba(55, 5, 12, 0.95);
  border-bottom: 1px solid rgba(238, 234, 224, 0.2);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.75rem 1.5rem;
}

.admin-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-cream);
}

.admin-brand-icon {
  width: 2.2rem;
  height: 2.2rem;
  background: var(--text-cream);
  -webkit-mask: url('https://files.catbox.moe/fe136h.svg') center/contain no-repeat;
  mask: url('https://files.catbox.moe/fe136h.svg') center/contain no-repeat;
}

.admin-brand h1 {
  font-size: 1.35rem;
  margin: 0;
  font-weight: 700;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.admin-email-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(238, 234, 224, 0.2);
  font-size: 0.85rem;
  direction: ltr;
}

.btn-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(238, 234, 224, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-cream);
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-admin-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-admin-logout {
  background: rgba(229, 62, 62, 0.2);
  border-color: rgba(229, 62, 62, 0.4);
  color: #ffc4c4;
}

.btn-admin-logout:hover {
  background: rgba(229, 62, 62, 0.35);
}

/* شاشة تسجيل الدخول */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(85, 9, 19, 0.85);
  border: 1px solid rgba(238, 234, 224, 0.3);
  border-radius: 1.25rem;
  padding: 2.25rem 2rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  text-align: center;
}

.login-logo {
  width: 9rem;
  margin: 0 auto 1.5rem;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.75rem;
}

/* الحقول والنماذج */
.form-group {
  margin-bottom: 1.25rem;
  text-align: right;
}

.form-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-cream);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(238, 234, 224, 0.3);
  border-radius: 0.6rem;
  color: var(--text-cream);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--text-cream);
  box-shadow: 0 0 0 3px rgba(238, 234, 224, 0.15);
}

.form-control::placeholder {
  color: rgba(238, 234, 224, 0.4);
}

.form-control select,
select.form-control {
  cursor: pointer;
  background-color: #520b14;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  user-select: none;
}

.form-checkbox-label input {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--bg-primary);
  cursor: pointer;
}

/* الأزرار العامة للوحة */
.btn-primary {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--text-cream);
  color: var(--bg-primary);
  border: none;
  border-radius: 0.6rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 0.75rem 1.2rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-cream);
  border: 1px solid rgba(238, 234, 224, 0.25);
  border-radius: 0.6rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* تنبيهات النماذج والأخطاء */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-danger {
  background: rgba(229, 62, 62, 0.2);
  border: 1px solid rgba(229, 62, 62, 0.4);
  color: #fed7d7;
}

.alert-info {
  background: rgba(66, 153, 225, 0.2);
  border: 1px solid rgba(66, 153, 225, 0.4);
  color: #bee3f8;
}

/* الحاوية الرئيسية للوحة التحكم */
.admin-container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem 3rem;
}

/* بطاقات الإحصائيات السريعة */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(70, 7, 16, 0.75);
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(238, 234, 224, 0.15);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--text-cream);
  flex-shrink: 0;
}

.stat-content h4 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-content p {
  margin: 0.35rem 0 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-cream);
}

/* تبويبات لوحة التحكم */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(238, 234, 224, 0.2);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-cream);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--bg-primary);
  background: var(--text-cream);
}

/* شريط الفلاتر والبحث */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(70, 7, 16, 0.75);
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1;
}

.search-box {
  position: relative;
  min-width: 220px;
  flex: 1;
}

.search-box i {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  padding-right: 2.3rem;
}

/* جدول المنتجات */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: rgba(70, 7, 16, 0.75);
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.95rem;
}

.admin-table th {
  background: rgba(50, 4, 11, 0.8);
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(238, 234, 224, 0.2);
  font-weight: 600;
  color: var(--text-cream);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(238, 234, 224, 0.1);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-thumb {
  width: 50px;
  height: 50px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(56, 161, 105, 0.2);
  color: #9ae6b4;
  border: 1px solid rgba(56, 161, 105, 0.4);
}

.badge-warning {
  background: rgba(221, 107, 32, 0.2);
  color: #fbd38d;
  border: 1px solid rgba(221, 107, 32, 0.4);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(238, 234, 224, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-cream);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-action.btn-delete:hover {
  background: rgba(229, 62, 62, 0.3);
  border-color: rgba(229, 62, 62, 0.5);
  color: #ffb8b8;
}

/* رفع الصور والمعاينة */
.image-upload-zone {
  border: 2px dashed rgba(238, 234, 224, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.image-upload-zone:hover,
.image-upload-zone.dragover {
  border-color: var(--text-cream);
  background: rgba(0, 0, 0, 0.25);
}

.image-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.preview-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0.5rem;
  border: 1px solid rgba(238, 234, 224, 0.15);
}

.preview-img {
  width: 70px;
  height: 70px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.preview-meta {
  flex: 1;
  text-align: right;
  font-size: 0.85rem;
}

.preview-meta span {
  display: block;
  color: var(--text-muted);
}

/* شريط تقدم الرفع */
.upload-progress-wrapper {
  margin-top: 0.75rem;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--text-cream);
  transition: width 0.2s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
}

/* نافذة Modals الإدارة */
.admin-modal-box {
  width: min(38rem, 100%);
  text-align: right;
  padding: 1.75rem;
  border: 1px solid rgba(238, 234, 224, 0.3);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5);
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(238, 234, 224, 0.2);
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.admin-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  justify-content: flex-end;
}

/* بطاقات أقسام الإدارة */
.category-card {
  background: rgba(70, 7, 16, 0.75);
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.category-card:hover {
  border-color: rgba(238, 234, 224, 0.4);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.category-icon-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--text-cream);
  color: var(--bg-primary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.category-icon-box img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
}

/* توست النظام العام */
.admin-toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast-item {
  padding: 0.85rem 1.25rem;
  border-radius: 0.65rem;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastSlideUp 0.25s ease-out;
  pointer-events: auto;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  background: #276749;
  border: 1px solid #38a169;
}

.toast-error {
  background: #9b2c2c;
  border: 1px solid #e53e3e;
}

.toast-info {
  background: #2b6cb0;
  border: 1px solid #3182ce;
}

/* التجاوب مع شاشات الجوال */
@media (max-width: 600px) {
  body::before {
    -webkit-mask-size: 56px auto;
    mask-size: 56px auto;
  }
  .page {
    padding: 1.25rem;
  }
  .small-logo {
    width: 8rem;
  }
  .button {
    width: 12.75rem;
  }
  .modal-box {
    padding: 1.75rem 1.25rem;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .admin-navbar {
    padding: 0.75rem 1rem;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-filters {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }
  .product img {
    height: 110px;
  }
  .product h3 {
    font-size: 0.9rem;
    padding: 0.7rem 0.4rem;
  }
  .menu-section h2 {
    font-size: 1.3rem;
  }
  .menu-header h1 {
    font-size: 2.2rem;
  }
  .product-info {
    align-items: stretch;
    flex-direction: column;
    padding: 0.65rem 0.5rem;
  }
  .product-info h3 {
    text-align: center;
  }
  .price {
    align-self: center;
    font-size: 0.95rem;
  }
  .cart-fab {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .cart-actions {
    grid-template-columns: 1fr;
  }
  .clear-cart {
    grid-row: 2;
  }
  .product::after {
    font-size: 0.68rem;
  }
}

@media (max-width: 420px) {
  .national-icon {
    width: 2rem;
    height: 2rem;
  }
  .national-mark {
    min-width: 0;
  }
  .classic-card {
    min-height: min(30rem, calc(100vh - 2.5rem));
    padding: 1.45rem 1.25rem;
  }
  .classic-card h2 {
    font-size: 1.95rem;
  }
  .classic-card.business h2 {
    font-size: 1.4rem;
  }
  .classic-services {
    gap: 1.35rem;
    margin-top: 2.4rem;
  }
  .classic-services li,
  .business-copy p {
    font-size: 0.95rem;
  }
}
