/* ===== DoGifter Black Friday Theme: أسود + أصفر نيون ===== */

body.blackfriday {
  --bf: #ffe600;
  --bf-2: #ffb800;
  --bf-border: rgba(255, 255, 255, .09);
  color: #f3f3f3;
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(255, 230, 0, .13), transparent 70%),
    radial-gradient(ellipse 70% 30% at 50% 100%, rgba(255, 184, 0, .10), transparent 70%),
    #050505;
  background-attachment: fixed;
}

/* ---------- شريط العدّاد ---------- */
.bf-bar {
  position: relative;
  z-index: 25;
  background: #000;
  color: var(--bf, #ffe600);
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  text-align: center;
  padding: 9px 12px 11px;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px 16px;
}
/* خطوط تحذير صفراء وسوداء تتحرك أسفل الشريط */
.bf-bar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(-45deg, #ffe600 0 10px, #000 10px 20px);
  background-size: 28px 100%;
  animation: bf-stripes 1.2s linear infinite;
}
@keyframes bf-stripes { to { background-position: 28px 0; } }
.bf-bar-title { letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 230, 0, .6); }
.bf-timer { display: inline-flex; gap: 6px; direction: ltr; }
.bf-timer span {
  min-width: 46px; padding: 3px 6px;
  border: 1px solid rgba(255, 230, 0, .45); border-radius: 8px;
  background: rgba(255, 230, 0, .08);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.bf-timer small { display: block; font-size: 9px; font-weight: 600; opacity: .75; }
.bf-timer b { font-size: 16px; }
@media (max-width: 600px) {
  .bf-bar { font-size: 12px; padding: 7px 8px 10px; }
  .bf-timer span { min-width: 40px; }
  .bf-timer b { font-size: 14px; }
}

/* ---------- الهيدر ---------- */
body.blackfriday .dundle-header {
  position: relative; z-index: 20;
  background: rgba(5, 5, 5, .9) !important;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bf-border);
  box-shadow: none !important;
}
body.blackfriday .dundle-header .logo { color: #fff; }
body.blackfriday .dundle-header .logo-do { color: var(--bf); text-shadow: 0 0 12px rgba(255, 230, 0, .55); }
body.blackfriday .dundle-header .header-btn {
  color: #fff; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 12px;
  transition: border-color .2s, background .2s;
}
body.blackfriday .dundle-header .header-btn:hover { border-color: var(--bf); background: rgba(255, 230, 0, .1); }
body.blackfriday .dundle-header .cart-count { background: var(--bf) !important; color: #000 !important; border-color: #050505 !important; }
body.blackfriday .dundle-header .nav-link { color: rgba(255, 255, 255, .88); border-radius: 12px; transition: color .2s, background .2s; }
body.blackfriday .dundle-header .nav-link:hover { color: var(--bf); background: rgba(255, 230, 0, .1); }
body.blackfriday .dundle-header .nav-link svg { stroke: currentColor; }
body.blackfriday .header-nav.mobile-open { background: #0b0b0b !important; border-color: rgba(255, 255, 255, .1); }
body.blackfriday .mobile-toggle span { background: #fff !important; }

/* ---------- الأقسام والكروت ---------- */
body.blackfriday main,
body.blackfriday section,
body.blackfriday .hero,
body.blackfriday .categories,
body.blackfriday .newsletter,
body.blackfriday .about-dogifter { background: transparent !important; }

body.blackfriday section h1,
body.blackfriday section h2,
body.blackfriday section h3 { color: #fff; }
body.blackfriday section p { color: rgba(255, 255, 255, .68); }

body.blackfriday [class*="card"] {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 230, 0, .10), transparent 60%),
    rgba(255, 255, 255, .04) !important;
  border: 1px solid var(--bf-border) !important;
  border-radius: 28px !important;
  color: #fff; box-shadow: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
body.blackfriday [class*="card"]:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 230, 0, .6) !important;
  box-shadow: 0 10px 40px rgba(255, 230, 0, .15);
}
body.blackfriday [class*="card"] h1,
body.blackfriday [class*="card"] h2,
body.blackfriday [class*="card"] h3,
body.blackfriday [class*="card"] h4,
body.blackfriday [class*="card"] a { color: #fff; }
body.blackfriday [class*="card"] p,
body.blackfriday [class*="card"] span { color: rgba(255, 255, 255, .7); }
body.blackfriday [class*="price"],
body.blackfriday [class*="discount"],
body.blackfriday [class*="badge"] { color: var(--bf) !important; }

/* أزرار صفراء */
body.blackfriday .btn,
body.blackfriday .btn-primary,
body.blackfriday .cta,
body.blackfriday a.button {
  background: var(--bf) !important; color: #000 !important;
  border: 0 !important; border-radius: 999px !important;
  font-weight: 800; padding: 16px 30px;
  transition: transform .2s, box-shadow .2s;
}
body.blackfriday .btn:hover,
body.blackfriday .btn-primary:hover,
body.blackfriday .cta:hover,
body.blackfriday a.button:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255, 230, 0, .4); }

/* ---------- Hero (includes/hero-blackfriday.php) ---------- */
.bf-section { padding: 24px 0 8px; }
.bf-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) repeat(3, minmax(0, 1fr)); gap: 16px; }
.bf-main {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 300px; padding: 32px 28px 32px 36px;
  border-radius: 32px; border: 1px solid var(--bf-border);
  background: radial-gradient(ellipse at 85% 50%, rgba(255, 230, 0, .16), transparent 60%), rgba(255, 255, 255, .03);
  overflow: hidden;
}
.bf-text { flex: 1 1 auto; min-width: 0; }
.bf-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-weight: 600; font-size: 14px;
}
.bf-pill i { width: 2px; height: 18px; background: #ffe600; display: inline-block; }
.bf-title {
  font-size: clamp(30px, 4.2vw, 56px); font-weight: 900; line-height: 1.05; margin: 18px 0 10px;
  color: #ffe600 !important; letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(255, 230, 0, .55), 0 0 40px rgba(255, 184, 0, .35);
  animation: bf-neon 2.6s ease-in-out infinite;
}
@keyframes bf-neon {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; } 94% { opacity: .55; } 96% { opacity: 1; } 98% { opacity: .7; }
}
.bf-sub { font-size: 17px; margin-bottom: 24px; color: rgba(255, 255, 255, .7); }
.bf-cta { display: inline-block; text-decoration: none; }

.bf-seal {
  flex: 0 0 auto;
  width: clamp(120px, 14vw, 190px); aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(70px, 8vw, 110px); font-weight: 900; color: #222222;
  background: radial-gradient(circle at 35% 30%, #fff6a0, #ffe600 55%, #ffb800);
  box-shadow: 0 0 50px rgba(255, 230, 0, .55), inset 0 -8px 20px rgba(0, 0, 0, .18);
  transform: rotate(-10deg);
  animation: bf-pop 3s ease-in-out infinite;
}
@keyframes bf-pop { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(-6deg) scale(1.06); } }

.bf-card {
  display: flex; flex-direction: column; min-height: 300px; padding: 24px;
  border-radius: 28px; border: 1px solid var(--bf-border);
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 230, 0, .13), transparent 60%), rgba(255, 255, 255, .03);
  color: #fff; text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.bf-card:hover { transform: translateY(-5px); border-color: rgba(255, 230, 0, .65); box-shadow: 0 12px 40px rgba(255, 230, 0, .16); }
.bf-card small { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .75); font-weight: 600; }
.bf-card small i { width: 8px; height: 8px; border-radius: 50%; background: #ffe600; display: inline-block; }
.bf-card h3 { margin: 14px 0 8px; font-size: 22px; color: #fff; }
.bf-card p { color: rgba(255, 255, 255, .6); font-size: 14px; }
.bf-ico { font-size: 64px; margin: auto; filter: drop-shadow(0 0 22px rgba(255, 230, 0, .45)); }
.bf-card b { color: #fff; }

@media (max-width: 1099px) {
  .bf-grid { grid-template-columns: repeat(3, 1fr); }
  .bf-main { grid-column: 1 / -1; }
}

/* قسم البحث القديم بشكل داكن، والسلايدشو مخفي أثناء الحملة */
body.blackfriday .hero-section { padding-top: 8px; }
body.blackfriday .hero-wrapper { grid-template-columns: 1fr; }
body.blackfriday .hero-slideshow { display: none; }   /* احذف السطر لإبقاء السلايدشو */
body.blackfriday .hero-search {
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 230, 0, .12), transparent 60%), rgba(255, 255, 255, .03) !important;
  border: 1px solid var(--bf-border); border-radius: 28px; padding: 28px 0; min-height: 0;
}
body.blackfriday .hero-search::before { display: none; }
body.blackfriday .search-title { color: #fff !important; text-shadow: none !important; }
body.blackfriday .popular-tag { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #fff; }
body.blackfriday .popular-tag:hover { border-color: var(--bf); color: var(--bf); background: rgba(255, 230, 0, .08); }
body.blackfriday .trust-badge { background: rgba(255, 255, 255, .06); color: #fff; }
body.blackfriday .search-btn { background: var(--bf); color: #000; }
body.blackfriday .search-btn:hover { background: var(--bf-2); }

/* ===== شعارات البراندات المتشابكة داخل الكروت ===== */
.bf-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  padding: 14px 0 6px;
  direction: ltr;
}
.bf-logos .bf-logo {
  width: clamp(58px, 5.2vw, 76px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 8px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 0 22px rgba(255, 230, 0, .28);
  transition: transform .3s ease;
}
.bf-logos .bf-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.bf-logos .bf-logo:nth-child(1) { transform: rotate(-12deg) translateY(6px); z-index: 1; }
.bf-logos .bf-logo:nth-child(2) { transform: translateY(-8px); z-index: 3; margin-inline: -16px; }
.bf-logos .bf-logo:nth-child(3) { transform: rotate(12deg) translateY(6px); z-index: 2; }

.bf-card:hover .bf-logo:nth-child(1) { transform: rotate(-18deg) translate(-6px, 2px); }
.bf-card:hover .bf-logo:nth-child(2) { transform: translateY(-16px) scale(1.06); }
.bf-card:hover .bf-logo:nth-child(3) { transform: rotate(18deg) translate(6px, 2px); }

/* ===== الهاتف: تخطيط مضغوط (يجب أن يبقى في آخر الملف) ===== */
@media (max-width: 700px) {
  .bf-section { padding: 12px 0 4px; }

  /* عمودان: اللوحة الرئيسية بصف كامل، ثم Gift + Payment، ثم Gaming بصف كامل */
  .bf-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bf-main { grid-column: 1 / -1; order: 0; }
  .bf-grid > a[href*="category=giftcard"]     { order: 1; }
  .bf-grid > a[href*="category=payment-card"] { order: 2; }
  .bf-grid > a[href*="category=gamecard"]     { order: 3; grid-column: 1 / -1; }

  /* اللوحة الرئيسية أقصر */
  .bf-main {
    flex-direction: row; text-align: start;
    min-height: 0; padding: 18px 16px; gap: 10px; border-radius: 22px;
  }
  .bf-pill { padding: 6px 12px; font-size: 12px; }
  .bf-title { font-size: 28px; margin: 10px 0 6px; }
  .bf-sub { font-size: 13px; margin-bottom: 12px; }
  .bf-cta { padding: 10px 20px !important; font-size: 14px; }
  .bf-seal { width: 78px; font-size: 44px; }

  /* الكروت أقصر */
  .bf-card { min-height: 0; padding: 14px; border-radius: 20px; }
  .bf-card h3 { font-size: 16px; margin: 8px 0 4px; }
  .bf-card p { display: none; }
  .bf-card b { font-size: 13px; }
  .bf-ico { font-size: 40px; padding: 8px 0; }

  /* شعارات أصغر */
  .bf-logos { padding: 8px 0 4px; }
  .bf-logos .bf-logo { width: 46px; border-radius: 12px; padding: 5px; }
  .bf-logos .bf-logo:nth-child(2) { margin-inline: -10px; }
}

@media (prefers-reduced-motion: reduce) {
  .bf-bar::after, .bf-title, .bf-seal { animation: none; }
}