@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --ink: #231b17;
  --ink-soft: #665951;
  --espresso: #35231d;
  --espresso-deep: #211613;
  --cream: #f8f3ed;
  --paper: #fffdf9;
  --line: #eadfd5;
  --copper: #bc7047;
  --copper-dark: #935237;
  --sage: #687467;
  --white: #fff;
  --shadow-sm: 0 8px 24px rgba(61, 37, 26, .08);
  --shadow-lg: 0 22px 60px rgba(39, 22, 15, .16);
  --radius: 22px;
  --radius-sm: 14px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', Arial, sans-serif;
  --font-ar: 'Cairo', Arial, sans-serif;
  --transition: 180ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .32;
  background:
    radial-gradient(circle at 10% 0%, rgba(188, 112, 71, .13), transparent 25rem),
    radial-gradient(circle at 100% 70%, rgba(104, 116, 103, .11), transparent 24rem);
}

html[dir="rtl"] body { font-family: var(--font-ar); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .logo-text { font-family: var(--font-ar); }

h1, h2, h3, .logo-text { font-family: var(--font-heading); line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 8vw, 5.8rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.2rem; }
p { color: var(--ink-soft); }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { font: inherit; }
img { display: block; max-width: 100%; }

.glass-panel {
  background: rgba(255, 253, 249, .84);
  border: 1px solid rgba(234, 223, 213, .92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0;
  background: rgba(248, 243, 237, .86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  padding: 10px 14px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  color: var(--espresso);
}

.logo::before {
  content: "✦";
  color: var(--copper);
  font-size: 1.45rem;
}

.logo-text {
  font-size: 1.35rem;
  letter-spacing: -.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.6vw, 34px);
}

.nav-links a {
  position: relative;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: center;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--copper-dark); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--espresso);
  background: var(--paper);
  cursor: pointer;
}

.btn-outline,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
  font-size: .88rem;
  font-weight: 700;
}

.btn-outline {
  color: var(--copper-dark);
  border: 1px solid rgba(188, 112, 71, .42);
  background: transparent;
}

.btn-outline:hover,
.btn-outline.active {
  color: var(--white);
  background: var(--copper);
  border-color: var(--copper);
}

.btn-primary {
  color: var(--white);
  border: 1px solid var(--copper);
  background: var(--copper);
  box-shadow: 0 8px 18px rgba(188, 112, 71, .22);
}

.btn-primary:hover {
  background: var(--copper-dark);
  border-color: var(--copper-dark);
  transform: translateY(-2px);
}

main {
  width: min(1180px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  padding: clamp(28px, 6vw, 72px) 0;
  flex: 1;
}

.hero {
  min-height: min(650px, 72vh);
  position: relative;
  overflow: hidden;
  margin-bottom: clamp(54px, 8vw, 104px);
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(90deg, rgba(33, 22, 19, .86), rgba(33, 22, 19, .18) 74%),
    url('IMG_2.PNG') center 58% / cover;
  border: 0;
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(33, 22, 19, .58), transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: clamp(18px, 5vw, 64px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-content h1 {
  max-width: 600px;
  margin-bottom: 18px;
  color: var(--white);
  letter-spacing: -.04em;
}

.hero-content p {
  max-width: 430px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.section-header {
  max-width: 720px;
  margin: 0 auto clamp(30px, 5vw, 52px);
  text-align: center;
}

.section-header h2 { color: var(--espresso); margin-bottom: 12px; }
.section-header p { font-size: 1rem; }

.section-header h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 16px auto 0;
  border-radius: 3px;
  background: var(--copper);
}

.grid-auto,
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  border-color: rgba(188, 112, 71, .5);
  box-shadow: 0 16px 36px rgba(61, 37, 26, .13);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: 230px;
  aspect-ratio: 1.22;
  object-fit: cover;
}

.grid-auto > .card:not(.category-card) { padding: 10px; }
.grid-auto > .card:not(.category-card) .card-img { border-radius: 16px; }

.category-card {
  min-height: 168px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.category-card i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--copper);
  background: #f7e9df;
  border-radius: 50%;
  font-size: 1.3rem;
}

.category-card .card-title { color: var(--espresso); }

#itemsGrid .card {
  padding: 10px !important;
  background: var(--paper);
}

#itemsGrid .card > div:last-child {
  padding: 12px 6px 4px;
}

#itemsGrid .card h3 {
  color: var(--espresso);
  font-family: var(--font-heading) !important;
}

#itemsGrid .card p { min-height: 44px; }
#itemsGrid .card .card-img { border-radius: 16px; height: 210px; }

footer {
  margin-top: auto;
  color: rgba(255,255,255,.78);
  background: var(--espresso-deep);
}

.footer-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 42px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 42px;
}

.footer-col h3 { margin-bottom: 14px; color: var(--white); }
.footer-col p { margin-bottom: 8px; color: rgba(255,255,255,.62); font-size: .9rem; }
.footer-col p i { width: 20px; color: #d69b77; }
.footer-col a { color: rgba(255,255,255,.72); }
.footer-col a:hover { color: #e2a47d; }
.footer-bottom {
  padding: 16px;
  color: rgba(255,255,255,.45);
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: .78rem;
}

.fab-cart,
.fab-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(33, 22, 19, .2);
}

.fab-cart { background: var(--copper); }
.fab-whatsapp { right: 20px; bottom: 88px; background: #25d366; }
.fab-cart:hover, .fab-whatsapp:hover { transform: translateY(-3px); }
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #281e19; /* لون الدائرة الداكن بناءً على الصورة */
  color: white;
  font-size: 0.9rem; /* تكبير الرقم قليلاً ليكون أوضح */
  font-weight: bold;
  font-family: Arial, sans-serif; /* خط قياسي يمنع مشاكل المحاذاة */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  
  /* أوامر التوسيط الإجباري */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1; /* إيقاف تداخل الأسطر */
  padding: 0;
  margin: 0;
  border: 2px solid #c49a6c; /* إطار ذهبي خفيف ليعطي جمالية مع الخلفية */
}

/* لا تنسَ إبقاء هذا الكود لضبطها في النسخة العربية */
html[dir="rtl"] .cart-badge {
  right: auto;
  left: -5px;
}

.map-container {
  padding: 10px !important;
  margin-bottom: 24px !important;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.map-container iframe {
  display: block;
  min-height: 500px;
  border-radius: 16px;
}

.contact-wrapper {
  width: min(620px, 100%);
  padding: clamp(34px, 7vw, 72px) 24px !important;
  margin: 0 auto !important;
  text-align: center;
}

.contact-wrapper > i { display: block; }
.contact-wrapper h3 { color: var(--espresso) !important; }

.cart-container {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 22px;
  align-items: start;
}

.cart-item {
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px !important;
  margin-bottom: 12px;
  background: var(--paper);
}

.cart-item img { width: 90px; height: 90px; border-radius: 14px; object-fit: cover; }
.item-details { flex: 1; }
.item-details h3 { color: var(--espresso); }

.quantity-control { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.8rem; 
  background: var(--cream); /* خلفية متناسقة مع الموقع */
  border: 1px solid var(--line); /* إطار خفيف وناعم */
  padding: 0.2rem 0.6rem; 
  border-radius: 20px; 
}

.quantity-control button { 
  background: transparent !important; /* منع أي خلفية تغطي على الزر */
  border: none !important; 
  color: var(--espresso) !important; /* إجبار المتصفح على إظهار اللون الداكن دائماً */
  font-size: 1.5rem !important; /* حجم كبير وواضح للإشارة */
  font-weight: 700 !important; /* جعل الإشارة عريضة */
  cursor: pointer; 
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 35px; /* عرض ثابت للزر لمنع اختفائه أو انكماشه */
  height: 35px;
  opacity: 1 !important; /* إجبار الظهور الكامل ومنع الشفافية */
  visibility: visible !important;
  transition: var(--transition);
}

.quantity-control button:hover {
  color: var(--copper) !important; 
  transform: scale(1.1); 
}

.quantity-control button:hover {
  color: var(--copper); /* استخدام اللون النحاسي الخاص بموقعك عند التمرير */
  transform: scale(1.1); /* تأثير تكبير بسيط عند التمرير */
}

/* لتنسيق الرقم الموجود بين الزرين (بافتراض أنه داخل وسم span) */
.quantity-control span {
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  min-width: 1.5rem;
  text-align: center;
}

.remove-btn { color: #b1554f; background: none; border: 0; cursor: pointer; font-size: 1rem; }
.order-summary { position: sticky; top: 100px; padding: 24px !important; background: var(--paper); }
.order-summary h3 { color: var(--espresso); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--ink-soft); }
.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  color: var(--copper-dark);
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .78rem; }
  .grid-auto, .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart-container { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

@media (max-width: 700px) {
  header { padding: 8px 0; }
  nav { min-height: 58px; padding: 8px 10px 8px 14px; }
  .logo-text { font-size: 1.1rem; }
  .logo::before { font-size: 1.1rem; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-outline { min-height: 38px; padding: 7px 11px; font-size: .75rem; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 16px;
    right: 16px;
    padding: 10px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.show { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: .9rem; }
  .nav-links a::after { display: none; }
  main { width: min(100% - 24px, 600px) !important; padding-top: 26px; }
  .hero {
    min-height: 560px;
    margin-bottom: 62px;
    align-items: flex-end;
    background-position: 60% center;
  }
  .hero-content { margin: 26px 22px; }
  .hero-content h1 { font-size: clamp(2.5rem, 13vw, 4.2rem); }
  .hero-content p { font-size: .95rem; }
  .section-header { margin-bottom: 28px; }
  .grid-auto, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-img { height: 180px; }
  .category-card { min-height: 140px; padding: 18px 10px; }
  .category-card i { width: 44px; height: 44px; font-size: 1rem; }
  .category-card .card-title { font-size: 1rem; }
  #itemsGrid .card .card-img { height: 150px; }
  #itemsGrid .card h3 { font-size: 1rem; }
  #itemsGrid .card p { font-size: .78rem !important; }
  .footer-content { width: min(100% - 32px, 600px); padding: 42px 0 30px; grid-template-columns: 1fr; gap: 26px; }
  .map-container iframe { min-height: 340px; }
  .cart-item { align-items: flex-start; flex-wrap: wrap; }
  .cart-item img { width: 72px; height: 72px; }
  .item-details { min-width: calc(100% - 100px); }
  .quantity-control { margin-left: 88px; }
}

@media (max-width: 390px) {
  .nav-actions .btn-outline { padding-inline: 8px; }
  .logo-text { font-size: 1rem; }
  .hero { min-height: 520px; }
  .grid-auto, .grid { gap: 10px; }
}