/* ==========================================================================
   Great Wall Education — كتالوج الطالب
   الخط الأساسي: Hespress — اللون الرئيسي: أحمر
   ========================================================================== */

/* ==========================================================================
   الخط: Hespress (مستضاف محليًا مع مصدر احتياطي)
   ========================================================================== */
@font-face {
  font-family: "Hespress";
  src: url("../fonts/Hespress-Medium.woff") format("woff"),
       url("https://i1.hespress.com/wp-content/themes/hespress/fonts/Hespress-Medium.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hespress";
  src: url("../fonts/Hespress-SemiBold.woff") format("woff"),
       url("https://i1.hespress.com/wp-content/themes/hespress/fonts/Hespress-SemiBold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Hespress";
  src: url("../fonts/Hespress-Bold.woff") format("woff"),
       url("https://i1.hespress.com/wp-content/themes/hespress/fonts/Hespress-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}


:root {
  --red:        #F6252F;
  --red-dark:   #97181e;
  --red-light:  #e8434a;
  --red-soft:   #fdeced;
  --ink:        #1a1420;
  --ink-2:      #4a4351;
  --muted:      #857e8d;
  --line:       #ece8ef;
  --bg:         #ffffff;
  --bg-alt:     #faf7f8;
  --card:       #ffffff;
  --radius:     18px;
  --radius-sm:  12px;
  --shadow:     0 2px 10px rgba(26, 20, 32, .05);
  --shadow-lg:  0 18px 40px -18px rgba(193, 39, 45, .35);
  --ease:       cubic-bezier(.22, .8, .3, 1);
  --header-h:   76px;
  /* لون التصنيفات: أحمر واحد لكل الفئات */
  --cat-color:  var(--red);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  font-family: 'Hespress', 'Segoe UI', system-ui, sans-serif;
  background: #efefed;
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 480px;
    margin: auto;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { max-width: 100%; }

.container {
    padding: 0 18px;
    width: 100%;
    margin-inline: auto;
}
/* ---------- شريط التقدّم ---------- */
.scroll-progress {
  position: fixed; inset-block-start: 0; inset-inline-start: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--red), var(--red-light));
  z-index: 1200;
  transition: width .1s linear;
  display: none;
}

/* ==========================================================================
   الترويسة
   ========================================================================== */
.site-header {
    padding: 10px 0px;
    /* غير لاصقة، لكنها موضوعة (relative) لتبقى فوق طبقة تعتيم القائمة */
    position: relative;
    z-index: 1001;
    background: #efefed;
    border-bottom: 1px solid transparent;
}

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

/* الشعار على اليسار فعليًا، وزر القائمة على اليمين */
.brand { order: 2; display: inline-flex; align-items: center;
         transition: transform .35s var(--ease); }
.menu-btn { order: 1; }
.brand:hover { transform: translateY(-2px) scale(1.02); }
.brand-logo { height: 44px; width: auto; display: block; }

/* زر القائمة على اليمين */
.menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    border: 0px solid var(--line);
    border-radius: 666px;
    padding: 9px 18px;
    cursor: pointer;
    transition: all .3s var(--ease);
    height: 50px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(12, 12, 14, .03), 0 8px 22px rgba(12, 12, 14, .06);
    width: 45px;
    flex-direction: row;
    justify-content: center;
    height: 45px;
}

.menu-btn:hover { border-color: var(--red); color: var(--red); }
.menu-btn-icon {
  width: 25px; height: 25px; flex: none;
  transition: transform .35s var(--ease);
}
.menu-btn[aria-expanded="true"] {
    color: var(--ink);
    background: #ffffff;
}

main {
    background: #efefed;
}


@media (min-width: 1025px) {
    /* CSS in here for desktop only */
    body {
    background: #E4E4E2;
}
}


/* ---------- القائمة الكبرى ---------- */
.mega-menu {
  position: absolute; inset-inline: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 50px -30px rgba(26, 20, 32, .5);
  max-height: 0; overflow: hidden;
  opacity: 0; visibility: hidden;
  transition: max-height .5s var(--ease), opacity .35s var(--ease), visibility .35s;
}
.mega-menu.is-open {
    /* احتياطي: المساحة تحت الترويسة. القيمة الدقيقة يضبطها JS عند الفتح */
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    opacity: 1;
    visibility: visible;
    padding: 0 20px 20px 20px;
}

.mega-inner { padding: 28px 0 36px; }
.mega-head { margin-bottom: 20px; }
.mega-title { font-size: 1.25rem; font-weight: 700; }
.mega-title::after {
  content: ''; display: block; width: 44px; height: 3px; border-radius: 3px;
  background: var(--red); margin-top: 8px;
}

.back-row {
    display: flex;
    justify-content: space-between;
    direction: ltr;
}

.mega-sub {
    color: var(--muted);
    font-size: .9rem;
    display: none;
}


.mega-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.mega-col {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; background: var(--bg-alt);
  opacity: 0; transform: translateY(14px);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.mega-menu.is-open .mega-col { animation: fadeUp .5s var(--ease) forwards; animation-delay: var(--d, 0ms); }
.mega-col:hover { border-color: var(--cat-color); box-shadow: 0 14px 28px -22px var(--cat-color); }

.mega-col-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; }
.mega-col-icon { font-size: 1.3rem; }
.mega-col-name { flex: 1; font-size: .98rem; }
.mega-col-count {
  font-size: .72rem; font-weight: 700; color: #fff; background: var(--cat-color);
  border-radius: 999px; padding: 1px 8px;
}
.mega-list li a {
  display: block; font-size: .87rem; color: var(--ink-2); padding: 3px 0;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.mega-list li a:hover { color: var(--cat-color); transform: translateX(-4px); }
.mega-more {
  display: inline-block; margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--cat-color);
  transition: transform .25s var(--ease);
}
.mega-more:hover { transform: translateX(-4px); }

.menu-overlay {
  /* top يضبطه JS ليبدأ التعتيم من أسفل الترويسة الشفّافة */
  position: fixed; inset-inline: 0; top: 0; bottom: 0;
  background: rgba(26, 20, 32, .35);
  opacity: 0; visibility: hidden; z-index: 900;
  transition: opacity .35s var(--ease), visibility .35s;
}
.menu-overlay.is-visible { opacity: 1; visibility: visible; }

/* ==========================================================================
   الواجهة الرئيسية
   ========================================================================== */
/* بلا overflow: hidden — كان يقصّ قائمة نتائج البحث المنسدلة */
.hero { position: relative; padding: 52px 0 60px; text-align: center; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 420px; height: 420px; background: #fbdcdd; top: -160px; inset-inline-start: -120px; animation: float 14s ease-in-out infinite; }
.blob-2 { width: 360px; height: 360px; background: #ffeede; bottom: -180px; inset-inline-end: -100px; animation: float 18s ease-in-out infinite reverse; }

.hero-title { font-size: clamp(1.9rem, 5.2vw, 3.1rem); font-weight: 700; line-height: 1.35; margin-top: 26px; }
.hero-title .accent { color: var(--red); position: relative; white-space: nowrap; }
.hero-title .accent::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 4px; height: 8px; border-radius: 8px;
  background: var(--red-soft); z-index: -1;
}
.hero-sub { color: var(--ink-2); margin-top: 14px; font-size: clamp(.95rem, 2.4vw, 1.08rem); }

.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 22px; min-width: 128px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stat:hover { transform: translateY(-4px); border-color: var(--red); }
.stat strong { display: block; font-size: 1.55rem; font-weight: 700; color: var(--red); line-height: 1.2; }
.stat span { font-size: .82rem; color: var(--muted); }

/* ---------- البحث ---------- */
.search-wrap { position: relative; margin-inline: auto; z-index: 20; }
.cat-hero .search-wrap { margin-top: 20px; }
.search-box {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: #f4f4f4; border: 1.5px solid #c5c5c5; border-radius: 999px;
  padding: 4px 18px; height: 50px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

/*
.search-box:focus-within {
  border-color: var(--red);
  box-shadow: 0 10px 26px -20px var(--red);
}
*/


.search-icon {
  width: 20px; height: 20px; flex: none; stroke: var(--muted);
  transition: stroke .3s var(--ease);
}

/*
.search-box:focus-within .search-icon { stroke: var(--red); }

*/

/* 16px إلزامية: أي حقل بخط أصغر يجعل iOS يكبّر الصفحة تلقائيًا عند الكتابة */
input, select, textarea { font-size: 16px; }

.search-input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--ink); padding: 9px 0;
}
.search-input::placeholder { color: #b3aebb; }
.search-input::-webkit-search-cancel-button { display: none; }

.search-clear {
  border: 0; background: #e4e4e4; color: var(--ink-2); cursor: pointer; flex: none;
  width: 26px; height: 26px; border-radius: 50%; font-size: 1.1rem; line-height: 1;
  opacity: 0; visibility: hidden; transition: all .25s var(--ease);
}
.search-clear.is-visible { opacity: 1; visibility: visible; }
.search-clear:hover { background: var(--red); color: #fff; }

.search-spinner {
  width: 16px; height: 16px; flex: none; margin-inline-start: 6px;
  border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%;
  display: none;
}
.search-spinner.is-active { display: block; animation: spin .7s linear infinite; }

.search-results {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 10px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-y: auto;
    text-align: start;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
    /* يتمدّد حسب عدد النتائج، ولا يتجاوز المساحة الظاهرة (JS يضبط القيمة الدقيقة
       مع لوحة المفاتيح المفتوحة) */
    max-height: 60vh;
    max-height: 60dvh;
    overscroll-behavior: contain;
}
.search-results.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.result-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease), padding-inline-start .2s var(--ease);
  animation: fadeUp .35s var(--ease) both;
}
.result-item:last-child { border-bottom: 0; }
.result-item:hover, .result-item.is-active { background: var(--red-soft); padding-inline-start: 22px; }
.result-icon {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  font-size: 1.2rem; border-radius: 10px; background: var(--bg-alt);
}
.result-text { flex: 1; min-width: 0; }
.result-name { font-weight: 600; font-size: .95rem; display: block; }
.result-name em { font-style: normal; color: var(--red); }
.result-meta { font-size: .78rem; color: var(--muted); display: block; }
.result-badge {
  font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; flex: none;
  background: var(--red-soft); color: var(--red);
}
.result-badge.off { background: #f2f0f4; color: var(--muted); }

.result-empty { padding: 24px 18px; text-align: center; color: var(--muted); font-size: .92rem; }
.result-foot { 
    
  display: none;
  padding: 10px 16px; font-size: .8rem; color: var(--muted);
  background: var(--bg-alt); text-align: center;
}

/* ==========================================================================
   الأقسام
   ========================================================================== */
.section { padding: 62px 0; }
/*.section-alt { background: var(--bg-alt); }*/

.section-title {
    text-align: right;
    font-size: 21px;
    font-weight: 700;
    padding-bottom: 10px;
}


.section-sub { text-align: center; color: var(--muted); margin-top: 10px; margin-bottom: 34px; }

/* ---------- بطاقات التصنيفات ---------- */
.cat-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.cat-grid-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.cat-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 14px;
    padding: 24px 20px;
    /* box-shadow: var(--shadow); */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-icon {
  font-size: 1.9rem; width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; background: var(--bg-alt); margin-bottom: 10px;
}

.cat-name {
    font-weight: 600;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
}

.cat-en { display: none;font-size: .78rem; color: var(--muted); direction: ltr; text-align: start; }
.cat-count { display: none;font-size: .82rem; color: var(--cat-color); font-weight: 600; margin-top: 6px; }

/* ---------- بطاقات المنتجات ---------- */
.product-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }

.product-card {
    position: relative;
    text-align: center;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 14px;
    padding: 14px 12px 12px;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: box-shadow .3s var(--ease);
}

/* تأثير بسيط عند المرور: ظل فقط، بلا حدود ملوّنة */
.product-card:hover { box-shadow: 0 10px 26px -12px rgba(26, 20, 32, .20); }

.product-icon {
  font-size: 2rem; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; background: transparent;
  transition: transform .4s var(--ease), background .4s var(--ease);
}
.product-name {
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
}
.product-en {
    font-size: .74rem;
    color: var(--muted);
    direction: ltr;
    display: none;
}
.product-cat {
    font-size: 12px;
    color: #666666;
    font-weight: 600;
}
.product-cta {
    /* auto يدفع الزر إلى أسفل البطاقة فتتساوى كل الأزرار في الصفّ */
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #ffff;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 5px 16px;
    transition: background .3s var(--ease), color .3s var(--ease);
    width: 100%;
    background: var(--cat-color);
}

.product-card.is-off { opacity: .62; }
.product-card.is-off:hover { opacity: .85; }
.product-card.is-off .product-cta { color: var(--muted); border-color: var(--line); }
.product-card.is-off:hover .product-cta { background: transparent; color: var(--muted); }
.product-card.is-hidden { display: none; }

.no-match { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- الخطوات ---------- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 22px 22px; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.step-num {
  position: absolute; top: -18px; inset-inline-start: 22px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 700;
  box-shadow: 0 8px 18px -10px var(--red);
}
.step h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: .92rem; }

.trust {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 26px;
    background: #e5f3ed;
    border: 1px solid #b9dbcc;
    border-radius: var(--radius);
    padding: 16px;
}

.trust-icon { font-size: 1.7rem; }
.trust strong {
    display: block;
    font-size: 16px;
    color: #3e9371;
    padding-bottom: 0px;
}

.trust p {
    color: #3f8b6d;
    font-size: 14px;
    line-height: 22px;
    padding-top: 4px;
}

/* ==========================================================================
   صفحة التصنيف
   ========================================================================== */
.cat-hero {
  padding: 34px 0 30px;
  background: linear-gradient(180deg, var(--bg-alt), #fff);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
    font-size: .84rem;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: center;
    display: none;
}

.breadcrumb a { transition: color .25s var(--ease); }
.breadcrumb a:hover { color: var(--red); }

.cat-hero-head { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.cat-hero-icon {
    font-size: 2.1rem;
    width: 70px;
    height: 70px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: pop .5s var(--ease) both;
}

.cat-hero-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.cat-hero-en {
    font-size: .86rem;
    color: var(--muted);
    direction: ltr;
    text-align: start;
    display: none;
}

.cat-hero-desc {
    color: var(--ink-2);
    margin-top: 12px;
    max-width: 62ch;
    display: none;
}
.cat-hero-meta { display: none; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-size: .78rem; font-weight: 700; padding: 5px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}
.chip-ok { background: var(--cat-color); border-color: var(--cat-color); color: #fff; }
.chip-off { background: #f2f0f4; color: var(--muted); }

.filter-count {
    font-size: .8rem;
    color: var(--muted);
    flex: none;
    display: none;
}
.empty-page { padding: 90px 0; text-align: center; }
.btn {
  display: inline-block; background: var(--red); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 11px 26px; margin-top: 18px;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }


/* ==========================================================================
   الحركات
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible {
  animation: fadeUp .6s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, 28px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   الاستجابة
   ========================================================================== */
/* قاعدة عامة (كانت داخل استعلام وسائط) */
:root { --header-h: 66px; }
.brand-logo { height: 49px; }
.menu-btn-label { display: none; }
.menu-btn { padding: 0px; }
.hero { padding: 5px 0 0px; }
.section { padding: 15px 0; }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.cat-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
.cat-card {
    padding: 14px 12px 12px;
}
.cat-icon { width: 48px; height: 48px; font-size: 1.5rem; }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--ink-2);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 18px;
    box-shadow: var(--shadow);
    transition: all .3s var(--ease);
    direction: ltr;
}
.back-btn:hover {
  color: var(--red); border-color: var(--red);
  box-shadow: 0 10px 24px -16px var(--red); transform: translateX(-3px);
}
.back-arrow { font-size: 1.05rem; line-height: 1; transition: transform .3s var(--ease); }
.back-btn:hover .back-arrow { transform: translateX(4px); }

/* ==========================================================================
   الفيديو التعريفي — نفس قواعد القالب الأصلي (video-wrap / gw-unmute-overlay)
   ========================================================================== */
.video-wrap {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #0C0C0E;
  margin: 25px auto 10px;
  max-width: 780px;
}
.video-wrap .video-player {
  width: 100%; height: auto; aspect-ratio: 16/9;
  object-fit: cover; display: block; max-width: 100%;
  background: #0C0C0E;
}
.gw-unmute-overlay {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 14px 12px;
  border: none; border-radius: 12px;
  background: rgba(0, 0, 0, .55);
  color: #fff; font-family: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; z-index: 4; width: 60%; max-width: 280px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.gw-unmute-overlay svg { width: 30px; height: 30px; }

.video-caption {
  text-align: center; color: var(--muted); font-size: .88rem; margin-top: 12px;
}

/* ==========================================================================
   الصور: التصنيفات والمنتجات
   ========================================================================== */

/* صورة داخل بطاقة التصنيف */
.cat-thumb {
  display: block; width: 100%; aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-alt); margin-bottom: 12px;
}
.cat-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* أيقونة التصنيف في القائمة الكبرى */
.mega-col-icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 9px; background: #fff; font-size: 1.2rem;
}
.mega-col-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* صورة التصنيف في ترويسة صفحة التصنيف */
.cat-hero-icon.has-img { padding: 0; overflow: hidden; }
.cat-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    padding: 6px;
}


/* صورة المنتج داخل البطاقة */
.product-media {
  display: grid; place-items: center;
  width: 75%; aspect-ratio: 1 / 1; margin-bottom: 8px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-alt);
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.product-media .product-icon { margin: 0; width: auto; height: auto; font-size: 3rem; box-shadow: none; }

/* صور مصغّرة في نتائج البحث */
.result-icon { overflow: hidden; }
.result-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* قاعدة عامة (كانت داخل استعلام وسائط) */
.product-media { margin-bottom: 6px; }
.cat-thumb { aspect-ratio: 3 / 3; }

/**new sec**/

    .gw-steps {
    /* variables scoped to this component only */
    --gw-purple: #F6252F;
    --gw-red-light: #FFEDEB;
    --gw-border: #ECE9F0;
    --gw-text-dark: #16161D;
    --gw-text-muted: #8B8B99;
    --gw-bg: #F7F7FA;
 
    all: initial;
    display: block;
    box-sizing: border-box;
    font-family: 'Hespress', 'Segoe UI', system-ui, sans-serif;
    color: var(--gw-text-dark);
    direction: rtl;
  }
 
  .gw-steps, .gw-steps *, .gw-steps *::before, .gw-steps *::after {
    box-sizing: border-box;
  }
 
.gw-steps .gw-steps-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 25px;
    background: #1f1f1f;
    border-radius: 18px;
}
 
.gw-steps .gw-steps-title {
    display: block;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.3;
    text-align: center;
    color: #fff;
}
 
  .gw-steps .gw-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
  }
 
  /* wrapper holds both the number and the card, so the number can be
     stacked BEHIND the card using z-index rather than floating above it */
  .gw-steps .gw-step {
    position: relative;
    padding-top: 30px; /* reserves space for the number to peek above the card */
  }
 
.gw-steps .gw-step-number {
    position: absolute;
    top: 3px;
    right: 14px;
    z-index: 1;
    display: block;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    color: var(--red);
}
 
.gw-steps .gw-step-card {
    position: relative;
    z-index: 2;
    background: #292929;
    border-radius: 14px;
    padding: 24px 20px 22px;
    box-shadow: 0 6px 20px rgba(22, 22, 29, 0.06);
}
 
  .gw-steps .gw-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }
 
  .gw-steps .gw-step-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
  .gw-steps .gw-step-icon svg {
    width: 26px;
    height: 26px;
    display: block;
  }
 
.gw-steps .gw-step-heading {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: #ffffff;
}
 
.gw-steps .gw-step-desc {
    display: block;
    font-size: 16px;
    line-height: 22px;
    color: #bababa;
    margin: 0;
}
 
  /* قاعدة عامة (كانت داخل استعلام وسائط) */
  .gw-steps .gw-steps-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

 
  /* قاعدة عامة (كانت داخل استعلام وسائط) */
  .gw-steps .gw-steps-title { font-size: 22px; }
  .gw-steps .gw-step-number { font-size: 36px; }
