/* ===================================================
   سدرة للستائر والمفروشات — تصميم فاخر، هاتف أولًا، RTL
   =================================================== */

:root {
  --c-black: #0e0d0c;
  --c-black-soft: #1a1815;
  --c-gold: #c9a227;
  --c-gold-light: #e6c667;
  --c-gold-dark: #a3811d;
  --c-beige: #f3ead9;
  --c-beige-dark: #e4d5b7;
  --c-beige-soft: #faf6ee;
  --c-text: #241f19;
  --c-text-soft: #5a5147;
  --c-whatsapp: #25d366;
  --c-whatsapp-dark: #1da851;
  --shadow-soft: 0 6px 24px rgba(14, 13, 12, 0.12);
  --shadow-strong: 0 10px 34px rgba(14, 13, 12, 0.28);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  direction: rtl;
  text-align: right;
  font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, sans-serif;
  background: var(--c-beige-soft);
  color: var(--c-text);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--c-black) 0%, var(--c-black-soft) 100%);
  color: var(--c-beige);
  box-shadow: var(--shadow-soft);
}

/* شبكة Grid ثابتة: صف أول = لوجو+اسم و أزرار التواصل، صف ثانٍ = الهاتف والعنوان بعرض كامل
   هذا يمنع اختفاء اسم النشاط الذي كان يحدث مع Flexbox عند ضيق المساحة */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand   actions"
    "meta    meta";
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  padding: 8px 12px;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fffdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(230, 198, 103, 0.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
  overflow: hidden;
  padding: 3px;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  min-width: 0;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--c-gold-light);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 6px;
  font-size: 10.5px;
  color: #cbc1b0;
  line-height: 1.3;
}
.header-meta .dot { opacity: 0.5; }
.header-meta .phone-link { color: var(--c-beige); font-weight: 700; white-space: nowrap; }
.header-meta .area-text { white-space: normal; }

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: none;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.hbtn:active { transform: scale(0.92); }
.hbtn svg { width: 16px; height: 16px; }
.hbtn-label { display: none; }

.hbtn-wa {
  background: linear-gradient(135deg, #2fe073, var(--c-whatsapp-dark));
  color: #fff;
  box-shadow: 0 3px 10px rgba(37,211,102,0.35);
}
.hbtn-call {
  background: linear-gradient(135deg, var(--c-gold-light), var(--c-gold-dark));
  color: var(--c-black);
  box-shadow: 0 3px 10px rgba(201,162,39,0.35);
}

@media (min-width: 640px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand meta actions";
    column-gap: 20px;
    padding: 11px 24px;
  }
  .brand-logo { width: 46px; height: 46px; border-radius: 13px; }
  .brand-name { font-size: 16.5px; }
  .header-meta { font-size: 12px; gap: 8px; flex-wrap: nowrap; justify-self: start; }
  .header-meta .area-text { white-space: nowrap; }
  .hbtn { width: 40px; height: 40px; }
  .hbtn svg { width: 18px; height: 18px; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 56vh;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--c-beige-soft);
  background-color: #1a1815;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-bg-fallback { background-image: url("../img/hero-fallback.svg"); }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 85% 70% at 50% 50%, rgba(9,8,7,0.74) 0%, rgba(9,8,7,0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 20px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--c-gold-light);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(230, 198, 103, 0.5);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: rgba(0,0,0,0.28);
}

.hero-title {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 12px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.hero-title span { color: var(--c-gold-light); }

.hero-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #ece5d6;
  margin: 0 0 22px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-gold {
  background: linear-gradient(135deg, var(--c-gold-light), var(--c-gold-dark));
  color: var(--c-black);
  box-shadow: 0 6px 18px rgba(201,162,39,0.35);
}
.btn-outline-light {
  background: rgba(255,255,255,0.08);
  color: var(--c-beige-soft);
  border: 1.5px solid rgba(243,234,217,0.6);
}
.btn-whatsapp {
  background: linear-gradient(135deg, #2fe073, var(--c-whatsapp-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(37,211,102,0.4);
}

@media (min-width: 640px) {
  .hero { min-height: 62vh; max-height: 600px; }
  .hero-content { max-width: 760px; padding: 40px; }
  .hero-title { font-size: 38px; }
  .hero-desc { font-size: 16.5px; max-width: 42em; }
}

/* ============ Section heading ============ */
.section { padding: 40px 0 20px; }
.section-head { text-align: center; margin-bottom: 26px; padding: 0 10px; }
.section-kicker {
  display: block;
  color: var(--c-gold-dark);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-black);
  margin: 0 0 8px;
}
.section-sub {
  font-size: 13.5px;
  color: var(--c-text-soft);
  max-width: 40em;
  margin: 0 auto;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .section-title { font-size: 28px; }
  .section-sub { font-size: 15px; }
}

/* ============ Products grid ============ */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 720px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--c-beige-dark);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(201,162,39,0.22);
  border-color: var(--c-gold);
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--c-beige) 0%, var(--c-beige-dark) 100%);
  overflow: hidden;
  cursor: pointer;
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media .placeholder-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-gold-dark);
  opacity: 0.55;
}
.product-media .placeholder-icon svg { width: 56px; height: 56px; }

.product-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.product-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--c-black);
  margin: 0;
}

.product-desc {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer { margin-top: auto; padding-top: 10px; }

.btn-details {
  width: 100%;
  background: var(--c-black);
  color: var(--c-gold-light);
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13.5px;
  border: 1px solid var(--c-black);
  transition: background .15s ease;
}
.btn-details:active { background: var(--c-black-soft); }

/* ============ Modal / Bottom sheet ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,13,12,0.6);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; }

.modal-sheet {
  background: var(--c-beige-soft);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
.modal-overlay.active .modal-sheet { transform: translateY(0); }

@media (min-width: 720px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: var(--radius-lg); max-height: 88vh; }
}

.modal-handle {
  width: 42px; height: 4px;
  background: var(--c-beige-dark);
  border-radius: 999px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px 16px;
  flex-shrink: 0;
  gap: 8px;
}
.modal-title {
  font-size: 16px; font-weight: 800; color: var(--c-black);
  min-width: 0; flex-shrink: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-beige);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-black);
  font-size: 16px;
  flex-shrink: 0;
}

.modal-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
}

/* --- Gallery / slider --- */
.gallery-main {
  position: relative;
  width: 100%;
  height: 45vh;
  max-height: 380px;
  min-height: 200px;
  background: linear-gradient(135deg, var(--c-beige) 0%, var(--c-beige-dark) 100%);
  overflow: hidden;
  touch-action: pan-y;
}
.gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-main .placeholder-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-gold-dark);
  opacity: 0.5;
}
.gallery-main .placeholder-icon svg { width: 72px; height: 72px; }

/* تدرّج خفيف أسفل الصورة لتوضيح وجود محتوى بعدها */
.gallery-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(to top, rgba(10,9,8,0.5), transparent);
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 720px) {
  .gallery-main { height: 420px; max-height: none; }
}

/* مؤشر "اسحب لأعلى لعرض التفاصيل" — بجانب عنوان المنتج أعلى النافذة */
.swipe-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--c-black);
  background: linear-gradient(135deg, var(--c-gold-light), var(--c-gold-dark));
  border-radius: 999px;
  padding: 6px 11px;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 3px 10px rgba(201,162,39,0.4);
  transition: opacity .25s ease, transform .25s ease;
  animation: hint-glow 2.4s ease-in-out infinite;
}
.swipe-hint .arrow-down {
  display: inline-flex;
  align-items: center;
  animation: swipe-bounce 1.2s ease-in-out infinite;
}
.swipe-hint .arrow-down svg { width: 11px; height: 11px; display: block; }
.swipe-hint.is-hidden { opacity: 0; transform: scale(0.85); pointer-events: none; }
@keyframes swipe-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@keyframes hint-glow {
  0%, 100% { box-shadow: 0 3px 10px rgba(201,162,39,0.4); }
  50% { box-shadow: 0 3px 16px rgba(201,162,39,0.75); }
}

/* على الشاشات الضيّقة جدًا: أخفِ النص وأبقِ الأيقونة فقط لتفادي الازدحام */
@media (max-width: 379px) {
  .swipe-hint { padding: 0; width: 28px; height: 28px; justify-content: center; }
  .swipe-hint-text { display: none; }
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(14,13,12,0.45);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.gallery-arrow:active { background: rgba(14,13,12,0.7); }
.gallery-arrow svg { width: 18px; height: 18px; }
.gallery-arrow-prev { right: 10px; }
.gallery-arrow-next { left: 10px; }

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}
.gallery-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  border: none;
  padding: 0;
  transition: transform .15s ease, background .15s ease;
}
.gallery-dot.active { background: var(--c-gold-light); transform: scale(1.35); }

.gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.65;
  background: var(--c-beige);
  padding: 0;
  transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumb.active { border-color: var(--c-gold); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- Fullscreen lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6,6,5,0.96);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto; height: auto;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

.modal-details {
  padding: 4px 18px 6px;
  margin-top: 4px;
  border-top: 1px solid var(--c-beige-dark);
}
.modal-details-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-black);
  margin: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-details-title::before {
  content: "";
  width: 4px; height: 16px;
  border-radius: 999px;
  background: var(--c-gold);
  display: inline-block;
}

.modal-desc p {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--c-text);
  margin: 0 0 12px;
}
.modal-desc p:last-child { margin-bottom: 0; }

.modal-features { margin-top: 18px; }
.modal-features h5 {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--c-gold-dark);
  margin: 0 0 10px;
  letter-spacing: .2px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-text);
  margin-bottom: 8px;
}
.feature-list li::before {
  content: "";
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 2px;
  background: var(--c-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px 6px;
}
.modal-actions .btn { width: 100%; padding: 14px; font-size: 14.5px; }
.modal-actions .modal-wa-btn { padding: 16px; font-size: 15.5px; }

@media (min-width: 480px) {
  .modal-actions { flex-direction: row; }
  .modal-actions .modal-wa-btn { flex: 1.3; }
  .modal-actions .btn-gold { flex: 1; }
}

/* ============ Floating buttons ============ */
.floating-btns {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
.fab {
  position: absolute;
  bottom: calc(18px + var(--safe-bottom));
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-strong);
  pointer-events: auto;
  border: none;
}
.fab svg { width: 26px; height: 26px; }
.fab-whatsapp {
  right: 16px;
  background: linear-gradient(135deg, #2fe073, var(--c-whatsapp-dark));
  color: #fff;
}
.fab-call {
  left: 16px;
  background: linear-gradient(135deg, var(--c-gold-light), var(--c-gold-dark));
  color: var(--c-black);
}
.fab:active { transform: scale(0.92); }

.fab-whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.55);
  animation: fab-pulse 2.2s ease-out infinite;
}
@keyframes fab-pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ============ Footer ============ */
.site-footer {
  background: var(--c-black);
  color: var(--c-beige);
  padding: 30px 0 calc(90px + var(--safe-bottom));
  text-align: center;
  margin-top: 30px;
}
.footer-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--c-gold-light);
  margin-bottom: 6px;
}
.footer-line {
  font-size: 13px;
  color: #d8cfbd;
  margin-bottom: 4px;
}
.footer-icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 16px 0;
}
.footer-icons a {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(230,198,103,0.35);
  color: var(--c-gold-light);
}
.footer-icons svg { width: 19px; height: 19px; }
.footer-copy {
  font-size: 11.5px;
  color: #9a9182;
  margin-top: 14px;
  border-top: 1px solid rgba(230,198,103,0.15);
  padding-top: 14px;
}
.footer-credit {
  font-size: 14px;
  margin-top: 8px;
}
.footer-credit a {
  color: var(--c-gold-light);
  font-weight: 800;
  text-decoration: none;
}
.footer-credit a:hover {
  color: var(--c-beige);
}

@media (min-width: 640px) {
  .site-footer { padding-bottom: 40px; }
}

/* body lock when modal open */
body.modal-open { overflow: hidden; }

/* extra small screens safety (>=320px) */
@media (max-width: 359px) {
  .brand-name { font-size: 12px; }
  .header-meta { font-size: 9.5px; }
  .hero-title { font-size: 21px; }
  .hero-desc { font-size: 13px; }
}
