/* =========================================================
   الإصدار 2: هيدر بصفين + شريط إعلانات + فلاتر أفقية + كروت بمفضلة
   ========================================================= */
:root { --bar-h: 34px; --header-h: 128px; }

/* شريط الإعلانات المتحرك */
.announce {
  position: fixed; top: 0; inset-inline: 0; z-index: 51; height: var(--bar-h);
  overflow: hidden; display: flex; align-items: center;
  background: linear-gradient(90deg, var(--ruby-3), #2a0a0f 30%, #2a1d08 70%, var(--gold-3));
  border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--gold-2);
}
.announce-track { display: flex; gap: 4rem; white-space: nowrap; animation: marquee 30s linear infinite; padding-inline-start: 100%; }
html[dir="rtl"] .announce-track { animation-name: marqueeRtl; }
.announce-track span { display: inline-flex; align-items: center; gap: .6rem; }
.announce-track span::before { content: "\25C6"; color: var(--ruby-2); font-size: .6rem; }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes marqueeRtl { to { transform: translateX(100%); } }

/* الهيدر بصفين */
.site-header { top: var(--bar-h); height: auto; background: rgba(6, 5, 4, .55); backdrop-filter: blur(10px); }
.site-header .header-inner { height: auto; display: block; }
.header-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; height: 62px; }
.header-top .brand { justify-self: center; }
.header-search { position: relative; max-width: 300px; width: 100%; }
.header-search input { padding-inline-start: 2.6rem; height: 42px; border-radius: 999px; font-size: .9rem; }
.header-search svg { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); width: 18px; color: var(--gold); }
.header-top .header-actions { justify-self: end; margin: 0; }
.cat-nav { border-top: 1px solid rgba(212, 175, 55, .12); }
.cat-nav .main-nav { justify-content: center; margin: 0; height: 32px; align-items: center; gap: 2rem; font-size: .92rem; }
.cat-nav .main-nav a.hot { color: var(--ruby-2); }
.mobile-search { display: none; }
@media (max-width: 900px) {
  :root { --header-h: 96px; }
  .header-top { grid-template-columns: auto 1fr; }
  .header-top .brand { justify-self: start; }
  .header-search { display: none; }
  .cat-nav { border: 0; height: 0; }
  .cat-nav .main-nav { position: fixed; inset: calc(var(--bar-h) + 62px) 0 auto 0; height: auto; flex-direction: column; gap: 0; align-items: stretch; max-height: 75vh; overflow-y: auto; }
  .cat-nav .mobile-search { display: block; padding: .8rem 0 .4rem; }
}

@media (max-width: 520px) {
  .header-top .header-actions { gap: .35rem; }
  .header-top .icon-btn { width: 38px; height: 38px; }
  .header-top .lang-btn { padding-inline: .6rem; }
  .header-top .brand-name { display: none; }
}

/* زرار المفضلة */
.wish-btn {
  position: absolute; top: .6rem; inset-inline-end: .6rem; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(6, 5, 4, .7); border: 1px solid var(--line); color: var(--gold-2);
  backdrop-filter: blur(6px); transition: transform .3s, color .3s, background .3s;
}
.wish-btn svg { width: 18px; height: 18px; }
.wish-btn:hover { transform: scale(1.12); }
.wish-btn.on { color: var(--ruby-2); background: rgba(195, 18, 47, .15); border-color: var(--ruby); }
.wish-btn.on svg { fill: currentColor; animation: bump .45s; }

/* صورة تانية بتظهر مع الهوفر + اسم البراند */
.product-media .img-2 { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.product-card:hover .product-media .img-2 { opacity: 1; }
.product-brand { font-family: var(--font-en-display); letter-spacing: .25em; font-size: .68rem; color: var(--gold); }
html[lang="ar"] .product-brand { font-family: var(--font-ar-display); letter-spacing: 0; font-size: .85rem; }

/* زرار "أضف للسلة" بيطلع مع الهوفر على الديسكتوب، وثابت على الموبايل */
.product-card .hover-add { display: none; }
@media (hover: hover) and (min-width: 901px) {
  .product-card .hover-add {
    display: flex; position: absolute; inset-inline: .8rem; bottom: .8rem; margin: 0; z-index: 2;
    transform: translateY(140%); opacity: 0; transition: transform .4s, opacity .4s, background .3s, color .3s;
    background: rgba(6, 5, 4, .85); backdrop-filter: blur(6px);
  }
  .product-card:hover .hover-add { transform: none; opacity: 1; }
  .product-card .hover-add:hover { background: var(--grad-gold); color: #1a1206; }
  .product-card .body-add { display: none; }
}

/* المتجر: مسار الصفحة + بانر القسم */
.breadcrumb { display: flex; gap: .5rem; color: var(--muted); font-size: .85rem; margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--gold-2); }
.breadcrumb > *:not(:last-child)::after { content: "/"; margin-inline-start: .5rem; opacity: .5; }
.cat-banner {
  position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 1.5rem;
  min-height: 200px; display: flex; align-items: center; padding: 2rem clamp(1.2rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background: radial-gradient(80% 140% at 0% 50%, rgba(195, 18, 47, .35), transparent 60%), radial-gradient(60% 120% at 100% 50%, rgba(212, 175, 55, .2), transparent 60%), var(--bg-2);
}
.cat-banner img {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 42%; height: 100%; object-fit: cover; opacity: .9;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent); mask-image: linear-gradient(to left, #000 45%, transparent);
}
html[dir="rtl"] .cat-banner img { -webkit-mask-image: linear-gradient(to right, #000 45%, transparent); mask-image: linear-gradient(to right, #000 45%, transparent); }
.cat-banner .txt { position: relative; max-width: 58%; }
.cat-banner h1 { margin: .2rem 0; font-size: clamp(2rem, 5vw, 3.4rem); }
.cat-banner p { margin: 0; color: var(--muted); }
.cat-banner img.is-logo { width: 32%; object-fit: contain; opacity: .55; }
@media (max-width: 600px) {
  .cat-banner img { width: 65%; opacity: .4; }
  .cat-banner img.is-logo { width: 45%; opacity: .18; }
  .cat-banner .txt { max-width: 100%; }
}

/* شريط الفلاتر الأفقي */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem 0; border-block: 1px solid var(--line); margin-bottom: .8rem; position: relative; z-index: 30; }
.fbar-label { color: var(--gold); font-weight: 700; display: flex; align-items: center; gap: .4rem; margin-inline-end: .3rem; }
.fbar-label svg { width: 18px; height: 18px; }
.fdrop { position: relative; }
.fdrop > button {
  display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text); font-size: .9rem; transition: border-color .3s;
}
.fdrop > button::after { content: ""; width: 7px; height: 7px; border: solid var(--gold); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .3s; }
.fdrop.open > button, .fdrop > button:hover { border-color: var(--gold); }
.fdrop.open > button::after { transform: translateY(2px) rotate(-135deg); }
.fdrop > button b { background: var(--ruby); color: #fff; border-radius: 999px; font-size: .7rem; min-width: 18px; height: 18px; display: grid; place-items: center; padding-inline: 4px; }
.fpanel {
  position: absolute; top: calc(100% + .5rem); inset-inline-start: 0; z-index: 20; min-width: 230px;
  background: #110d09; border: 1px solid var(--line); border-radius: 14px; padding: .7rem;
  box-shadow: var(--shadow); display: none; max-height: 330px; overflow-y: auto;
}
.fdrop.open .fpanel { display: grid; gap: .15rem; animation: slideIn .25s; }
.fpanel label { display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.fpanel label:hover { background: rgba(212, 175, 55, .07); }
.fpanel label small { margin-inline-start: auto; color: var(--muted); }
.fpanel input[type="checkbox"] { accent-color: var(--gold); width: 17px; height: 17px; }
.fpanel .range { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .3rem; }
.fpanel .range .field { padding: .5rem .7rem; }
.fbar .sort { margin-inline-start: auto; display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; }
.fbar .sort .field { width: auto; padding: .5rem .9rem; border-radius: 999px; }
@media (max-width: 600px) {
  .fbar { gap: .45rem; }
  .fbar-label { width: 100%; }
  .fdrop > button { padding: .45rem .8rem; font-size: .85rem; }
  .fdrop { position: static; }
  .fbar { position: relative; }
  .fpanel { inset-inline: 0; min-width: 0; }
  .fbar .sort { margin-inline-start: 0; width: 100%; }
  .fbar .sort .field { flex: 1; }
}

.active-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.active-filters:empty { display: none; }
.active-filters .tag { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(212, 175, 55, .1); border: 1px solid var(--line); font-size: .82rem; color: var(--gold-2); }
.active-filters .tag button { background: none; border: 0; padding: 0; display: grid; color: var(--muted); }
.active-filters .tag button:hover { color: var(--ruby-2); }
.active-filters .tag svg { width: 14px; height: 14px; }
.active-filters .clear-all { background: none; border: 0; color: var(--ruby-2); text-decoration: underline; font-size: .85rem; }
.shown-count { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }

.load-more { text-align: center; margin-top: 2.5rem; display: grid; gap: .8rem; justify-items: center; }
.load-more .bar { width: 220px; height: 3px; border-radius: 3px; background: rgba(212, 175, 55, .15); overflow: hidden; }
.load-more .bar i { display: block; height: 100%; background: var(--grad-lux); background-size: 300% 100%; animation: luxflow 6s linear infinite; transition: width .5s; }
.load-more small { color: var(--muted); }

.seo-text { margin-top: 4rem; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .015); }
.seo-text h2 { margin: 0 0 .6rem; font-size: 1.5rem; }
.seo-text p { color: var(--muted); margin: 0; max-height: 3.4em; overflow: hidden; transition: max-height .6s; }
.seo-text.open p { max-height: 30em; }
.seo-text button { background: none; border: 0; color: var(--gold-2); margin-top: .6rem; padding: 0; text-decoration: underline; }

@media (min-width: 1100px) { .product-grid.four { grid-template-columns: repeat(4, 1fr); } }
.page-top { padding-top: calc(var(--bar-h) + var(--header-h) + 1.5rem); }

/* منتج خلصان (بيتحدد من لوحة التحكم) */
.product-card.is-soldout .product-media img { filter: grayscale(.6); opacity: .75; }
.badge.soldout-badge { background: #555; color: #fff; }
.add-btn:disabled, .add-btn:disabled:hover { opacity: .55; cursor: not-allowed; background: transparent; color: inherit; }
