/* ==========================================================================
   Munasbat Designs Gallery
   Brand: plum #5e3549, font Tajawal, RTL, mobile-first.
   ========================================================================== */

:root {
  --plum: #5e3549;
  --plum-dark: #4a2a39;
  --plum-700: #6f4257;
  --gold: #c9a24b;
  --ink: #241019;
  --muted: #7a6470;
  --bg: #ffffff;
  --card: #ffffff;
  --line: #ecdfe6;
  --header-h: 74px;
  --shadow: 0 10px 30px rgba(94, 53, 73, .12);
  --shadow-lg: 0 22px 60px rgba(94, 53, 73, .22);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }

.container { width: min(100% - 2.4rem, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; right: -999px; top: 0; background: var(--plum); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 8px; z-index: 200;
}
.skip-link:focus { right: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-cta {
  background: linear-gradient(135deg, var(--plum), var(--plum-700));
  color: #fff; box-shadow: 0 10px 24px rgba(94, 53, 73, .32);
}
.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(94, 53, 73, .42); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .26); }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.08rem; }
.btn-wa { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-wa:hover { background: var(--plum); color: #fff; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(94, 53, 73, .3); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; font-weight: 800; color: var(--plum); font-size: 1.15rem; }
.brand-text small { font-weight: 500; font-size: .72rem; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-cta { padding: .58rem 1.15rem; font-size: .92rem; }
.header-support { padding: .58rem 1.05rem; font-size: .92rem; }
@media (max-width: 600px) {
  .header-support span { display: none; }
  .header-support { padding: .55rem .7rem; }
  .header-cta { padding: .55rem .9rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201, 162, 75, .35), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(255, 255, 255, .18), transparent 55%),
    linear-gradient(135deg, var(--plum-dark), var(--plum) 55%, var(--plum-700));
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.4px);
  background-size: 26px 26px; opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
          mask-image: linear-gradient(to bottom, #000, transparent);
}
.hero-inner { padding: clamp(3rem, 9vw, 6rem) 0 clamp(3.4rem, 9vw, 6rem); text-align: center; }
.hero-section .hero-inner { padding-block: clamp(2.4rem, 6vw, 4rem); text-align: start; }
.hero-eyebrow {
  display: inline-block; margin: 0 0 1rem; padding: .3rem 1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  font-weight: 600; font-size: .85rem; letter-spacing: .02em;
}
.hero-title { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 800; margin-bottom: .5em; }
.hero-sub { font-size: clamp(1rem, 2.4vw, 1.22rem); color: rgba(255, 255, 255, .9); max-width: 720px; margin-inline: auto; }
.hero-section .hero-sub { margin-inline: 0; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.8rem; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.gallery-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); color: var(--plum); }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Filter chips ---------- */
/* Sticky filter toolbar: occasion chips + النوع stick together under the header. */
.filters-sticky {
  position: sticky; top: var(--header-h); z-index: 45;
  margin: 0 0 2rem; padding: .7rem 0;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.filter-bar {
  display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center;
  margin: 0 auto .6rem; max-width: max-content;
}
#gallery { scroll-margin-top: calc(var(--header-h) + 8px); }
#custom { scroll-margin-top: calc(var(--header-h) + 16px); }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: .5rem 1.05rem; border-radius: 999px; font-family: inherit; font-weight: 700;
  font-size: .95rem; cursor: pointer; transition: all .25s var(--ease);
}
.chip:hover { border-color: var(--plum); color: var(--plum); transform: translateY(-2px); }
.chip.is-active { background: var(--plum); color: #fff; border-color: var(--plum); box-shadow: var(--shadow); }
.chip-count {
  font-size: .72rem; background: rgba(0, 0, 0, .07); border-radius: 999px;
  padding: .05rem .5rem; font-weight: 700;
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, .25); }

/* ---------- Grid + cards ---------- */
.design-grid {
  display: grid; gap: clamp(1rem, 2.4vw, 1.6rem);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.design-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.design-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.card-link { display: block; height: 100%; }
.card-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #f0e8ec; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.design-card:hover .card-media img { transform: scale(1.07); }
.card-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease); pointer-events: none;
}
.design-card:hover .card-shine { transform: translateX(120%); }
.play-badge {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px;
  display: grid; place-items: center; color: var(--plum);
  background: rgba(255, 255, 255, .92); border-radius: 50%; box-shadow: var(--shadow);
  transition: transform .3s var(--ease);
}
.design-card:hover .play-badge { transform: scale(1.12); }
.featured-badge {
  position: absolute; top: .7rem; inset-inline-start: .7rem;
  background: var(--gold); color: #3a2a08; font-weight: 800; font-size: .72rem;
  padding: .2rem .65rem; border-radius: 999px;
}
.new-badge {
  position: absolute; top: .7rem; inset-inline-end: .7rem; z-index: 2;
  background: #1d9e75; color: #fff; font-weight: 800; font-size: .72rem;
  padding: .2rem .65rem; border-radius: 999px;
}
.card-body { padding: .9rem 1rem 1.1rem; }
.card-section { font-size: .78rem; color: var(--plum-700); font-weight: 700; }
.card-title { font-size: 1.02rem; margin: .15rem 0 0; }

.empty-filter { text-align: center; color: var(--muted); padding: 2rem; }
.empty-state { text-align: center; padding: clamp(2rem, 6vw, 4rem); color: var(--muted); }
.empty-state .btn { margin-top: 1rem; }

/* ---------- Features ---------- */
.features-section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.features-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; text-align: center; box-shadow: var(--shadow);
}
.feature-icon {
  display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: .8rem;
  border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--plum), var(--plum-700));
}
.feature h3 { color: var(--plum); font-size: 1.15rem; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Custom design showcase ---------- */
.custom-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; background: #faf6f8; }
.custom-cta { text-align: center; margin-bottom: 2.4rem; }
.custom-cta-note { color: var(--muted); font-size: .9rem; margin-top: .7rem; }
.custom-list { display: grid; gap: 1.6rem; }
.custom-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.custom-item-head { text-align: center; margin-bottom: 1.2rem; }
.custom-item-head h3 { color: var(--plum); font-size: 1.2rem; margin-bottom: .2em; }
.custom-item-head p { color: var(--muted); margin: 0; }
.custom-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.custom-col { text-align: center; }
.custom-tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: .25rem .8rem; border-radius: 999px; margin-bottom: .6rem; }
.custom-tag-hall { background: #f1efe8; color: #5f5e5a; }
.custom-tag-design { background: rgba(94, 53, 73, .1); color: var(--plum); }
.custom-arrow { color: var(--plum); display: grid; place-items: center; }
.custom-imgs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.custom-imgs .custom-thumb { width: clamp(120px, 46%, 168px); }
.custom-thumb { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #f0e8ec; box-shadow: var(--shadow); cursor: zoom-in; }
.custom-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.custom-thumb:hover img { transform: scale(1.06); }
.custom-combined { margin-top: 1.2rem; }
.custom-combined .custom-imgs { grid-template-columns: 1fr; }
.custom-combined .custom-thumb { aspect-ratio: 16 / 9; }
.custom-item { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (max-width: 700px) {
  .custom-pair { grid-template-columns: 1fr; }
  .custom-arrow { transform: rotate(-90deg); margin: .1rem 0; }
}

/* Custom card (in the main grid) + chip + cost note */
.custom-ribbon {
  position: absolute; top: .7rem; inset-inline-start: .7rem; z-index: 2;
  background: var(--plum); color: #fff; font-weight: 800; font-size: .72rem;
  padding: .2rem .7rem; border-radius: 999px;
}
.cost-tag {
  display: inline-block; margin-top: .3rem; background: rgba(201, 162, 75, .18);
  color: #8a661c; font-weight: 700; font-size: .72rem; padding: .15rem .6rem; border-radius: 999px;
}
.chip-custom { border-color: var(--gold); color: #8a661c; display: inline-flex; align-items: center; gap: .35rem; }
.chip-custom:hover { border-color: var(--gold); color: #6f5215; }
.chip-custom.is-active { background: var(--plum); border-color: var(--plum); color: #fff; }
.cost-note {
  display: flex; align-items: center; justify-content: center; gap: .45rem; text-align: center;
  color: var(--muted); font-size: .93rem; margin: 0 auto 1.6rem; max-width: 660px;
}
.cost-note svg { color: var(--gold); flex: 0 0 auto; }

/* Media-type sub-filter (الكل / صور / فيديو) */
.media-filter { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.media-filter-label { color: var(--muted); font-size: .9rem; font-weight: 700; }
.mchip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: .35rem .95rem; border-radius: 999px; font-family: inherit; font-weight: 700;
  font-size: .88rem; cursor: pointer; transition: all .25s var(--ease);
}
.mchip:hover { border-color: var(--plum); color: var(--plum); }
.mchip.is-active { background: var(--plum); color: #fff; border-color: var(--plum); }

/* ---------- CTA band ---------- */
.cta-band { color: #fff; position: relative; overflow: hidden; isolation: isolate; margin-top: 1rem; }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, var(--plum), var(--plum-dark));
}
.cta-inner { text-align: center; padding: clamp(2.6rem, 7vw, 4.5rem) 0; }
.cta-inner h2 { font-size: clamp(1.5rem, 4vw, 2.3rem); }
.cta-inner p { color: rgba(255, 255, 255, .9); margin-bottom: 1.5rem; }

/* ---------- Breadcrumb + pills ---------- */
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.breadcrumb a:hover { text-decoration: underline; }
.hero .breadcrumb { color: rgba(255, 255, 255, .85); }
.pill {
  display: inline-block; background: rgba(94, 53, 73, .1); color: var(--plum);
  padding: .25rem .9rem; border-radius: 999px; font-weight: 700; font-size: .85rem; margin-bottom: .6rem;
}
.pill:hover { background: rgba(94, 53, 73, .18); }

/* ---------- Design detail ---------- */
.design-detail { padding: clamp(1.5rem, 4vw, 3rem) 0 0; }
.detail-grid { display: grid; gap: clamp(1.4rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: start; }
.detail-media { position: sticky; top: 84px; }
.media-frame {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 3 / 4; background: #f0e8ec; cursor: zoom-in;
  border: none; padding: 0; width: 100%;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.video-frame { cursor: pointer; }
.play-badge-lg { width: 80px; height: 80px; }
.detail-info h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--plum); }
.detail-desc { color: #4a3641; }
.detail-perks { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .55rem; }
.detail-perks li { position: relative; padding-inline-start: 1.7rem; }
.detail-perks li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
  width: 1.2rem; height: 1.2rem; color: var(--plum); font-weight: 800;
}
.detail-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.4rem 0; }
.keyword-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.tag {
  font-size: .82rem; background: #f3ebef; color: var(--plum-700);
  border: 1px solid var(--line); padding: .28rem .8rem; border-radius: 999px;
}
.related { padding: clamp(2.4rem, 6vw, 4rem) 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: rgba(20, 8, 14, .92); padding: 1.5rem; opacity: 0; animation: fadeIn .25s forwards;
}
.lightbox[hidden] { display: none; }
.lightbox-content { max-width: min(92vw, 760px); max-height: 90vh; }
.lightbox-content img, .lightbox-content video { width: 100%; max-height: 90vh; border-radius: 12px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1rem; inset-inline-end: 1.2rem; background: none; border: none;
  color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer;
}
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Order modal ---------- */
.order-modal {
  position: fixed; inset: 0; z-index: 320; display: grid; place-items: center;
  background: rgba(20, 8, 14, .6); backdrop-filter: blur(4px); padding: 1.2rem;
  opacity: 0; animation: fadeIn .25s forwards;
}
.order-modal[hidden] { display: none; }
.order-modal-card {
  position: relative; background: var(--card); border-radius: var(--radius);
  max-width: 440px; width: 100%; padding: 2.2rem 1.6rem 1.8rem; text-align: center;
  box-shadow: var(--shadow-lg); animation: popIn .3s var(--ease);
}
@keyframes popIn { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.order-modal-card h3 { color: var(--plum); font-size: 1.45rem; margin-bottom: .35em; }
.order-modal-card p { color: var(--muted); margin: 0; }
.order-modal-icon {
  display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1rem;
  border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--plum), var(--plum-700));
}
.order-modal-actions { display: grid; gap: .7rem; margin-top: 1.5rem; }
.order-modal-actions .btn { justify-content: center; width: 100%; }
.order-modal-close {
  position: absolute; top: .6rem; inset-inline-end: 1rem; background: none; border: none;
  font-size: 1.9rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.order-modal-back { background: none; border: none; color: var(--muted); margin-top: 1rem; cursor: pointer; text-decoration: underline; font: inherit; }
.btn-soft { background: #f3ebef; color: var(--plum); }
.btn-soft:hover { background: #e9dde3; color: var(--plum); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer { background: #2c151f; color: #e9dde3; margin-top: 2rem; }
.footer-inner { display: flex; gap: 2rem; justify-content: space-between; flex-wrap: wrap; padding: 2.6rem 0 1.5rem; }
.footer-brand { max-width: 360px; }
.footer-brand img { border-radius: 12px; margin-bottom: .6rem; }
/* Footer sits on a dark plum bg → render the logo white. */
.footer-logo-img { filter: brightness(0) invert(1); }
.footer-brand p { color: #c9b6c0; margin: 0; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: flex-start; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, .1); text-align: center; padding: 1.1rem; font-size: .85rem; color: #b69faa; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .design-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-media { position: static; }
}
@media (min-width: 861px) {
  .design-detail .detail-grid { grid-template-columns: minmax(0, 460px) 1fr; }
}
@media (max-width: 640px) {
  .filters-sticky { padding: .5rem 0; margin-bottom: 1.4rem; }
  /* Both filter rows become single-row swipeable strips so the toolbar stays compact. */
  .filter-bar {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    max-width: 100%; margin: 0 0 .45rem;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .media-filter {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar, .media-filter::-webkit-scrollbar { display: none; }
  .chip, .mchip, .media-filter-label { flex: 0 0 auto; }
}
@media (max-width: 420px) {
  .design-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .card-body { padding: .7rem .7rem .9rem; }
  .card-title { font-size: .92rem; }
  .header-cta span { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .card-shine { display: none; }
}
