/* =========================================================
   La Foi Professional Cosmetics — Store Theme
   ========================================================= */
:root {
  --black: #0b0907;
  --ink: #15110c;
  --ink-2: #1f1912;
  --gold: #c9973b;
  --gold-light: #f3d27a;
  --gold-dark: #8a6420;
  --cream: #f8f2e8;
  --cream-2: #efe5d4;
  --text: #2a2218;
  --muted: #7d7060;
  --gold-grad: linear-gradient(135deg, #f6e27a 0%, #c9973b 45%, #f3d27a 70%, #a8772a 100%);
  --shadow-soft: 0 20px 50px -20px rgba(60, 40, 10, .25);
  --shadow-gold: 0 12px 30px -10px rgba(201, 151, 59, .55);
  --radius: 18px;
  --font-head: "El Messiri", "Tajawal", serif;
  --font-body: "Tajawal", system-ui, sans-serif;
  --font-latin: "Playfair Display", serif;
}

* { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}
html { overflow-x: clip; }
body.is-loading { overflow: hidden; }
/* ملاحظة: لا تستخدم class باسم intro-skip على html — يتشارك مع زر التخطي ويكسر التخطيط */
html.intro-seen #intro { display: none !important; }
html.intro-seen body.is-loading { overflow: auto; }
html.intro-seen .reveal { opacity: 1; transform: none; }
html.intro-seen .hero-bg img { transform: scale(1); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; }
a { text-decoration: none; }
::selection { background: var(--gold); color: #fff; }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-muted-2 { color: var(--muted) !important; }
.text-light-2 { color: rgba(255, 255, 255, .7) !important; }

/* =================== INTRO =================== */
#intro {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at center, #1d160d 0%, #050403 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
#intro.done { pointer-events: none; }
.intro-stage {
  position: relative;
  width: min(62vw, 300px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.intro-ring {
  position: absolute; inset: -14%;
  width: 128%; height: 128%;
  transform: rotate(-90deg);
}
.intro-ring circle {
  fill: none; stroke: url(#goldGrad); stroke-width: 1.4;
  stroke-dasharray: 604; stroke-dashoffset: 604;
  animation: drawRing 1.6s cubic-bezier(.65, 0, .35, 1) .2s forwards;
}
.intro-ring .ring-2 {
  stroke-width: .6; stroke-dasharray: 553; stroke-dashoffset: 553;
  opacity: .6; animation-delay: .5s;
}
@keyframes drawRing { to { stroke-dashoffset: 0; } }

.intro-logo {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; overflow: hidden;
  opacity: 0; transform: scale(.3) rotate(-25deg);
  filter: blur(10px);
  animation: logoIn 1.3s cubic-bezier(.2, .9, .25, 1.15) .9s forwards;
  box-shadow: 0 0 0 0 rgba(243, 210, 122, .0);
}
.intro-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
@keyframes logoIn {
  60% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); box-shadow: 0 0 80px 10px rgba(243, 210, 122, .25); }
}
.intro-shine {
  position: absolute; top: -20%; left: -60%;
  width: 40%; height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255, 245, 210, .75), transparent);
  transform: skewX(-20deg);
  animation: shine 1.1s ease-in-out 2.1s forwards;
}
@keyframes shine { to { left: 130%; } }

.intro-stage::after {
  content: ""; position: absolute; inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 210, 122, .35), transparent 60%);
  opacity: 0; animation: glow 2s ease-out 1.6s forwards;
}
@keyframes glow { 40% { opacity: 1; } to { opacity: .35; } }

.intro-text {
  margin-top: 3.2rem;
  font-family: var(--font-head); font-size: clamp(1.2rem, 4vw, 1.7rem);
  color: var(--gold-light); letter-spacing: 1px;
  display: flex; gap: .45em; direction: rtl;
}
.intro-text span {
  display: inline-block; opacity: 0; transform: translateY(18px);
  animation: letterIn .5s ease forwards;
}
@keyframes letterIn { to { opacity: 1; transform: none; } }

.intro-particles { position: absolute; inset: 0; pointer-events: none; }
.intro-particles i {
  position: absolute; bottom: -10px;
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 8px 2px rgba(243, 210, 122, .7);
  opacity: 0;
  animation: rise var(--d) linear var(--delay) infinite;
}
@keyframes rise {
  10% { opacity: .9; }
  90% { opacity: .5; }
  to { transform: translate(var(--x), -110vh); opacity: 0; }
}

.intro-curtain {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background: var(--black); transform: scaleY(0);
  z-index: 3;
}
.intro-curtain.top { top: 0; transform-origin: top; }
.intro-curtain.bottom { bottom: 0; transform-origin: bottom; }

#intro.leaving .intro-stage,
#intro.leaving .intro-text { transition: transform .8s cubic-bezier(.7, 0, .3, 1), opacity .6s; transform: scale(1.25); opacity: 0; }
#intro.leaving { transition: opacity .7s ease .55s; opacity: 0; }

button.intro-skip,
#introSkip {
  position: absolute; bottom: 28px; left: 28px; z-index: 4;
  background: transparent; border: 1px solid rgba(243, 210, 122, .4);
  color: var(--gold-light); border-radius: 50px; padding: .35rem 1.1rem;
  font-size: .85rem; transition: .3s;
}
button.intro-skip:hover,
#introSkip:hover { background: rgba(243, 210, 122, .12); }

/* =================== TOPBAR / NAV =================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  width: 100%;
}
.topbar { background: var(--black); color: var(--gold-light); padding: .5rem 0; letter-spacing: .3px; }
.main-nav {
  background: rgba(248, 242, 232, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 151, 59, .18);
  transition: .35s;
  padding: .6rem 0;
}
.site-header.is-scrolled .main-nav,
.main-nav.scrolled { box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .18); padding: .3rem 0; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; transition: .35s; }
.site-header.is-scrolled .brand-logo,
.main-nav.scrolled .brand-logo { width: 44px; height: 44px; }
.brand-name { font-family: var(--font-latin); font-size: 1.5rem; color: var(--ink); font-weight: 600; }
.main-nav .nav-link {
  font-weight: 500; color: var(--text); position: relative; padding: .5rem .2rem !important;
}
.main-nav .nav-link::after {
  content: ""; position: absolute; bottom: 2px; right: 0;
  width: 0; height: 2px; background: var(--gold-grad); transition: .35s;
}
.main-nav .nav-link:hover::after, .main-nav .nav-link.active::after { width: 100%; }
.main-nav .nav-link.active, .main-nav .nav-link:hover { color: var(--gold-dark); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid rgba(201, 151, 59, .3);
  color: var(--ink); font-size: 1.1rem; transition: .3s;
}
.icon-btn:hover { background: var(--ink); color: var(--gold-light); border-color: var(--ink); }
.navbar-toggler.icon-btn { border: 1px solid rgba(201, 151, 59, .3) !important; box-shadow: none !important; }
.badge-dot {
  position: absolute; top: -4px; left: -4px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px;
  background: var(--gold-grad); color: var(--black);
  font-size: .7rem; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(201, 151, 59, .35);
}
.badge-dot.bump { animation: bump .5s; }
@keyframes bump { 50% { transform: scale(1.45); } }

/* زر السلة الواضح */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .45rem 1rem .45rem .85rem;
  border-radius: 999px;
  border: 1.5px solid rgba(201, 151, 59, .45);
  background: var(--ink);
  color: var(--gold-light);
  font-weight: 800;
  font-size: .92rem;
  line-height: 1;
  transition: .3s;
  box-shadow: 0 10px 22px -14px rgba(20, 14, 6, .55);
}
.cart-btn i { font-size: 1.1rem; }
.cart-btn-label { display: none; }
.cart-btn .cart-badge {
  position: static;
  inset: auto;
  margin-inline-start: .1rem;
  min-width: 22px;
  height: 22px;
}
.cart-btn:hover {
  background: var(--gold-grad);
  color: var(--black);
  border-color: transparent;
  transform: translateY(-1px);
}
.cart-btn:hover .cart-badge {
  background: var(--ink);
  color: var(--gold-light);
}

/* =================== BUTTONS =================== */
.btn { border-radius: 50px; font-weight: 600; padding-inline: 1.6rem; transition: .35s; }
.btn-gold {
  background: var(--gold-grad); background-size: 200% 200%;
  color: var(--black); border: none; box-shadow: var(--shadow-gold);
}
.btn-gold:hover { background-position: 100% 0; color: var(--black); transform: translateY(-2px); box-shadow: 0 18px 35px -10px rgba(201, 151, 59, .7); }
.btn-outline-gold { border: 1.5px solid var(--gold-light); color: var(--gold-light); background: transparent; }
.btn-outline-gold:hover { background: var(--gold-light); color: var(--black); }
.btn-dark-gold { background: var(--ink); color: var(--gold-light); border: 1px solid var(--ink); }
.btn-dark-gold:hover { background: var(--gold); color: var(--black); border-color: var(--gold); }

/* =================== HERO =================== */
.hero {
  position: relative; min-height: calc(100vh - 110px);
  display: flex; align-items: center;
  color: #fff; overflow: hidden; padding: 6rem 0;
}
.hero-bg {
  position: absolute; inset: 0; overflow: hidden;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 68% center;
  display: block;
  transform: scale(1.08);
  transition: transform 2.5s cubic-bezier(.2, .8, .2, 1);
}
body.loaded .hero-bg img { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(270deg, rgba(8, 6, 4, .92) 0%, rgba(8, 6, 4, .7) 45%, rgba(8, 6, 4, .1) 100%);
}
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: 1px;
  color: var(--gold); padding: .35rem 1rem; border-radius: 50px;
  border: 1px solid rgba(201, 151, 59, .45); margin-bottom: 1.2rem;
  background: rgba(201, 151, 59, .08);
}
.hero .eyebrow { color: var(--gold-light); }
.hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.25; margin-bottom: 1.2rem; }
.hero-sub { font-size: 1.15rem; color: rgba(255, 255, 255, .78); max-width: 520px; margin-bottom: 2rem; line-height: 1.9; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-latin); font-size: 2rem; color: var(--gold-light); }
.hero-stats span { font-size: .9rem; color: rgba(255, 255, 255, .65); }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(243, 210, 122, .6); border-radius: 20px;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold-light); border-radius: 4px; animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { to { transform: translateY(14px); opacity: 0; } }

/* =================== FEATURES =================== */
.features { padding: 0; margin-top: -55px; position: relative; z-index: 2; }
.features .row { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1.6rem .5rem; margin: 0; }
.feature i { font-size: 2rem; color: var(--gold); display: inline-block; margin-bottom: .5rem; transition: .4s; }
.feature:hover i { transform: translateY(-6px) rotate(-8deg); }
.feature h6 { margin-bottom: .2rem; }
.feature p { margin: 0; font-size: .85rem; color: var(--muted); }

/* =================== SECTIONS =================== */
.section { padding: 6rem 0; }
.section-head { margin-bottom: 3rem; }
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--ink); margin-bottom: .6rem; }
.section-sub { color: var(--muted); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2.5rem; }
.filter-btn {
  border: 1px solid rgba(201, 151, 59, .35); background: transparent;
  padding: .5rem 1.4rem; border-radius: 50px; font-weight: 500; color: var(--text); transition: .3s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.filter-btn.active { background: var(--ink); color: var(--gold-light); border-color: var(--ink); }
.sort-select { width: auto; border-radius: 50px; border-color: rgba(201, 151, 59, .35); background-color: transparent; }

/* Product card */
.p-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 25px -18px rgba(60, 40, 10, .4);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
  height: 100%; display: flex; flex-direction: column;
  animation: cardIn .6s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(25px); } }
.p-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }
.p-media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--cream-2); }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.p-card:hover .p-media img { transform: scale(1.08); }
.p-tag {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--ink); color: var(--gold-light);
  font-size: .75rem; font-weight: 700; padding: .25rem .8rem; border-radius: 50px;
}
.p-tag.sale { background: var(--gold-grad); color: var(--black); }
.p-actions {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: flex; flex-direction: column; gap: .5rem;
}
.p-actions button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: #fff; color: var(--ink); box-shadow: 0 6px 15px -6px rgba(0, 0, 0, .3);
  transform: translateX(-60px); opacity: 0; transition: .35s;
}
.p-actions button:nth-child(2) { transition-delay: .07s; }
.p-card:hover .p-actions button, .p-actions button.on { transform: none; opacity: 1; }
.p-actions button:hover { background: var(--ink); color: var(--gold-light); }
.p-actions button.on { color: #c0392b; }
.p-actions button.on:hover { color: #ff7b6b; }
.p-add {
  position: absolute; bottom: 0; left: 0; right: 0;
  border: none; padding: .85rem; font-weight: 700;
  background: var(--ink); color: var(--gold-light);
  transform: translateY(100%); transition: .4s;
  text-decoration: none; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.p-add:hover { background: var(--gold); color: var(--black); }
.p-card:hover .p-add { transform: none; }
.p-body { padding: 1.2rem 1.3rem 1.4rem; flex-grow: 1; display: flex; flex-direction: column; }
.p-cat { font-size: .78rem; color: var(--gold-dark); font-weight: 700; }
.p-title { font-size: 1.1rem; margin: .3rem 0 .4rem; color: var(--ink); }
.p-rating { color: var(--gold); font-size: .8rem; margin-bottom: .6rem; }
.p-rating span { color: var(--muted); margin-inline-start: .3rem; }
.p-price { margin-top: auto; display: flex; align-items: baseline; gap: .6rem; }
.p-price strong { font-size: 1.25rem; color: var(--ink); }
.p-price del { color: var(--muted); font-size: .9rem; }
.p-foot {
  margin-top: .85rem;
  display: none;
  align-items: center;
  gap: .55rem;
}
.p-add-mobile {
  flex: 1 1 auto;
  display: none;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 40px;
  padding: .45rem .75rem;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold-light);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 18px -12px rgba(20, 14, 6, .55);
}
.p-add-mobile i { font-size: 1rem; }
.p-add-mobile:active { transform: scale(.98); }
a.p-add-mobile { background: transparent; color: var(--ink); border: 1.5px solid rgba(201, 151, 59, .45); box-shadow: none; }

/* =================== OFFER =================== */
.offer { padding: 2rem 0 0; }
.offer-box {
  background: radial-gradient(circle at 20% 50%, #2a2014 0%, var(--black) 70%);
  border-radius: 28px; padding: clamp(2rem, 5vw, 4rem); color: #fff;
  position: relative; overflow: hidden; border: 1px solid rgba(201, 151, 59, .25);
}
.offer-box::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(243, 210, 122, .15); top: -150px; left: -120px;
}
.offer-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.code-pill { background: rgba(243, 210, 122, .15); color: var(--gold-light); padding: .15rem .7rem; border-radius: 8px; border: 1px dashed var(--gold); font-family: monospace; letter-spacing: 1px; }
.countdown { display: flex; gap: .8rem; }
.countdown div {
  width: 78px; padding: .8rem 0; text-align: center; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 210, 122, .25);
}
.countdown strong { display: block; font-family: var(--font-latin); font-size: 1.8rem; color: var(--gold-light); }
.countdown span { font-size: .78rem; color: rgba(255, 255, 255, .6); }
.offer-img { position: relative; display: inline-block; max-width: 400px; width: 100%; }
.offer-img img { width: 100%; border-radius: 50%; aspect-ratio: 1; object-fit: cover; box-shadow: 0 0 0 10px rgba(243, 210, 122, .08), 0 0 0 22px rgba(243, 210, 122, .04); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
.offer-products { margin-top: 1.75rem; padding-bottom: .5rem; }
.offer-products.is-empty { margin-top: 1rem; }
.offer-products .p-card {
  background: #fff;
  border: 1px solid rgba(201, 151, 59, .16);
  box-shadow: 0 14px 36px -22px rgba(60, 40, 10, .35);
}
.offer-badge {
  position: absolute; top: 10%; right: 4%;
  width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--black); font-weight: 800; font-size: 1.4rem;
  font-family: var(--font-latin); direction: ltr; box-shadow: var(--shadow-gold); animation: spinIn 8s linear infinite;
}
@keyframes spinIn { 50% { transform: rotate(12deg) scale(1.06); } }

/* =================== ABOUT =================== */
.about-img { position: relative; }
.about-img img { width: 100%; border-radius: 200px 200px var(--radius) var(--radius); box-shadow: var(--shadow-soft); }
.about-card {
  position: absolute; bottom: 30px; left: -20px;
  background: #fff; border-radius: 16px; padding: 1rem 1.3rem;
  display: flex; align-items: center; gap: .8rem; box-shadow: var(--shadow-soft);
}
.about-card i { font-size: 2rem; color: var(--gold); }
.about-card strong { display: block; font-family: var(--font-head); color: var(--ink); }
.about-card small { color: var(--muted); }
.lead-2 { font-size: 1.1rem; line-height: 2; color: var(--muted); }
.about-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.about-list li { padding: .45rem 0; font-weight: 500; }
.about-list i { color: var(--gold); margin-inline-end: .5rem; font-size: 1.15rem; }

/* =================== REVIEWS =================== */
.reviews { background: var(--cream-2); }
.review { max-width: 700px; margin: 0 auto; text-align: center; padding: 1rem; }
.review .stars { color: var(--gold); font-size: 1.2rem; margin-bottom: 1rem; }
.review p { font-family: var(--font-head); font-size: clamp(1.2rem, 2.5vw, 1.6rem); line-height: 1.9; color: var(--ink); }
.review h6 { margin: 1rem 0 0; }
.review small { color: var(--muted); }
#reviewCarousel .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 0; }

/* =================== NEWSLETTER / FOOTER =================== */
.newsletter { background: var(--ink); color: #fff; padding: 3.5rem 0; }
.news-form { display: flex; gap: .5rem; background: rgba(255, 255, 255, .06); padding: .4rem; border-radius: 50px; border: 1px solid rgba(243, 210, 122, .25); }
.news-form .form-control { background: transparent; border: none; color: #fff; box-shadow: none; padding-inline: 1.2rem; }
.news-form .form-control::placeholder { color: rgba(255, 255, 255, .5); }

.footer { background: var(--black); color: #fff; padding: 4rem 0 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  align-items: start;
}
.footer-logo { width: 90px; margin-bottom: 1rem; display: block; }
.footer-about { margin-bottom: 1.1rem; max-width: 28rem; line-height: 1.8; }
.footer-acc { border: 0; margin: 0; padding: 0; min-width: 0; }
.footer-acc > summary {
  list-style: none;
  color: var(--gold-light);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  cursor: default;
}
.footer-acc > summary::-webkit-details-marker { display: none; }
.footer-acc > summary::after { display: none; content: none; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: .6rem; color: rgba(255, 255, 255, .7); }
.footer ul a { color: rgba(255, 255, 255, .7); transition: .3s; }
.footer ul a:hover { color: var(--gold-light); padding-inline-start: 5px; }
.contact-list i { color: var(--gold); margin-inline-end: .5rem; }
.socials { display: flex; gap: .6rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(243, 210, 122, .3); color: var(--gold-light); transition: .3s;
}
.socials a:hover { background: var(--gold-grad); color: var(--black); transform: translateY(-3px); }
.footer hr { border-color: rgba(243, 210, 122, .15); margin: 2.5rem 0 1.5rem; opacity: 1; }

/* Floating */
.float-wa, .to-top {
  position: fixed; z-index: 1000; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; border: none; font-size: 1.4rem; transition: .35s;
}
.float-wa { bottom: 24px; right: 24px; background: #25d366; color: #fff; box-shadow: 0 10px 25px -8px rgba(37, 211, 102, .7); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); } 70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.to-top { bottom: 24px; left: 24px; background: var(--ink); color: var(--gold-light); opacity: 0; visibility: hidden; transform: translateY(20px); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold); color: var(--black); }

/* =================== OFFCANVAS / MODALS =================== */
.side-canvas { background: var(--cream); width: 400px !important; max-width: 92vw; }
.side-canvas .offcanvas-header { border-bottom: 1px solid rgba(201, 151, 59, .2); }
.side-canvas .offcanvas-title i { color: var(--gold); }
.cart-item { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px dashed rgba(201, 151, 59, .25); animation: cardIn .4s ease both; }
.cart-item img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.cart-item h6 { font-size: .95rem; margin-bottom: .25rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(201, 151, 59, .35); border-radius: 50px; }
.qty button { border: none; background: transparent; width: 30px; height: 30px; color: var(--ink); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.rm-btn { border: none; background: transparent; color: var(--muted); }
.rm-btn:hover { color: #c0392b; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 3.5rem; color: var(--gold); opacity: .6; }
.cart-footer { border-top: 1px solid rgba(201, 151, 59, .25); padding-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.cart-footer .total, .total { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.coupon { display: flex; gap: .4rem; margin-bottom: .5rem; }
.coupon .form-control { border-radius: 50px; }

.lux-modal { border-radius: 22px; border: none; background: var(--cream); overflow: hidden; position: relative; }
.modal-close { position: absolute; top: 16px; left: 16px; z-index: 5; background-color: #fff; border-radius: 50%; padding: .6rem; opacity: 1; }
.qv-img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.qv-body { padding: 2.2rem; }
.qv-body h3 { color: var(--ink); }
.qv-body .p-price strong { font-size: 1.6rem; }
.form-control, .form-select { border-color: rgba(201, 151, 59, .35); }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201, 151, 59, .2); }
.search-box { position: relative; }
.search-box i { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); color: var(--gold); }
.search-box .form-control { padding: .85rem 2.8rem .85rem 1rem; border-radius: 50px; }
.search-item { display: flex; gap: .8rem; align-items: center; padding: .6rem; border-radius: 12px; cursor: pointer; transition: .2s; }
.search-item:hover { background: #fff; }
.search-item img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; }
.success-icon {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--black); font-size: 2.6rem; animation: logoIn .7s cubic-bezier(.2, .9, .25, 1.4) forwards; opacity: 0; transform: scale(.3);
}
.lux-toast { background: var(--ink); color: var(--gold-light); border: 1px solid rgba(243, 210, 122, .3); border-radius: 14px; }

/* ===== توست إضافة للسلة / تنبيهات ودية ===== */
.lafoi-toast-host {
  position: fixed;
  z-index: 3000;
  inset-inline: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding-inline: 1rem;
  pointer-events: none;
}
.lafoi-toast {
  pointer-events: auto;
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem .95rem;
  border-radius: 18px;
  background: rgba(18, 14, 10, .96);
  color: #fff;
  border: 1px solid rgba(243, 210, 122, .28);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}
.lafoi-toast.is-in { opacity: 1; transform: none; }
.lafoi-toast.is-out { opacity: 0; transform: translateY(12px) scale(.98); }
.lafoi-toast-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(243, 210, 122, .16);
  color: var(--gold-light);
  font-size: 1.2rem;
}
.lafoi-toast--error .lafoi-toast-icon { background: rgba(220, 80, 70, .18); color: #ffb4ae; }
.lafoi-toast-media {
  width: 48px; height: 48px; border-radius: 14px; overflow: hidden;
  background: #2a2118; display: grid; place-items: center; flex: 0 0 auto;
  color: var(--gold-light); font-size: 1.35rem;
}
.lafoi-toast-media img { width: 100%; height: 100%; object-fit: cover; }
.lafoi-toast-copy { flex: 1 1 auto; min-width: 0; }
.lafoi-toast-copy strong {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: .15rem;
}
.lafoi-toast-copy p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lafoi-toast-copy small {
  display: block;
  margin-top: .2rem;
  font-size: .75rem;
  color: rgba(255, 255, 255, .55);
}
.lafoi-toast-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: 0 0 auto;
}
.lafoi-toast-cart-btn {
  border: 0;
  border-radius: 999px;
  padding: .45rem .85rem;
  background: var(--gold-grad);
  color: #1a140a;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.lafoi-toast-x {
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .75);
  display: grid; place-items: center;
  cursor: pointer;
}
.lafoi-toast-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.p-add.is-busy,
.p-add-mobile.is-busy,
.add-btn.is-busy,
.cart-btn.bump { pointer-events: none; }
.fly-img {
  position: fixed; z-index: 3100;
  width: 70px; height: 70px; border-radius: 50%;
  object-fit: cover; pointer-events: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  transition: all .8s cubic-bezier(.5, -.3, .7, 1);
}
.cart-btn.bump { animation: bump .55s ease; }

@media (max-width: 991.98px) {
  .lafoi-toast-host {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }
  .lafoi-toast { width: 100%; border-radius: 16px; }
  .lafoi-toast--cart { flex-wrap: wrap; }
  .lafoi-toast--cart .lafoi-toast-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: .15rem;
  }
  .lafoi-toast-cart-btn { flex: 1; min-height: 40px; }
}
@media (min-width: 992px) {
  .lafoi-toast-host {
    inset-inline: auto;
    inset-inline-end: 1.25rem;
    bottom: 1.4rem;
    align-items: flex-end;
  }
}

/* =================== REVEAL =================== */
.reveal { opacity: 0; transform: translateY(35px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* =================== BOTTOM MOBILE NAV =================== */
.bottom-nav {
  position: fixed !important;
  inset-inline: 0; bottom: 0;
  z-index: 1030;
  display: none;
  justify-content: space-around;
  align-items: stretch;
  width: 100%;
  max-width: 100vw;
  background: rgba(248, 242, 232, .97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201, 151, 59, .22);
  box-shadow: 0 -10px 28px rgba(60, 40, 10, .12);
  padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  transform: none !important;
}
.bottom-nav a {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 6px 2px;
  color: var(--ink-2, #1f1912);
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav i { font-size: 1.25rem; line-height: 1; color: inherit; }
.bottom-nav a.active,
.bottom-nav a:hover,
.bottom-nav a:focus { color: var(--gold-dark); }
.bottom-nav em {
  position: absolute;
  top: 2px;
  left: calc(50% + 8px);
  font-style: normal;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--gold-grad);
  color: #1a140a;
  font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
  line-height: 1;
}
.bottom-nav em:empty,
.bottom-nav em[data-empty="1"] { display: none; }

@media (min-width: 992px) {
  /* سطح المكتب: هيدر ثابت دائماً + سلة واضحة */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
  }
  body {
    padding-top: var(--site-header-h, 118px);
  }
  .cart-btn-label { display: inline; }
  .cart-btn { padding-inline: 1.05rem 1.15rem; }
  .header-actions { gap: .55rem !important; }
}

@media (max-width: 991.98px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav { display: flex; }
  .site-header { position: sticky; }
  .cart-btn {
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
  }
  .cart-btn .cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    margin: 0;
  }

  .topbar {
    font-size: .72rem;
    padding: .4rem .75rem;
    line-height: 1.45;
  }
  .main-nav { padding: .35rem 0; }
  .main-nav .container {
    padding-inline: .75rem;
    row-gap: .35rem;
  }
  .brand-logo { width: 42px; height: 42px; }
  .brand-name { font-size: 1.15rem; }
  .icon-btn { width: 38px; height: 38px; font-size: 1rem; }
  .main-nav .navbar-collapse {
    background: #fff;
    border-radius: 16px;
    padding: .85rem 1rem;
    margin-top: .65rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(201, 151, 59, .14);
  }
  .main-nav .navbar-nav { gap: .15rem !important; }
  .main-nav .nav-link {
    padding: .7rem .4rem !important;
    font-size: .95rem;
  }

  .hero {
    /* تحت التوب بار + الهيدر، وفوق الشريط السفلي */
    min-height: calc(100svh - 98px);
    min-height: calc(100dvh - 98px);
    text-align: center;
    padding: 2.4rem 0 calc(1.1rem + 72px + env(safe-area-inset-bottom, 0px));
    align-items: flex-end;
  }
  .hero-bg img {
    object-fit: cover;
    object-position: center 28%;
    transform: scale(1.02);
  }
  body.loaded .hero-bg img { transform: scale(1); }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(8, 6, 4, .28) 0%,
      rgba(8, 6, 4, .48) 42%,
      rgba(8, 6, 4, .9) 100%
    );
  }
  .hero .container { width: 100%; max-width: 100%; }
  .hero .eyebrow {
    margin-bottom: .7rem;
    font-size: .78rem;
    padding: .28rem .85rem;
  }
  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
    margin-bottom: .55rem;
    line-height: 1.3;
  }
  .hero-sub {
    margin-inline: auto;
    font-size: .95rem;
    margin-bottom: 1rem;
    max-width: 34rem;
    line-height: 1.7;
  }
  .hero .d-flex {
    justify-content: center;
    flex-wrap: wrap;
    gap: .55rem !important;
  }
  .hero .btn {
    min-height: 44px;
    padding-inline: 1.15rem;
    font-size: .9rem;
  }
  .hero-stats {
    justify-content: center;
    gap: 1rem;
    margin-top: 1.1rem;
  }
  .hero-stats strong { font-size: 1.3rem; }
  .hero-stats span { font-size: .74rem; }
  .scroll-hint { display: none; }
  .features { margin-top: -28px; }
  .features .row { padding: 1.1rem .25rem; border-radius: 16px; }
  .feature i { font-size: 1.55rem; }
  .feature h6 { font-size: .92rem; }
  .feature p { font-size: .78rem; margin: 0; }

  .section { padding: 3.2rem 0; }
  .section-title { font-size: clamp(1.55rem, 6vw, 2rem); }
  .filters { gap: .45rem; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
  .filter-btn { flex: 0 0 auto; white-space: nowrap; }

  /* بطاقة المنتج على الموبايل: زر إضافة ظاهر ومنسّق */
  .p-card:hover { transform: none; }
  .p-card .p-add { display: none !important; }
  .p-actions button,
  .p-actions a {
    transform: none !important;
    opacity: 1 !important;
    width: 34px; height: 34px;
    font-size: .9rem;
  }
  .p-actions a {
    display: grid; place-items: center;
    border-radius: 50%; background: #fff; color: var(--ink);
    box-shadow: 0 6px 15px -6px rgba(0, 0, 0, .3);
    text-decoration: none;
  }
  .p-body { padding: .9rem .85rem 1rem; }
  .p-title { font-size: .95rem; margin: .2rem 0 .3rem; }
  .p-rating { font-size: .72rem; margin-bottom: .4rem; }
  .p-price strong { font-size: 1.05rem; }
  .p-foot { display: flex; }
  .p-add-mobile { display: inline-flex; }

  .offer { padding-top: 1.2rem; }
  .offer-box { padding: 1.35rem 1.1rem; border-radius: 18px; }
  .offer-title { font-size: clamp(1.45rem, 6.5vw, 2rem); }
  .offer-img { max-width: 250px; }
  .countdown { gap: .45rem; justify-content: center; flex-wrap: wrap; }
  .countdown div { width: 62px; padding: .55rem .2rem; }
  .countdown strong { font-size: 1.25rem; }

  .about-card { left: 10px; right: auto; }
  .about-img img { border-radius: 18px; }
  .news-form { flex-direction: column; }
  .news-form .form-control,
  .news-form .btn { width: 100%; min-height: 48px; }

  .footer {
    padding: 1.6rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
    text-align: start;
  }
  .footer .container { padding-inline: 1rem; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer-brand {
    padding-bottom: 1rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid rgba(243, 210, 122, .12);
  }
  .footer-logo { width: 64px; margin-bottom: .65rem; }
  .footer-about {
    font-size: .88rem;
    line-height: 1.65;
    margin-bottom: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .footer-acc {
    border-bottom: 1px solid rgba(243, 210, 122, .12);
  }
  .footer-acc > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0;
    padding: .95rem 0;
    font-size: .95rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .footer-acc > summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(243, 210, 122, .35);
    color: var(--gold-light);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1;
    flex: 0 0 auto;
    transition: transform .25s ease, background .25s ease;
  }
  .footer-acc[open] > summary::after {
    content: "−";
    background: rgba(243, 210, 122, .12);
  }
  .footer-acc ul {
    padding: 0 0 1rem;
    animation: footerAccIn .28s ease both;
  }
  .footer ul li { margin-bottom: .45rem; font-size: .9rem; }
  .footer hr { margin: 1.15rem 0 1rem; }
  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
    gap: .75rem;
  }
  .socials { justify-content: flex-start; flex-wrap: wrap; }

  .float-wa {
    /* يسار الشاشة حتى لا يغطي زر «تسوّقي الآن» يمين الهيرو (RTL) */
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    right: auto;
    left: 14px;
    width: 48px; height: 48px;
  }
  .to-top {
    bottom: calc(146px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: auto;
    width: 46px; height: 46px;
  }
  .hero .d-flex {
    padding-inline: .25rem 3.25rem;
  }
  .side-canvas { width: 100% !important; max-width: 100vw; }
}
@media (max-width: 575.98px) {
  .topbar {
    font-size: .68rem;
    padding: .32rem .55rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero {
    min-height: calc(100svh - 88px);
    min-height: calc(100dvh - 88px);
    padding: 1.75rem 0 calc(.85rem + 70px + env(safe-area-inset-bottom, 0px));
  }
  .hero-bg img {
    object-position: center 22%;
  }
  .hero-title {
    font-size: clamp(1.7rem, 7.5vw, 2.15rem);
  }
  .hero-sub {
    font-size: .88rem;
    margin-bottom: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
    margin-top: .85rem;
  }
  .hero-stats div { align-items: center; text-align: center; }
  .hero-stats strong { font-size: 1.05rem; }
  .hero-stats span { font-size: .68rem; line-height: 1.35; }
  .main-nav .container { flex-wrap: nowrap; }
  .p-add-mobile { min-height: 38px; font-size: .78rem; padding: .4rem .65rem; }
  .p-add-mobile span { max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .countdown div { width: 58px; }
  .countdown strong { font-size: 1.15rem; }
  .bottom-nav a { min-height: 50px; padding: 5px 1px; }
  .bottom-nav a span { font-size: 10.5px; }
  .footer {
    padding-bottom: 1rem;
  }
}
@keyframes footerAccIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 992px) {
  .footer-acc > summary { pointer-events: none; cursor: default; }
  .footer-acc > summary::after { display: none !important; content: none !important; }
}
@media (max-width: 390px) {
  .hero-stats { display: none; }
  .hero .btn { flex: 1 1 auto; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .hero-bg img { transform: none !important; }
}
