/* ============================================================
   style.css — VioNiLa (نسخة نظيفة ومحسنة للهيدر والتوسيط)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

/* ─── المتغيرات (ألوان الموقع) ─── */
:root {
  --gold:         #b8922a;
  --gold-dark:    #9a7920;
  --gold-light:   #f5e9c8;
  --bg:           #f7f3ec;
  --card-bg:      #ffffff;
  --text:         #1e1a14;
  --text-muted:   #7a6f5e;
  --border:       #e2d8c8;
  --secondary-bg: #ede8df;
  --danger:       #d9534f;
  --radius:       12px;
  --shadow:       0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.14);
}

/* ─── ريسيت عام ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─── صفحات (الرئيسية / الأدمن) ─── */
.page { display: none; flex-direction: column; flex: 1; }
.page.active { display: flex; }

/* ─── هيدر (تصميم مطور ومرن) ─── */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.header-inner {
  position: relative; 
  max-width: 1280px;
  margin: auto;
  padding: 0 1.25rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

 /* اللوجو مصفوف من اليسار لليمين ليناسب الإنجليزية */


.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-direction: row;
  direction: ltr;
  z-index: 10;
}

.logo-icon {
  width: 58px;
  height: 58px;
  background: #f3ead6;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(184,146,42,.22);
  flex-shrink: 0;
}

.logo-mark {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.logo-text {
  text-align: left;
}

.logo-text h1 {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.logo-text p {
  font-size: .7rem;
  color: var(--text-muted);
}


/* أرقام الهواتف: موسطة تماماً بالمنتصف على الديسكتوب واللاب توب */
.header-phones {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  font-size: .82rem;
  font-weight: 700;
  background: var(--secondary-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .5rem .9rem;
  gap: .2rem;
  z-index: 5;
}
.header-phones span { display: flex; align-items: center; gap: .4rem; direction: ltr; }
.header-phones svg { color: var(--gold); flex-shrink: 0; }

/* زر الهامبرجر المنيو */
.menu-toggle {
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--secondary-bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  transition: border-color .2s, background .2s;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--text);
  border-radius: 999px;
}
.menu-toggle:hover { 
  border-color: var(--gold); 
  background: #fff;
}

/* ─── القائمة الجانبية (Drawer) ─── */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,14,8,.45);
  backdrop-filter: blur(4px);
  z-index: 205;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.menu-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 90vw);
  height: 100vh;
  background: rgba(255,255,255,.98);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 40px rgba(0,0,0,.18);
  z-index: 220;
  transform: translateX(102%);
  transition: transform .25s ease;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.menu-drawer.open { transform: translateX(0); }
.menu-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.menu-drawer-head strong {
  font-size: 1.05rem;
  font-weight: 900;
}
.menu-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--secondary-bg);
  font-size: 1.35rem;
  font-weight: 700;
}
.menu-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--secondary-bg);
  border-radius: 18px;
  border: 1px solid var(--border);
}
.menu-kicker {
  font-size: .76rem;
  font-weight: 800;
  color: var(--gold-dark);
  letter-spacing: .02em;
}
.menu-link {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  text-align: right;
}
.menu-link:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

/* ─── بانر (Hero) ─── */
.hero {
  position: relative;
  background: #1e1a14;
}
.hero img {
  width: 100%; height: auto;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.02), rgba(0,0,0,.18));
}

.intro-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 1.25rem 0;
  position: relative;
  z-index: 1;
}
.intro-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,243,236,.98));
  border: 1px solid rgba(184,146,42,.22);
  border-radius: 28px;
  box-shadow: 0 16px 42px rgba(0,0,0,.08);
  text-align: center;
  padding: 2.5rem 1.8rem 2rem;
}
.intro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.5rem;       /* 👈 كبّرنا الإطار الداخلي للبادج (طول وعرض) */
  border-radius: 999px;
  background: var(--gold-light);
  color: var(--gold-dark);
  font-size: 1.25rem;           /* 👈 كبّرنا النص (كان .76rem) */
  font-weight: 800;
  margin-bottom: 1.2rem;       /* 👈 زيادة مسافة بسيطة بينه وبين العنوان */
}
.intro-card h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.22;
  color: var(--text);
  margin-bottom: .55rem;
}
.intro-card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 760px;
  margin: 0 auto;
}
.intro-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
}
.intro-pills span {
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .82rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

/* ─── كتالوج ─── */
.catalog {
  max-width: 1280px;
  margin: auto;
  padding: 1.8rem 1.25rem 4rem;
  width: 100%;
}
.catalog-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.catalog-header h2 {
  font-size: 2rem;
  font-weight: 800;
  display: inline-block;
  border-bottom: 3px solid var(--gold);
  padding-bottom: .4rem;
  padding-inline: 2rem;
  margin-bottom: .5rem;
}
.catalog-header p { color: var(--text-muted); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

/* ─── كارد المنتج ─── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-img {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--secondary-bg);
  cursor: pointer;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.product-card:hover .card-img img { transform: scale(1.06); }

/* 🛠️ تعديل الكود ليكون تحت الاسم الرئيسي تماماً وبدون تداخل */
.card-code {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: var(--secondary-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .18rem .6rem;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.2;
  width: fit-content;
  margin: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.03);
}
.card-code svg { color: var(--gold); }

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.card-name  { font-size: 1.1rem; font-weight: 800; line-height: 1.4; }

.card-title-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .22rem;
  margin-bottom: .45rem;
}

/* لحفظ السطور والمسافات تلقائياً */
.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-line;
  margin-top: .3rem;
}

.card-meta {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .2rem;
}
.card-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  color: var(--text-muted);
  background: var(--secondary-bg);
  border-radius: 6px;
  padding: .25rem .6rem;
}
.card-meta svg { color: var(--gold); flex-shrink: 0; }

.card-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .6rem;
}
/* الصف الجديد الجامع للبادجات على نفس السطر */
.card-badges-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  margin-top: auto;
  padding-top: .6rem;
  width: 100%;
}

.shipping-badge,
.price-offer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  white-space: nowrap;
  padding: .25rem .55rem;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7263d, #f39c12);
  color: #fff;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 4px 12px rgba(215,38,61,.22);
}
.price-compare {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .22rem;
  flex-wrap: wrap;
}
.price-compare-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 700;
}
.price-compare-value {
  font-size: .95rem;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(122,111,94,.85);
  font-weight: 800;
}
.card-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .65rem;
  margin-top: .18rem;
}
.card-price-row .card-price {
  flex: 0 0 auto;
}
.card-price-row .price-offer-badge {
  margin-bottom: .08rem;
  flex-shrink: 0;
}
.card-price-label { font-size: .72rem; color: var(--text-muted); font-weight: 700; margin-bottom: .2rem; }
.card-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.card-price small { font-size: .85rem; font-weight: 500; color: var(--text-muted); }

.btn-order {
  font-weight: 700;
  font-size: .85rem;
  padding: .6rem 1.05rem;
  border-radius: 10px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 12px rgba(184,146,42,.35);
}
.btn-order:hover { background: var(--gold-dark); transform: translateY(-1px); }

/* ─── نظام المراجعات والآراء ─── */
.reviews-section { padding: 50px 20px; background: #fcfbf7; text-align: center; }
.reviews-section h2 { color: #222; font-weight: 700; margin-bottom: 5px; }
.review-form-card { max-width: 600px; margin: 30px auto; background: #fff; padding: 20px; border-radius: 12px; border: 1px solid rgba(161, 130, 74, 0.15); box-shadow: 0 4px 15px rgba(0,0,0,0.02); text-align: right; }
.review-form-card h4 { margin-bottom: 15px; color: #a1824a; }
.form-group-row { display: flex; gap: 10px; margin-bottom: 10px; }
.review-form-card input, .review-form-card select, .review-form-card textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; box-sizing: border-box; }
.btn-submit-review { background: #a1824a; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; width: 100%; margin-top: 10px; transition: 0.3s; }
.btn-submit-review:hover { background: #85693c; }
.reviews-grid { max-width: 800px; margin: 40px auto; display: flex; flex-direction: column; gap: 15px; }
.review-card { background: #fff; padding: 20px; border-radius: 10px; text-align: right; border: 1px solid #eee; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.01); }
.review-card .rev-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-card .rev-name { font-weight: bold; color: #333; }
.review-card .rev-stars { color: #ffbc00; }
.review-card .rev-text { color: #555; font-size: 0.95rem; line-height: 1.6; }
.review-card .rev-date { font-size: 0.75rem; color: #999; display: block; margin-top: 8px; }
.btn-delete-review { position: absolute; left: 15px; bottom: 15px; background: #ff4d4d; color: white; border: none; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; opacity: 0.6; transition: 0.3s; }
.btn-delete-review:hover { opacity: 1; }

/* ─── فوتر ─── */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: .88rem;
}
footer strong { display: block; margin-bottom: .4rem; color: var(--text); font-weight: 700; }
footer .footer-phones { display: flex; justify-content: center; gap: 1rem; direction: ltr; }

/* ─── المودال (نافذة الطلب) ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(.95) translateY(16px);
  transition: transform .28s;
  max-height: 90vh;
}
.overlay.open .modal { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.12);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  z-index: 10;
  transition: background .2s;
}
.modal-close:hover { background: rgba(0,0,0,.28); }

.modal-product {
  width: 40%;
  flex-shrink: 0;
  position: relative;
  min-height: 320px;
  background: #111;
}
.modal-product img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .8;
}
.modal-product-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.35) 55%, transparent 100%);
}
.modal-product-info {
  position: absolute;
  bottom: 0;
  right: 0; left: 0;
  padding: 1.5rem;
  color: #fff;
  z-index: 2;
}
.modal-product-type {
  display: inline-block;
  background: rgba(184,146,42,.9);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: 999px;
  margin-bottom: .6rem;
}
.modal-product-info h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: .25rem; }

.modal-product-info .modal-code {
  font-size: .82rem;
  opacity: .8;
  margin-bottom: .75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.price-box {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: .75rem 1rem;
}
.price-box small { display: block; font-size: .75rem; opacity: .75; margin-bottom: .2rem; }
.price-box #modal-price-val { font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; }
.price-box #modal-price-val span { font-size: .9rem; font-weight: 500; color: #fff; opacity: .8; }
.price-box .price-compare {
  margin-bottom: .2rem;
}
.price-box .price-compare-label {
  color: rgba(255,255,255,.76);
}
.price-box .price-compare-value {
  color: rgba(255,255,255,.78);
  text-decoration-color: rgba(255,255,255,.8);
}

.modal-form-side {
  flex: 1;
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-form-title { font-size: 1.3rem; font-weight: 800; margin-bottom: .25rem; }
.modal-form-subtitle { font-size: .82rem; color: var(--text-muted); margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }

.form-row { display: grid; gap: .85rem; margin-bottom: .85rem; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }

.field label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--text);
}
.field label .req { color: var(--danger); }
.field label .opt { color: var(--text-muted); font-weight: 400; }
.field input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .65rem 1rem;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,146,42,.15);
}
.field input[dir="ltr"] { text-align: left; }

.calc-box {
  background: var(--secondary-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: .85rem;
}
.calc-box h4 { font-size: .9rem; font-weight: 800; margin-bottom: .85rem; }

.calc-title {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 900;
}

.calc-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .95rem;
  margin-bottom: .85rem;
}

.calc-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.calc-group-head strong {
  display: block;
  font-size: .95rem;
  font-weight: 900;
  color: var(--gold-dark);
}

.calc-group-head span {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.calc-grid { margin-bottom: .75rem; }

.input-with-unit {
  display: flex;
  align-items: stretch;
  gap: .5rem;
}

.input-with-unit input {
  flex: 1;
}

.field-suffix {
  min-width: 44px;
  border-radius: 10px;
  background: var(--gold-light);
  color: var(--gold-dark);
  font-size: .85rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184,146,42,.2);
}

.calc-result-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: #fdfaf2;
  border: 1px solid rgba(184,146,42,.45);
  border-radius: 12px;
  padding: .75rem .9rem;
}

.calc-result-inline label {
  margin: 0;
  font-size: .85rem;
  font-weight: 800;
  color: var(--text);
}

.calc-result-inline input {
  width: 92px;
  border: 1px solid rgba(184,146,42,.55);
  background: #fff;
  border-radius: 9px;
  padding: .45rem .55rem;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.calc-roll-row {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: .75rem;
}

.calc-roll-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calc-roll-count label {
  width: 100%;
  text-align: center;
}

.calc-roll-count .counter-controls {
  justify-content: center;
}

.calc-roll-count .counter-controls input {
  width: 70px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .55rem .4rem;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

.calc-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .25rem 0 .85rem;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 800;
}

.calc-divider::before,
.calc-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.calc-divider span {
  padding: 0 .5rem;
}

.calc-summary {
  display: flex;
  gap: .5rem;
  margin-top: .85rem;
}

.calc-summary .calc-result-inline {
  flex: 1;
}

.calc-roll-output {
  gap: .55rem;
}

.calc-roll-output .result-field {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-inline-start: auto;
}

.calc-roll-output .result-field input {
  width: 98px;
}

.result-unit {
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.calc-total-box input {
  width: 140px;
  font-size: 1.12rem;
  color: var(--gold-dark);
}

.calc-total-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.shipping-badge--modal {
  margin-top: .55rem;
  margin-bottom: 0;
  padding: .34rem .85rem;
  font-size: .8rem;
  box-shadow: 0 10px 22px rgba(215,38,61,.24);
}

.wood-calc {
  display: grid;
  gap: .9rem;
}

.wood-calc-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.wood-calc-title {
  text-align: center;
  margin-bottom: .9rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--gold-dark);
}

.wood-calc-note {
  text-align: center;
  margin: -.35rem 0 .8rem;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.wood-calc-row {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: .75rem;
  direction: ltr;
}

.wood-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .8rem;
}

.wood-calc-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  direction: ltr;
}

.wood-calc-output {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  background: #fdfaf2;
  border: 1px solid rgba(184,146,42,.45);
  border-radius: 12px;
  padding: .75rem .9rem;
  direction: rtl;
}

.wood-calc-output label {
  margin: 0;
  font-size: .85rem;
  font-weight: 800;
  color: var(--text);
}

.wood-calc-output input {
  width: 100%;
  border: 1px solid rgba(184,146,42,.55);
  background: #fff;
  border-radius: 9px;
  padding: .45rem .55rem;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.wood-calc-input {
  direction: rtl;
}

.wood-calc-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 800;
}

.wood-calc-divider::before,
.wood-calc-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.wood-calc-divider span {
  padding: 0 .5rem;
}

.meters-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .7rem 1rem;
  margin-top: .65rem;
}
.meters-counter span { font-weight: 700; font-size: .9rem; }
.counter-controls { display: flex; align-items: center; gap: .75rem; }
.counter-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--secondary-bg);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  transition: background .15s;
}
.counter-btn:hover { background: var(--border); }
.counter-value { font-size: 1.15rem; font-weight: 800; min-width: 28px; text-align: center; }

.counter-controls input[type="number"] {
  -moz-appearance: textfield;
}
.counter-controls input[type="number"]::-webkit-outer-spin-button,
.counter-controls input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1.5px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
  margin-bottom: .85rem;
}
.total-label { font-size: 1.05rem; font-weight: 800; }
.total-value { font-size: 1.9rem; font-weight: 800; color: var(--gold); }
.total-value small { font-size: .85rem; font-weight: 500; color: var(--text-muted); }

.btn-submit {
  width: 100%;
  background: var(--gold);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(184,146,42,.35);
  transition: background .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.btn-submit:hover { background: var(--gold-dark); transform: translateY(-1px); }

.modal-phones {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 1rem;
  direction: ltr;
}

/* ─── مودال كتالوج الصور ─── */
.gallery-modal {
  background: #111;
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(.95) translateY(16px);
  transition: transform .28s;
}
.overlay.open .gallery-modal { transform: scale(1) translateY(0); }
.gallery-main {
  position: relative;
  height: 62vh;
  max-height: 480px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .2s;
}
.gallery-arrow:hover { background: rgba(255,255,255,.3); }
.gallery-prev { right: 12px; }
.gallery-next { left: 12px; }
.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  color: #fff;
}
.gallery-caption h3 { font-size: 1.05rem; font-weight: 800; }
.gallery-caption span { font-size: .8rem; color: rgba(255,255,255,.6); direction: ltr; }
.gallery-thumbs {
  display: flex;
  gap: .5rem;
  padding: 0 1.25rem 1.25rem;
  overflow-x: auto;
}
.gallery-thumbs img {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .5;
  border: 2px solid transparent;
  transition: opacity .2s, border-color .2s;
  flex-shrink: 0;
}
.gallery-thumbs img.active { opacity: 1; border-color: var(--gold); }

/* ─── صفحة الأدمن ─── */
.admin-page {
  max-width: 1280px;
  margin: auto;
  padding: 2.5rem 1.25rem;
  width: 100%;
  flex: 1;
}
.admin-login { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.admin-login-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 380px;
  width: 100%;
}
.admin-login-icon {
  width: 56px; height: 56px;
  background: var(--gold-light);
  color: var(--gold-dark);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}
.admin-login-box h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: .4rem; }
.admin-login-box p { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.admin-login-box input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .7rem 1rem;
  font-family: inherit;
  font-size: .95rem;
  margin-bottom: .9rem;
  outline: none;
  text-align: center;
}
.admin-login-box input:focus { border-color: var(--gold); }
.admin-login-box button {
  width: 100%;
  background: var(--gold);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  padding: .8rem;
  border-radius: 10px;
  transition: background .2s;
}
.admin-login-box button:hover { background: var(--gold-dark); }
.admin-login-error { color: var(--danger); font-size: .82rem; margin-top: .75rem; min-height: 1.2em; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-header h2 { font-size: 1.5rem; font-weight: 800; }
.admin-header p { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; }
.admin-header-actions { display: flex; gap: .6rem; }
.btn-admin-secondary {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: .85rem;
  padding: .55rem 1rem;
  border-radius: 10px;
  transition: border-color .2s, color .2s;
}
.btn-admin-secondary:hover { border-color: var(--gold); color: var(--gold-dark); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.stat-card.highlight { background: var(--gold-light); border-color: var(--gold); }
.stat-card.wide { grid-column: span 4; display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 700; margin-bottom: .4rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.stat-card.highlight .stat-value { color: var(--gold-dark); }

.btn-view-reset {
  margin-top: .65rem;
  padding: .42rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(184,146,42,.22);
  background: #fff;
  color: var(--gold-dark);
  font-size: .72rem;
  font-weight: 800;
  transition: .2s ease;
  width: fit-content;
}

.btn-view-reset:hover {
  background: var(--gold-light);
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* ─── جداول عامة (أدمن) ─── */
.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.orders-header h3 { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }

.empty-orders {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 5rem 2rem;
  box-shadow: var(--shadow);
}
.empty-orders .empty-icon {
  width: 72px; height: 72px;
  background: var(--secondary-bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  font-size: 1.8rem;
}
.empty-orders h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .4rem; }
.empty-orders p  { color: var(--text-muted); font-size: .9rem; }

.orders-table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
}
.orders-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}
.orders-table th {
  background: var(--secondary-bg);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.orders-table td {
  padding: .9rem 1rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: var(--secondary-bg); }
.orders-table .cell-name  { font-weight: 800; }
.orders-table .cell-addr  { font-size: .77rem; color: var(--text-muted); margin-top: .15rem; max-width: 220px; }
.orders-table .cell-total { font-weight: 800; color: var(--gold); white-space: nowrap; }
.orders-table .cell-date  { direction: ltr; display: flex; align-items: center; gap: .3rem; white-space: nowrap; }

.btn-order-delete {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
  box-shadow: 0 6px 16px rgba(229,57,53,.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-order-delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(229,57,53,.34);
  filter: brightness(1.02);
}

.btn-order-delete svg {
  display: block;
}

/* ─── toast إشعار صغير ─── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e1a14;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
  z-index: 999;
  transition: transform .3s;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── زرار واتساب العائم ─── */
.whatsapp-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  transition: transform .2s, box-shadow .2s;
  animation: wa-pulse 2.5s infinite;
}
.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.65);
  animation: none;
}
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.5); }
  50%      { box-shadow: 0 4px 32px rgba(37,211,102,.85); }
}

/* ─── الميديا كويري الشاشات اللوحية والمتوسطة (Responsive) ─── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card.wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  .header-phones { display: none !important; }
  
  .hero img {
    height: 120px;
    object-fit: cover;
  }
  .intro-panel { padding: 12px 10px 0; }
  .intro-card { padding: 1.2rem 1rem 1rem; border-radius: 18px; }
  .intro-card h2 { font-size: 1.4rem; line-height: 1.2; }
  .intro-card p { font-size: .82rem; }
  .intro-pills { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
  .intro-pills span { font-size: .72rem; padding: .45rem .6rem; white-space: nowrap; }
  .whatsapp-btn { width: 48px; height: 48px; right: 12px; bottom: 12px; }
}

/* الشاشات الصغيرة جداً والموبايل */
@media (max-width: 700px) {
  .menu-drawer { width: min(320px, 88vw); }
  .modal { flex-direction: column; max-height: 95vh; }
  .modal-product { width: 100%; min-height: 200px; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .modal-form-side { padding: 1.2rem; }
  .calc-roll-row { grid-template-columns: 1fr; }
  .calc-summary { flex-direction: column; }
  .wood-calc-row,
  .wood-calc-grid,
  .wood-calc-summary { grid-template-columns: 1fr; }
  .orders-table th:nth-child(n+4),
  .orders-table td:nth-child(n+4) { display: none; }
  .product-card .btn-order { width: 100%; text-align: center; }
}

@media (max-width: 600px) {
  .logo-text p { display: none; }
}

/* لف اتجاه شكل الأسهم الداخلي فقط */
.gallery-arrow svg, 
.gallery-arrow i, 
.gallery-arrow span {
    transform: rotate(180deg) !important;
    display: inline-block !important;
}

/*==============================
  Product Color Selector
===============================*/

.product-colors{
    margin:20px 0;
}

.product-colors-title{
    display:block;
    margin-bottom:12px;
    font-size:15px;
    font-weight:800;
    color:#333;
}

.product-colors-options{
    display:flex;
    justify-content:center;
    gap:16px;
}

.color-card{

    width:110px;

    padding:14px;

    border:2px solid #e6e6e6;

    border-radius:16px;

    background:#fff;

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:10px;

    cursor:pointer;

    transition:.25s;
    position: relative;

}

.color-card:hover{

    transform:translateY(-3px);

    border-color:#C89B3C;

}

.color-card.active{

    border-color:#C89B3C;

    background:#FFF9F0;

    box-shadow:0 10px 24px rgba(184,146,42,.18);

}

.color-preview{

    width:42px;

    height:42px;

    border-radius:50%;

    border:2px solid #fff;

    box-shadow:0 0 0 1px #ddd;

}

.color-code{
    font-size:12px;
    font-weight:800;
    color:#C89B3C;
    background:#fff7e7;
    border:1px solid rgba(200,155,60,.22);
    border-radius:999px;
    padding:3px 8px;
    line-height:1;
}

.color-title{

    font-size:14px;

    font-weight:700;

    color:#444;

}

.color-brown{

    background:#6B4423;

}

.color-gold{

    background:#C89B3C;

}


/* حاوية زرار اطلب والعرض الخاص */
.card-action-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
}
