/* ===== CSS ===== */
#navbar-iframe,
.navbar {
  display: none !important;
  visibility: hidden !important
}

:root {
  --brand: #0aa383;
  --brand-2: #0fb28b;
  --ink: #0b1220;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f7f9fb;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 18px 40px -22px rgba(15, 23, 42, .20);
  --edge: 12px;
  --edge-desktop: 8px;
  --edge-mobile: 12px;
  --card-basis-desktop: 180px;
  --card-minh-desktop: 100px;
  --card-basis-mobile: 160px;
  --card-minh-mobile: 90px
}

@media(min-width:900px) {
  :root {
    --edge: var(--edge-desktop);
  }
}

@media(max-width:640px) {
  :root {
    --edge: var(--edge-mobile);
  }
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: 'Tajawal', system-ui, Segoe UI, Roboto, Arial;
  background: #fff;
  color: var(--ink);
  line-height: 1.85
}

a {
  color: inherit;
  text-decoration: none
}

img {
  max-width: 100%;
  display: block
}

button {
  font-family: inherit
}

/* الحاوية */
.container {
  width: min(1240px, 100%);
  margin-inline: auto;
  padding-inline: var(--edge)
}

/* ===== Header محسّن ===== */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(15, 23, 42, .04)
}

.head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 10px;
  position: relative;
  gap: 16px
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform .2s ease
}

.brand:hover {
  transform: translateY(-1px)
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0aa383 0%, #0fb28b 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(10, 163, 131, .18);
  transition: box-shadow .3s ease, transform .3s ease
}

.brand:hover .logo {
  box-shadow: 0 12px 24px rgba(10, 163, 131, .28);
  transform: scale(1.05)
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px
}

.brand b {
  font-weight: 800;
  line-height: 1;
  display: inline-block;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #0aa383 0%, #0fb28b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent
}

/* الأيقونات */
.icons {
  display: flex;
  gap: 10px;
  position: absolute;
  left: var(--edge);
  top: 50%;
  transform: translateY(-50%)
}

.ico {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  cursor: pointer;
  transition: all .25s ease;
  position: relative
}

.ico svg {
  width: 20px;
  height: 20px;
  transition: transform .25s ease
}

.ico:hover {
  background: linear-gradient(135deg, rgba(10, 163, 131, .08) 0%, rgba(15, 178, 139, .12) 100%);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(10, 163, 131, .15)
}

.ico:hover svg {
  transform: scale(1.1)
}

.ico:active {
  transform: translateY(0)
}

/* زر الأقسام + الكلمة */
.catsControl {
  position: absolute;
  right: var(--edge);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5
}

#openCatsBtn {
  position: static
}

.catsLabel {
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color .25s ease
}

.catsLabel:hover {
  color: var(--brand)
}

@media (max-width:640px) {
  .head {
    min-height: 58px;
    padding: 8px 10px
  }

  .container {
    padding-inline: var(--edge-mobile) !important
  }

  .catsControl {
    display: none !important
  }

  .head {
    justify-content: space-between
  }

  .brand {
    position: static
  }

  .icons {
    position: static;
    transform: none
  }

  .logo {
    width: 38px;
    height: 38px
  }

  .brand b {
    font-size: 1.1rem
  }
}

@media (min-width:641px) and (max-width:1024px) {
  .head {
    min-height: 62px;
    padding: 10px 12px
  }

  .logo {
    width: 42px;
    height: 42px
  }
}

/* ===== Search Modal ===== */
#searchModal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
  animation: fadeIn .25s ease
}

#searchModal.show {
  display: flex
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.search-panel {
  background: #fff;
  border-radius: 24px;
  width: min(720px, 94vw);
  max-height: calc(100vh - 120px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .35);
  animation: slideDown .3s ease;
  display: flex;
  flex-direction: column
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.search-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%)
}

.search-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink)
}

.search-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .2s ease
}

.search-close:hover {
  background: #f8f9fa;
  border-color: var(--brand);
  transform: rotate(90deg)
}

.search-close svg {
  width: 18px;
  height: 18px
}

.search-input-wrap {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff
}

.search-input-wrap input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 1rem;
  background: #fafbfc;
  transition: all .25s ease;
  font-family: inherit
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 163, 131, .08)
}

.search-input-wrap input::placeholder {
  color: #94a3b8
}

.search-results {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(100vh - 320px)
}

.search-results::-webkit-scrollbar {
  width: 6px
}

.search-results::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px
}

.search-results::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: #94a3b8
}

.search-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted)
}

.search-empty svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: .3
}

.search-empty h4 {
  margin: 0 0 8px;
  color: var(--ink)
}

.search-empty p {
  margin: 0;
  font-size: .9rem
}

/* شريط الأقسام القديم — إخفاء */
.cats {
  display: none !important
}

/* أقسام */
main {
  padding: 22px 0
}

.section {
  margin-bottom: 22px
}

/* رأس القسم */
.cat-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px
}

.cat-ico {
  display: none !important
}

.cat-head h2 {
  font-size: 1.15rem;
  margin: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: transform .5s cubic-bezier(.2, .6, .2, 1), opacity .5s;
  font-weight: 800;
  color: var(--ink)
}

.cat-head .more {
  font-weight: 800;
  font-size: .9rem;
  color: var(--brand);
  position: relative;
  transition: transform .3s ease
}

.cat-head .more::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  margin: 4px auto 0;
  transition: width .6s cubic-bezier(.2, .6, .2, 1)
}

.cat-head::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  height: 6px;
  width: 300px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(10, 163, 131, 0), rgba(10, 163, 131, .48), rgba(10, 163, 131, 0));
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  opacity: 0;
  z-index: 1;
  pointer-events: none
}

.cat-head.reveal h2 {
  opacity: 1;
  transform: translateY(0)
}

.cat-head.reveal .more::after {
  width: 36px
}

.cat-head.reveal::before {
  animation: shine 1.6s ease-out .06s both
}

.cat-head .more:hover {
  transform: translateY(-2px)
}

@keyframes shine {
  0% {
    transform: translateX(-50%) scaleX(0);
    opacity: 0
  }

  20% {
    opacity: 1
  }

  60% {
    transform: translateX(-50%) scaleX(1);
    opacity: 1
  }

  100% {
    transform: translateX(-50%) scaleX(0);
    opacity: 0
  }
}

/* شبكات */
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-desktop), 1fr))
}

@media (max-width:640px) {
  .grid {
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-mobile), 1fr))
  }
}

/* ===== إعلان ===== */
#adsPeek {
  margin: 4px 0 0
}

.peek-wrap {
  position: relative
}

.peek-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  scroll-behavior: smooth
}

.peek-rail::-webkit-scrollbar {
  display: none
}

.ad-tile {
  flex: 0 0 min(860px, 92vw);
  aspect-ratio: 16/7;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff center/cover no-repeat;
  scroll-snap-align: center;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease
}

.ad-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 64px rgba(2, 6, 23, .2)
}

.ad-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .00), rgba(0, 0, 0, .06))
}

.sr {
  position: absolute;
  inset: 0;
  clip-path: inset(50%)
}

.dots {
  display: none !important
}

/* رايلات منتجات */
.rail-wrap {
  position: relative
}

.rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch
}

.rail::-webkit-scrollbar {
  height: 6px
}

.rail>.card {
  flex: 0 0 clamp(184px, 42vw, var(--card-basis-desktop));
  scroll-snap-align: start
}

@media(min-width:900px) {
  .rail>.card {
    flex-basis: var(--card-basis-desktop)
  }
}

@media (max-width:640px) {
  .rail {
    gap: 6px
  }

  .rail>.card {
    flex: 0 0 clamp(146px, 44vw, var(--card-basis-mobile))
  }
}

/* كارد محسّن */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-height: var(--card-minh-desktop);
  position: relative
}

@media(max-width:640px) {
  .card {
    min-height: var(--card-minh-mobile)
  }
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(10, 163, 131, .02) 0%, rgba(15, 178, 139, .04) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 163, 131, .3);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .15)
}

.card:hover::before {
  opacity: 1
}

.card:focus {
  outline: 3px solid rgba(10, 163, 131, .22);
  outline-offset: 2px
}

.thumb {
  position: relative;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  display: grid;
  place-items: center;
  padding: 3px
}

.frame {
  width: 100%;
  aspect-ratio: 6/5;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .3s ease
}

.card:hover .frame {
  transform: scale(1.03)
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
  transition: filter .25s ease;
  background: transparent
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 22px;
  padding: 0 8px;
  width: auto;
  max-width: calc(100% - 6px);
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(10, 163, 131, .9) 0%, rgba(15, 178, 139, .85) 100%);
  color: #fff;
  font-weight: 800;
  font-size: .72rem;
  border-radius: 0 0 0 8px;
  box-shadow: 0 4px 12px rgba(10, 163, 131, .35);
  backdrop-filter: saturate(110%) blur(.5px);
  pointer-events: none;
  z-index: 9
}

.discount {
  display: none !important
}

.body {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  flex: 1
}

.title {
  margin: 0 0 2px;
  font-size: .85rem;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.6em;
  color: var(--ink)
}

.excerpt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.0em
}

@media (max-width:640px) {
  .card .excerpt {
    display: none
  }

  .card .title {
    font-size: .88rem
  }
}

.row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin-top: auto;
  width: 100%
}

.price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap
}

.now {
  font-weight: 900;
  color: #065f46;
  font-size: .85rem
}

.old {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: .72em
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(10, 163, 131, .2);
  background: linear-gradient(135deg, rgba(10, 163, 131, .08) 0%, rgba(15, 178, 139, .12) 100%);
  color: var(--brand);
  font-weight: 900;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  white-space: nowrap;
  width: 100%;
  justify-content: center;
  font-size: .72rem
}

.btn-cta:hover {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(10, 163, 131, .15);
  transform: translateY(-2px)
}

.btn-cta svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px
}

.btn-cta.primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-color: var(--brand)
}

.btn-cta.primary:hover {
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
  box-shadow: 0 0 0 6px rgba(10, 163, 131, .2)
}

/* التفاصيل + العدسة */
#detailView {
  display: none
}

.crumb {
  color: #6b7280;
  margin-bottom: 8px;
  font-size: .9rem
}

.crumb a {
  color: var(--brand);
  transition: color .2s ease
}

.crumb a:hover {
  color: var(--brand-2)
}

.wrap {
  display: grid;
  grid-template-columns: .95fr .85fr;
  gap: 18px
}

@media (max-width:960px) {
  .wrap {
    grid-template-columns: 1fr
  }
}

.box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow)
}

.desc {
  max-height: unset;
  overflow: visible
}

.desc a {
  color: var(--brand);
  text-decoration: underline
}

.desc iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 12px;
  margin: 10px 0
}

.desc video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  margin: 10px 0;
  background: #000
}

.gallery {
  display: grid;
  gap: 12px
}

.main-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  max-height: 420px;
  touch-action: pan-y;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat
}

.main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  background: transparent
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 6;
  transition: all .25s ease
}

.nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .2)
}

.prev {
  left: 12px
}

.next {
  right: 12px
}

.nav svg {
  width: 20px;
  height: 20px
}

.lens {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .25);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .18);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
  background-repeat: no-repeat;
  background-color: #fff;
  z-index: 2
}

.main-frame.lensing .lens {
  opacity: 1
}

.strip {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 6px 2px
}

.th {
  flex: 0 0 68px;
  height: 68px;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  opacity: .7;
  transition: all .25s ease
}

.th img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent
}

.th.active {
  outline: 3px solid var(--brand);
  opacity: 1;
  transform: scale(1.05)
}

.th:hover {
  opacity: 1;
  border-color: var(--brand)
}

@media (max-width:640px) {
  .th {
    flex: 0 0 60px;
    height: 60px
  }
}

.share-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(2, 6, 23, .88) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(2, 6, 23, .4), 0 0 0 2px rgba(255, 255, 255, .7) inset !important;
  display: grid;
  place-items: center;
  z-index: 7;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all .25s ease
}

.share-btn:hover {
  background: rgba(2, 6, 23, .95) !important;
  transform: scale(1.08)
}

.share-btn:focus {
  outline: 3px solid rgba(10, 163, 131, .35);
  outline-offset: 2px
}

.share-btn svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45));
  stroke-width: 2.2
}

@media (min-width: 961px) {
  #detailView .gallery {
    position: sticky;
    top: var(--stick-top, 80px);
    align-self: start;
  }
}

@media (max-width: 960px) {
  #detailView .gallery {
    position: static;
  }
}

/* حالات فارغة */
.empty {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  text-align: center
}

.empty h3 {
  margin: 0 0 8px;
  color: #0b1220
}

.empty p {
  margin: 0 0 14px;
  color: #64748b
}

.empty .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center
}

.empty a,
.empty button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s ease
}

.empty a:hover,
.empty button:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-2px)
}

.empty .wa {
  position: static;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: none;
  padding: 10px 16px
}

/* ===== Footer ===== */
footer {
  margin-top: 40px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #0b1220;
  border-top: 1px solid var(--line)
}

.superfoot {
  padding: 24px 0 12px;
  text-align: center
}

.toTop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0b1220;
  cursor: pointer;
  opacity: .92;
  transition: all .25s ease;
  padding: 10px 20px;
  border-radius: 12px
}

.toTop:hover {
  opacity: 1;
  background: rgba(10, 163, 131, .08);
  color: #fff
}

.toTop svg {
  width: 20px;
  height: 20px;
  transform: translateY(0);
  animation: floaty 2.2s ease-in-out infinite
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-6px)
  }
}

.socials {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 14px 0 8px
}

.socials a {
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  transition: all .25s ease
}

.socials a:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(10, 163, 131, .2);
  border-color: var(--brand)
}

.socials img {
  width: 24px;
  height: 24px;
  display: block
}

.footPro {
  display: grid;
  grid-template-areas: "brand service";
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
  padding: 14px 0 28px
}

@media (max-width:900px) {
  .footPro {
    grid-template-areas: "brand" "service";
    grid-template-columns: 1fr;
    text-align: center
  }
}

.footPro h4 {
  margin: 0 0 10px;
  color: #0b1220;
  font-weight: 800
}

.brandBlock {
  grid-area: brand;
  text-align: start
}

@media (max-width:900px) {
  .brandBlock {
    text-align: center
  }
}

.brandBlock .miniLogo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  margin: 0 0 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08)
}

@media (max-width:900px) {
  .brandBlock .miniLogo {
    margin: 0 auto 10px
  }
}

.brandBlock p {
  margin: .25rem 0 0;
  color: #334155
}

.serviceCol {
  grid-area: service
}

.serviceGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 120px));
  gap: 12px;
  justify-content: center
}

@media (max-width:480px) {
  .serviceGrid {
    grid-template-columns: repeat(2, minmax(0, 120px))
  }
}

.serviceGrid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0b1220;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 800;
  transition: all .25s ease
}

.serviceGrid a:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(10, 163, 131, .15)
}

.serviceGrid svg {
  width: 24px;
  height: 24px
}

.copyright {
  border-top: 1px solid #e5e7eb;
  padding: 16px 0;
  color: #475569;
  font-size: .9rem
}

/* واتساب فلوّت */
.wa {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366 0%, #20c65a 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
  z-index: 60;
  transition: all .3s ease
}

.wa:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(37, 211, 102, .5)
}

.wa img {
  width: 32px;
  height: 32px;
  display: block
}

/* Bottom Nav — هاتف فقط */
.bnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
  justify-items: center;
  z-index: 55;
  padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px)
}

.bnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  color: #334155;
  font-size: .8rem;
  padding: 8px 6px;
  border-radius: 12px;
  transition: all .25s ease
}

.bnav a.active {
  color: var(--brand);
  background: rgba(10, 163, 131, .1)
}

.bnav a:hover {
  background: rgba(10, 163, 131, .08)
}

.bnav svg {
  width: 26px;
  height: 26px;
  stroke-linecap: round;
  stroke-linejoin: round
}

@media (max-width:640px) {
  .wa {
    bottom: calc(68px + 22px + env(safe-area-inset-bottom, 0px)) !important
  }

  .bnav {
    display: grid
  }
}

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 70
}

.drawer.show {
  display: block
}

.drawer .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .35);
  backdrop-filter: blur(8px)
}

.drawer .panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(86vw, 440px);
  background: #fff;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .22);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column
}

.drawer.show .panel {
  transform: translateX(0)
}

.drawer header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fff, #f0faf7);
  position: relative
}

.drawer header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800
}

.drawer header .hdr-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0b1220;
  pointer-events: none
}

.drawer header .x {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  cursor: pointer;
  transition: all .25s ease
}

.drawer header .x:hover {
  background: #f8f9fa;
  border-color: var(--brand);
  transform: rotate(90deg)
}

.drawer .searchrow {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line)
}

.drawer .searchrow input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  transition: all .25s ease
}

.drawer .searchrow input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 163, 131, .08)
}

.drawer .brandMini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0;
  border-bottom: 0
}

.brandMini .mini {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06)
}

.brandMini .mini img {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.brandMini b {
  font-weight: 800
}

.drawer .list {
  padding: 14px 18px;
  display: grid;
  gap: 12px;
  overflow: auto
}

.drawer .group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: all .25s ease
}

.drawer .group:hover {
  border-color: rgba(10, 163, 131, .3)
}

.drawer .group+.group {
  margin-top: 10px
}

.drawer .g-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  transition: background .25s ease
}

.drawer .g-head:hover {
  background: rgba(10, 163, 131, .04)
}

.drawer .g-head b {
  font-size: 1rem
}

.drawer .g-head .chev {
  width: 20px;
  height: 20px;
  transition: transform .25s ease
}

.drawer .g-head[aria-expanded="true"] .chev {
  transform: rotate(180deg)
}

.drawer .g-body {
  display: none;
  border-top: 1px dashed #e5e7eb;
  padding: 10px
}

.drawer .g-body.show {
  display: block
}

.drawer .g-body a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  transition: all .25s ease
}

.drawer .g-body a:hover {
  background: rgba(10, 163, 131, .08);
  border-color: rgba(10, 163, 131, .2)
}

.drawer .g-body a+a {
  margin-top: 8px
}

.drawer .g-body .all {
  font-weight: 800;
  color: var(--brand)
}

/* جوال */
@media (max-width:640px) {
  #homeView .section .grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-mobile), 1fr));
  }

  #homeView .section .grid .card {
    min-height: var(--card-minh-mobile);
  }

  #homeView .section {
    margin-inline: 0;
  }

  #homeView .section .grid {
    padding-inline: 4px !important;
    margin-inline: calc(var(--edge-mobile) * -1 + 4px);
  }

  #homeView .section .rail-wrap {
    margin-inline: calc(var(--edge-mobile) * -1 + 4px);
  }

  #homeView .section .rail {
    padding-inline: 4px !important;
  }

  #adsPeek .peek-rail,
  #homeView .promo-section .promo-rail {
    padding-inline: 4px !important;
  }
}

/* Lightbox */
#lb {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000
}

#lb.show {
  display: flex
}

#lb img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  background: #000
}

#lb .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .15);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .25s ease
}

#lb .lb-nav:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-50%) scale(1.1)
}

#lb .lb-prev {
  left: 20px
}

#lb .lb-next {
  right: 20px
}

#lb .lb-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .15);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .25s ease
}

#lb .lb-close:hover {
  background: rgba(255, 255, 255, .25);
  transform: rotate(90deg)
}

#lb svg {
  width: 24px;
  height: 24px;
  stroke: #fff
}

/* ===== سلايدر المستطيلات ===== */
.promo-section {
  margin: 18px 0 20px
}

.promo-wrap {
  position: relative
}

.promo-rail {
  --promo-gap: 14px;
  --promo-cards: 3;
  display: flex;
  gap: var(--promo-gap);
  overflow-x: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  justify-content: flex-start;
}

.promo-rail::-webkit-scrollbar {
  display: none
}

.promo-card {
  position: relative;
  flex: 0 0 calc((100% - (var(--promo-cards) - 1)*var(--promo-gap)) / var(--promo-cards));
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff center/cover no-repeat;
  box-shadow: 0 18px 44px -26px rgba(2, 6, 23, .30);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  transform-origin: center;
  will-change: transform;
  scroll-snap-align: start;
}

.promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 110% at 8% 0%, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, rgba(2, 6, 23, 0) 30%, rgba(2, 6, 23, .55) 100%);
  pointer-events: none;
  z-index: 1;
}

.promo-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 28px 72px -30px rgba(2, 6, 23, .45);
  border-color: rgba(10, 163, 131, .3)
}

.promo-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  color: #fff;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px
}

.promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-weight: 900;
  font-size: .8rem;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
  user-select: none;
  transition: all .25s ease
}

.promo-cta svg {
  width: 18px;
  height: 18px
}

.promo-cta:hover {
  background: rgba(255, 255, 255, .3);
  transform: translateY(-2px)
}

@media (max-width:900px) {
  .promo-rail {
    --promo-cards: 2
  }
}

@media (max-width:640px) {
  .promo-rail {
    --promo-cards: 1
  }
}

.promo-nav {
  display: none !important
}

/* إخفاء شريط التمرير */
html,
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

.rail::-webkit-scrollbar,
.peek-rail::-webkit-scrollbar,
.drawer .list::-webkit-scrollbar {
  display: none;
}

.drawer .list {
  scrollbar-width: none;
}

/* أسهم الرايل */
:root {
  --rail-btn: 38px;
  --rail-icon: 20px;
  --rail-gap: 10px;
}

.rail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--rail-btn);
  height: var(--rail-btn);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(130%) blur(8px);
  backdrop-filter: saturate(130%) blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(2, 6, 23, .2);
  z-index: 6;
  transition: all .2s ease;
  opacity: .9;
}

.rail-prev {
  left: var(--rail-gap)
}

.rail-next {
  right: var(--rail-gap)
}

.rail-nav svg {
  width: var(--rail-icon);
  height: var(--rail-icon);
  stroke: #0b1220;
  stroke-width: 2.2;
}

.rail-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .4) inset, 0 0 0 6px rgba(255, 255, 255, .1);
  opacity: .7;
  pointer-events: none;
}

.rail-nav::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: inherit
}

@media (hover:hover) {
  .rail-wrap .rail-nav {
    opacity: 0
  }

  .rail-wrap:hover .rail-nav {
    opacity: 1
  }

  .rail-nav:hover {
    transform: translateY(-50%) scale(1.12);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 16px 36px rgba(2, 6, 23, .3);
  }
}

.rail-nav:focus {
  outline: 2px solid rgba(10, 163, 131, .4);
  outline-offset: 2px;
}

@media (max-width:640px) {
  .rail-nav {
    display: none !important
  }
}

@media (prefers-reduced-motion:reduce) {
  .rail-nav {
    transition: none
  }
}

/* تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important
  }

  .cat-head::before,
  .cat-ico {
    display: none
  }
}

.peek-wrap {
  position: relative;
  z-index: 5
}

.dots {
  position: relative;
  z-index: 6
}

.cat-head::before {
  z-index: 1;
  pointer-events: none
}

#homeSections .section:first-of-type {
  margin-top: 18px
}

.catsTitleBar {
  display: none !important;
}

.catsLabel {
  font-weight: 500 !important;
}

/* اجعل الهيدر دائماً في الوسط وأظهر زر "القائمة" على الجوال */
@media (max-width:640px) {

  /* رجّع المحاذاة للوسط على الموبايل */
  header .head {
    justify-content: center !important;
  }

  /* أعِد الأيقونات لليسار بوضعية مطلقة كما في الديسكتوب */
  .icons {
    position: absolute !important;
    left: var(--edge) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* أظهر زر الأقسام دائماً وضعه يمين الهيدر */
  .catsControl {
    display: flex !important;
    position: absolute !important;
    right: var(--edge) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5;
  }

  /* أبقِ الشعار بحجم الموبايل الحالي (اختياري) */
  .logo {
    width: 38px;
    height: 38px;
  }
}

/* لو فيه سطر قديم يُخفي زر الأقسام على الموبايل، هذا يلغي مفعوله */
@media (max-width:640px) {
  .catsControl {
    display: flex !important;
  }
}

/* إزالة الخلفية/الحواف الخضراء حول الشعار في الهيدر */
header .logo {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* إلغاء تأثير الهوفر على الشعار */
header .brand:hover .logo {
  box-shadow: none !important;
  transform: none !important;
}

/* ضمان أن صورة الشعار نفسها ما عليها حواف داخلية */
header .logo img {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* على الجوال: إخفاء كلمة "القائمة" وإبقاء الأيقونة فقط */
@media (max-width:640px) {
  .catsLabel {
    display: none !important;
  }

  .catsControl {
    gap: 0 !important;
  }

  /* اختياري لتصفير المسافة بعد إخفاء النص */
}

/* إخفاء زر/عدسة البحث في الهيدر على الشاشات الصغيرة */
@media (max-width:640px) {
  #openSearchBtn {
    display: none !important;
  }
}

/* ===== Bottom Nav — ضبط الحجم وتنسيق المحتوى + مظهر عائم ===== */
@keyframes floatBar {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-3px)
  }
}

@media (max-width:640px) {
  .bnav {
    /* أبعاد وموقع الكبسولة */
    --bnav-h: 64px;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
    height: var(--bnav-h);

    /* مظهر ناعم/شبه زجاجي */
    border-radius: 22px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(2, 6, 23, .08);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 18px 45px rgba(2, 6, 23, .18), 0 1px 0 rgba(255, 255, 255, .6) inset;

    /* شبكة مرتبة للمحتوى */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: center;
    justify-items: center;
    padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 55;

    /* حركة خفيفة “يطفو” */
    animation: floatBar 7s ease-in-out infinite;
  }

  /* زر كل عنصر داخل الشريط */
  .bnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: calc(var(--bnav-h) - 16px);
    border-radius: 14px;
    padding: 6px 4px;

    font-weight: 800;
    font-size: .76rem;
    line-height: 1;
    color: #334155;
    white-space: nowrap;

    transition: transform .18s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  }

  .bnav a:active {
    transform: translateY(1px) scale(.98);
  }

  /* الأيقونات */
  .bnav svg {
    width: 22px;
    height: 22px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
  }

  /* الحالة النشطة */
  .bnav a.active {
    color: var(--brand);
    background: rgba(10, 163, 131, .10);
    box-shadow: 0 6px 16px rgba(10, 163, 131, .18) inset;
  }

  /* شاشات أصغر جداً */
  @media (max-width:360px) {
    .bnav {
      --bnav-h: 60px;
      gap: 6px;
    }

    .bnav a {
      font-size: .72rem;
      border-radius: 12px;
    }

    .bnav svg {
      width: 20px;
      height: 20px;
    }
  }

  /* ارفع زر الواتساب ليبتعد عن الشريط */
  .wa {
    bottom: calc(var(--bnav-h) + 26px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion:reduce) {
  .bnav {
    animation: none !important;
  }
}


/* فاصل رمادي أنيق ممتد على جانبي "تسوق المزيد" */
.cat-head .more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  /* مسافة بين النص والخطين */
  width: 100%;
  color: #475569;
  /* لون النص رمادي داكن أنيق */
  font-weight: 800;
  margin: 8px 0 2px;

  /* "فل بليد" ليمتد العنصر حتى أطراف الشاشة مع حافة داخلية آمنة */
  margin-inline: calc(50% - 50vw);
  padding-inline: max(var(--edge), 16px);
}

/* الخطان الرماديان على الجانبين */
.cat-head .more::before,
.cat-head .more::after {
  content: "";
  height: 1px;
  /* خط رفيع أنيق */
  flex: 1 1 auto;
  /* يتمدد حتى الحواف */
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), #cbd5e1 55%, rgba(0, 0, 0, 0));
}

/* نعكس اتجاه التدرّج على الجهة الثانية ليتقابلان بسلاسة */
.cat-head .more::after {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0), #cbd5e1 55%, rgba(0, 0, 0, 0));
}

/* تعطيل تأثير الشَرطة القديمة على ::after */
.cat-head .more::after {
  margin: 0 !important;
  width: auto !important;
  transition: none !important;
  border-radius: 0 !important;
}

.cat-head.reveal .more::after {
  width: auto !important;
}

/* إبراز خفيف عند المرور */
.cat-head .more:hover::before,
.cat-head .more:hover::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), #94a3b8 55%, rgba(0, 0, 0, 0));
}

.cat-head .more:hover::after {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0), #94a3b8 55%, rgba(0, 0, 0, 0));
}

/* موبايل: تقليل الحواف الداخلية */
@media (max-width:640px) {
  .cat-head .more {
    padding-inline: max(var(--edge-mobile), 12px);
  }
}

.cat-head .more {
  color: var(--brand) !important;
}


/* ===== إعلانات الهيرو — جوال بلا هوامش وملاصقة للهيدر ===== */
@media (max-width:640px) {

  /* ألغِ المسافة العلوية بين الهيدر والمحتوى */
  #homeView {
    padding-top: 0 !important;
  }

  #adsPeek {
    margin-top: 0 !important;
  }

  /* اجعل السلايدر يملأ عرض الشاشة خارج حواف الـ container */
  #adsPeek .peek-wrap {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
  }

  /* لا هوامش داخلية ولا فجوات بين الشرائح */
  #adsPeek .peek-rail {
    padding: 0 !important;
    gap: 0 !important;
  }

  /* كل إعلان يساوي عرض الشاشة تماماً وبلا حدود/زوايا */
  #adsPeek .ad-tile {
    flex: 0 0 100vw;
    max-width: 100vw;
    height: clamp(220px, 50vh, 520px);
    /* عدّل الارتفاع إذا رغبت */
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-position: center;
    background-size: cover;
    scroll-snap-align: center;
  }

  /* تدرّج لطيف فوق الصورة (اختياري) */
  #adsPeek .ad-tile::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .08));
  }
}

/* موبايل: اجعل الصورة تملأ الحقل بالكامل */
@media (max-width:640px) {

  /* تأكد أن السلايدر بعرض الشاشة بالكامل */
  #adsPeek .peek-rail {
    padding: 0 !important;
    gap: 0 !important;
  }

  #adsPeek .ad-tile {
    flex: 0 0 100vw !important;
    width: 100vw !important;

    /* ارتفاع صغير لكن يظل واضحًا */
    height: clamp(120px, 26vh, 260px) !important;

    /* ملء كامل بدون فراغات (قد يُقص الأطراف قليلًا وهذا طبيعي مع cover) */
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    /* لو أردتها ملتصقة تمامًا بحواف الشاشة */
    border-radius: 0 !important;
    border: 0 !important;
  }
}


/* تقليل الهوامش الجانبية في صفحة الرئيسية فقط (لابتوب وما فوق) */
@media (min-width: 1024px) {

  /* عنصر الرئيسية نفسه عندك هو container */
  #homeView {
    /* وسّع العرض ليقترب من حواف الشاشة */
    width: clamp(1100px, 96vw, 1440px);
    /* خفّف الحافة الداخلية يمين/يسار للرئيسية فقط */
    padding-inline: 8px;
    /* غيّرها لـ 6px أو 4px إن حبيت */
  }
}


/* تكبير عنوان المنتج داخل صفحة التفاصيل فقط */
#detailView #pTitle {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem);
  /* أكبر بقليل وبشكل متجاوب */
  line-height: 1.35;
  margin: 0 0 10px;
}

/* (اختياري) لو حاب يظهر العنوان كاملًا بدون قصّ */
#detailView #pTitle {
  display: block;
  /* يلغي -webkit-box من .title العامة */
  -webkit-line-clamp: initial;
  /* إلغاء القصّ */
  overflow: visible;
  min-height: 0;
}

@media (min-width:1024px) {
  #detailView #pTitle {
    font-size: 1.18rem;
  }
}

/* ========= [إضافة هامة] أبعاد SVG للشعار في كل المواضع ========= */
header .logo svg,
.brandMini .mini svg,
.miniLogo svg {
  width: 100%;
  height: 100%;
  display: block
}

/* إزالة أي خلفية/حد/ظل من حوامل الشعار */
header .logo,
.brandMini .mini,
.brandBlock .miniLogo {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* تأكيد أبعاد الـSVG */
header .logo svg,
.brandMini .mini svg,
.brandBlock .miniLogo svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ——— تكبير الكروت في الصفحة الرئيسية فقط ——— */
#homeView {
  /* كانت 180/160 — رفعناها قليلاً */
  --card-basis-desktop: 220px;
  --card-minh-desktop: 120px;

  --card-basis-mobile: 180px;
  --card-minh-mobile: 110px;
}

/* تكبير شعار الهيدر فقط — زيادات خفيفة */
header .logo {
  width: 50px;
  height: 50px;
}

/* تابلت */
@media (min-width:641px) and (max-width:1024px) {
  header .logo {
    width: 48px;
    height: 48px;
  }
}

/* جوال */
@media (max-width:640px) {
  header .logo {
    width: 44px;
    height: 44px;
  }
}

/* أيقونة داخل الوسم */
.badge svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px
}

.badge svg+span {
  margin-inline-start: 6px
}

/* ألوان الوسوم الخاصة (مطابقة تمامًا لكودك) */
.badge-word {
  background: linear-gradient(135deg, #2B579A 0%, #1e3a6d 100%);
  color: #fff;
}

.badge-excel {
  background: linear-gradient(135deg, #217346 0%, #185c37 100%);
  color: #fff;
}

.badge-powerpoint {
  background: linear-gradient(135deg, #D24726 0%, #b8391c 100%);
  color: #fff;
}

.badge-pdf {
  background: linear-gradient(135deg, #F40F02 0%, #d00d01 100%);
  color: #fff;
}

.badge-image {
  background: linear-gradient(135deg, #FFB800 0%, #ff9500 100%);
  color: #fff;
}

.badge-video {
  background: linear-gradient(135deg, #FF006E 0%, #d4005b 100%);
  color: #fff;
}

.badge-audio {
  background: linear-gradient(135deg, #8338EC 0%, #6a2cbd 100%);
  color: #fff;
}

.badge-archive {
  background: linear-gradient(135deg, #6C757D 0%, #545b62 100%);
  color: #fff;
}

.badge-ai {
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, .4);
}

.badge-photoshop {
  background: linear-gradient(135deg, #31A8FF 0%, #0078D4 100%);
  color: #fff;
}

.badge-canva {
  background: linear-gradient(135deg, #00C4CC 0%, #7B2CBF 100%);
  color: #fff;
}

/* (اختياري) لو حاب وسوم default بنَفَس كودك التجريبي */
.badge-default {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}



/* 1) تعريف عالمي للارتفاع */
:root {
  --bnav-h: 64px;
}

/* 2) القاعدة الأساسية للزر (أصغر قليلاً) */
.wa {
  position: fixed;
  left: 18px;
  width: 54px;
  /* أصغر بقليل */
  height: 54px;
  /* أصغر بقليل */
  bottom: 18px;
  z-index: 1000;
  /* فوق شريط الأسفل وباقي العناصر */
}

/* 3) موبايل: ارفع الزر فوق شريط الأسفل + دعم آمن لـ env() */
@media (max-width:640px) {

  /* fallback لو المتصفح ما يدعم env() */
  .wa {
    bottom: calc(var(--bnav-h, 64px) + 24px) !important;
  }

  /* لو يدعم env() نستفيد من حافة الأجهزة (iPhone وغيره) */
  @supports (bottom: calc(1px + env(safe-area-inset-bottom))) {
    .wa {
      bottom: calc(var(--bnav-h, 64px) + 24px + env(safe-area-inset-bottom)) !important;
    }
  }

  /* صغّر الأيقونة بما يناسب المقاس الجديد */
  .wa img {
    width: 28px;
    height: 28px;
  }
}



/* === Share button — زجاجي أنيق وخفيف === */
#detailView .share-btn {
  /* موضع وحجم أخفّ حتى ما يغطي الصورة */
  top: 10px;
  left: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;



  /* زجاجي شفاف + لمعان خفيف */
  background:
    radial-gradient(120% 160% at 20% -10%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .18) 35%, rgba(255, 255, 255, .06) 65%, rgba(255, 255, 255, .02) 100%),
    rgba(255, 255, 255, .10) !important;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);

  /* حدود وتمييز على كل الخلفيات */
  border: 1px solid rgba(255, 255, 255, .35) !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, .22),
    /* ظل خارجي ناعم */
    inset 0 1px 0 rgba(255, 255, 255, .28),
    /* لمعة داخلية */
    0 0 0 1px rgba(0, 0, 0, .10);
  /* خط داكن خفي لتحسين التباين */

  color: #fff !important;
  display: grid;
  place-items: center;
  z-index: 7;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, opacity .2s ease;
  opacity: .96;
}

#detailView .share-btn:hover {
  transform: translateY(-1px);
  background:
    radial-gradient(120% 160% at 20% -10%, rgba(255, 255, 255, .65) 0%, rgba(255, 255, 255, .24) 35%, rgba(255, 255, 255, .08) 65%, rgba(255, 255, 255, .02) 100%),
    rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .52) !important;
  box-shadow:
    0 14px 32px rgba(2, 6, 23, .28),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 0 0 1px rgba(0, 0, 0, .12);
}

#detailView .share-btn:active {
  transform: translateY(0) scale(.98)
}

#detailView .share-btn:focus-visible {
  outline: 3px solid rgba(10, 163, 131, .35);
  outline-offset: 2px
}

/* حلقة تدرّج لطيفة حول الزر */
#detailView .share-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, var(--brand), var(--brand-2), var(--brand));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
  transition: opacity .2s ease, transform .35s ease;
}

#detailView .share-btn:hover::before {
  opacity: .9;
  transform: rotate(10deg)
}

/* الأيقونة أصغر حتى تقل مساحة الحجب */
#detailView .share-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2.1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
  transition: transform .2s ease, opacity .2s ease;
}

#detailView .share-btn:hover svg {
  transform: translateY(-1px)
}

/* تلميح بسيط (بدون تعديل HTML) */
#detailView .share-btn::after {
  content: "مشاركة";
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: .78rem;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 22px rgba(2, 6, 23, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

#detailView .share-btn:hover::after,
#detailView .share-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width:640px) {
  #detailView .share-btn {
    width: 40px;
    height: 40px;
    top: 8px;
    left: 8px
  }

  #detailView .share-btn svg {
    width: 16px;
    height: 16px
  }

  #detailView .share-btn::after {
    display: none
  }
}

/* فالباك عند غياب دعم الخلفية الزجاجية */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #detailView .share-btn {
    background: rgba(15, 23, 42, .70) !important;
    border-color: rgba(255, 255, 255, .28) !important;
  }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion:reduce) {

  #detailView .share-btn,
  #detailView .share-btn::before,
  #detailView .share-btn::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ——— المفضلة: نفس ستايل زر المشاركة تمامًا ——— */

/* شارك نفس القواعد الأساسية */
#detailView .share-btn,
#detailView .fav-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .10) !important;
  color: #fff !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, .4),
    0 0 0 2px rgba(255, 255, 255, .7) inset !important;
  display: grid;
  place-items: center;
  z-index: 7;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, opacity .2s ease;
  opacity: .96;
}

/* ضع المفضلة يمين زر المشاركة */
#detailView .share-btn {
  left: 12px
}

#detailView .fav-btn {
  left: 64px
}

/* 48px عرض زر + 4px فراغ */

/* الهوفر/الفوكس/أكتيف مطابق */
#detailView .share-btn:hover,
#detailView .fav-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .52) !important;
  box-shadow:
    0 14px 32px rgba(2, 6, 23, .28),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 0 0 1px rgba(0, 0, 0, .12);
}

#detailView .share-btn:active,
#detailView .fav-btn:active {
  transform: translateY(0) scale(.98)
}

#detailView .share-btn:focus-visible,
#detailView .fav-btn:focus-visible {
  outline: 3px solid rgba(10, 163, 131, .35);
  outline-offset: 2px
}

/* حلقة التدرّج نفسها */
#detailView .share-btn::before,
#detailView .fav-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, var(--brand), var(--brand-2), var(--brand));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
  transition: opacity .2s ease, transform .35s ease;
}

#detailView .share-btn:hover::before,
#detailView .fav-btn:hover::before {
  opacity: .9;
  transform: rotate(10deg)
}

/* أيقونة داخل الزرين */
#detailView .share-btn svg,
#detailView .fav-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2.1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
  transition: transform .2s ease, opacity .2s ease;
}

#detailView .share-btn:hover svg,
#detailView .fav-btn:hover svg {
  transform: translateY(-1px)
}

/* التولتيب (نص صغير تحت الزر) */
#detailView .share-btn::after,
#detailView .fav-btn::after {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: .78rem;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 22px rgba(2, 6, 23, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  content: "";
  /* يُستبدل أدناه لكل زر */
}

#detailView .share-btn::after {
  content: "مشاركة"
}

#detailView .fav-btn::after {
  content: "مفضلة"
}

#detailView .share-btn:hover::after,
#detailView .share-btn:focus-visible::after,
#detailView .fav-btn:hover::after,
#detailView .fav-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* موبايل: نفس القياسات والمواقع */
@media (max-width:640px) {

  #detailView .share-btn,
  #detailView .fav-btn {
    width: 40px;
    height: 40px;
    top: 8px
  }

  #detailView .share-btn {
    left: 8px
  }

  #detailView .fav-btn {
    left: 56px
  }

  /* 40px + 8px فراغ */
  #detailView .share-btn::after,
  #detailView .fav-btn::after {
    display: none
  }
}

/* فالباك بدون خلفية زجاجية */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {

  #detailView .share-btn,
  #detailView .fav-btn {
    background: rgba(15, 23, 42, .70) !important;
    border-color: rgba(255, 255, 255, .28) !important;
  }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion:reduce) {

  #detailView .share-btn,
  #detailView .fav-btn,
  #detailView .share-btn::before,
  #detailView .fav-btn::before,
  #detailView .share-btn::after,
  #detailView .fav-btn::after {
    transition: none !important;
    animation: none !important;
  }
}

/* تفعيل تعبئة القلب عند الإضافة للمفضلة (بدون تغيير الخلفية) */
/* ===== Favorites: نفس مقاسات الرئيسية + زر حذف أنيق ===== */
#favView {
  /* نفس قيم الكروت في الرئيسية */
  --card-basis-desktop: 220px;
  --card-minh-desktop: 120px;
  --card-basis-mobile: 180px;
  --card-minh-mobile: 110px;
}

/* شبكة المفضلة مطابقة تمامًا */
#favView .grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-desktop), 1fr));
}

@media (max-width:640px) {
  #favView .grid {
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-mobile), 1fr));
  }
}

/* اجعل الكارد يملأ العنصر ليصبح كل الصف متساوي الارتفاع */
#favView .fav-wrap {
  position: relative;
  height: 100%;
}

#favView .fav-wrap .card {
  height: 100%;
}

/* زر حذف طافٍ أنيق */
#favView .fav-remove {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(10, 163, 131, .25);
  background: rgba(10, 163, 131, .08);
  color: var(--brand);
  box-shadow: 0 6px 18px rgba(10, 163, 131, .15);
  cursor: pointer;
  z-index: 3;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

#favView .fav-remove:hover {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(10, 163, 131, .3);
}

#favView .fav-remove:active {
  transform: translateY(0) scale(.98);
}

#favView .fav-remove svg {
  width: 20px;
  height: 20px;
}

/* لو الزر فيه نص لأي سبب أخفه ونبقي الأيقونة فقط */
#favView .fav-remove span {
  display: none;
}

/* اجعل قلب زر التفضيل في صفحة التفاصيل أخضر عند التفعيل */
#detailView .fav-btn.active {
  color: var(--brand) !important;
  background: rgba(10, 163, 131, .12) !important;
  border-color: rgba(10, 163, 131, .45) !important;
}

#detailView .fav-btn.active .heart-fill {
  display: block;
}

#detailView .fav-btn.active .heart-stroke {
  display: none;
}

#detailView .fav-btn .heart-fill {
  display: none
}

#detailView .fav-btn.active .heart-stroke {
  display: none
}

#detailView .fav-btn.active .heart-fill {
  display: block
}




/* ——— Favorites: نفس مقاسات الرئيسية + تحسين المظهر ——— */
#favView {
  /* نفس قيم #homeView */
  --card-basis-desktop: 220px;
  --card-minh-desktop: 120px;
  --card-basis-mobile: 180px;
  --card-minh-mobile: 110px;
}

#favView .grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-desktop), 1fr));
}

@media (max-width:640px) {
  #favView .section {
    margin-inline: 0;
  }

  #favView .grid {
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-basis-mobile), 1fr));
    padding-inline: 4px !important;
    margin-inline: calc(var(--edge-mobile, 12px) * -1 + 4px);
  }
}

/* رأس وقائمة صفحة المفضلة */
#favView .crumb {
  color: #64748b;
}

#favView .cat-head {
  margin: 6px 0 10px;
  gap: 6px;
}

#favView .cat-head h2 {
  margin: 0;
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#favView .fav-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#favView #favClearBtn {
  font-weight: 900;
  border: 1px solid rgba(10, 163, 131, .25);
  color: var(--brand);
  background: linear-gradient(135deg, rgba(10, 163, 131, .08) 0%, rgba(15, 178, 139, .12) 100%);
  border-radius: 12px;
  transition: all .25s ease;
}

#favView #favClearBtn:hover {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 0 0 6px rgba(10, 163, 131, .18);
}

/* زر إزالة صغير ناعم فوق كل كارت */
#favView .fav-wrap {
  position: relative;
}

#favView .fav-remove {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(10, 163, 131, .25);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--brand);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(2, 6, 23, .12);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
}

#favView .fav-remove::before {
  content: "×";
  font-size: 16px;
  line-height: 1;
}

#favView .fav-remove:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(10, 163, 131, .5);
  color: #0b1220;
  box-shadow: 0 16px 36px rgba(2, 6, 23, .18);
}

/* تأثير هوفر للكروت */
#favView .card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 163, 131, .3);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .15);
}

#favView .card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(10, 163, 131, .02) 0%, rgba(15, 178, 139, .04) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

#favView .card:hover::before {
  opacity: 1;
}

/* حالة فارغة مرتبة */
#favView .empty {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  text-align: center;
}

#favView .empty h3 {
  margin: 0 0 8px;
  color: #0b1220;
}

#favView .empty p {
  margin: 0 0 14px;
  color: #64748b;
}

#favView .empty .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

#favView .empty a,
#favView .empty button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s ease;
}

#favView .empty a:hover,
#favView .empty button:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ——— عدّاد صغير أخضر على أيقونة المفضلة في الهيدر ——— */
#openFavBtn {
  position: relative;
}

#openFavBtn.has-favs::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 6px 12px rgba(10, 163, 131, .28);
}

/* ——— زر المفضلة في التفاصيل: أخضر عند التفعيل ——— */
#detailView .fav-btn.active {
  color: var(--brand) !important;
  border-color: rgba(10, 163, 131, .45) !important;
  box-shadow:
    0 14px 32px rgba(10, 163, 131, .18),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 0 0 1px rgba(0, 0, 0, .10);
}

/* (التبديل بين تعبئة/حدّ القلب موجود لديك بالأسفل – أبقيناه كما هو) */

/* ——— Confirm Modal (نافذة تأكيد) ——— */
#confirmModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

#confirmModal.show {
  display: block;
}

#confirmModal .confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#confirmModal .confirm-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(2, 6, 23, .06);
  box-shadow: 0 28px 72px rgba(2, 6, 23, .36);
  padding: 18px 18px 14px;
  text-align: center;
}

#confirmModal .confirm-icon {
  width: 58px;
  height: 58px;
  margin: 4px auto 10px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 10px 24px rgba(10, 163, 131, .28), inset 0 1px 0 rgba(255, 255, 255, .32);
  position: relative;
}

#confirmModal .confirm-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, var(--brand), var(--brand-2), var(--brand));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
}

#confirmModal .confirm-icon svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
  stroke-width: 2.1;
}

#confirmModal .confirm-title {
  margin: 6px 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  color: #0b1220;
}

#confirmModal .confirm-msg {
  margin: 0 0 12px;
  color: #475569;
  font-size: .95rem;
  line-height: 1.6;
}

#confirmModal .confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 6px;
}

#confirmModal .confirm-btn {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
  transition: all .2s ease;
  border: 1px solid var(--line);
  background: #fff;
  color: #0b1220;
}

#confirmModal .confirm-btn.ghost:hover {
  background: #f8fafc;
}

#confirmModal .confirm-btn.solid {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 10px 22px rgba(10, 163, 131, .20);
}

#confirmModal .confirm-btn.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(10, 163, 131, .28);
}

/* نغمة "خطر" للحذف (أحمر ناعم) */
:root {
  --danger: #ef4444;
  --danger-2: #dc2626;
}

#confirmModal .confirm-sheet[data-tone="danger"] .confirm-icon {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-2) 100%);
  box-shadow: 0 10px 24px rgba(239, 68, 68, .28), inset 0 1px 0 rgba(255, 255, 255, .32);
}

#confirmModal .confirm-sheet[data-tone="danger"] .confirm-icon::after {
  background: conic-gradient(from 0deg, var(--danger), var(--danger-2), var(--danger));
}

#confirmModal .confirm-sheet[data-tone="danger"] .confirm-btn.solid {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-2) 100%);
  border-color: var(--danger);
  box-shadow: 0 10px 22px rgba(239, 68, 68, .20);
}

#confirmModal .confirm-sheet[data-tone="danger"] .confirm-btn.solid:hover {
  box-shadow: 0 16px 36px rgba(239, 68, 68, .28);
}



/* المفضلة: اجعل زر الحذف أيقونة فقط */
#favView .fav-remove {
  font-size: 0 !important;
  gap: 0 !important;
}

/* عطّل الرمز × المُضاف من ::before إن وجد */
#favView .fav-remove::before {
  content: none !important;
}

/* تأكد أن الـSVG ظاهر بحجم مناسب */
#favView .fav-remove svg {
  width: 20px;
  height: 20px;
}

.fav-btn {
  background-color: transparent;
  border: 2px solid #0aa383;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-btn:hover {
  background-color: rgba(10, 163, 131, 0.1);
  transform: scale(1.05);
}

.fav-btn.active {
  background-color: #0aa383;
  color: white;
  border-color: #0fb28b;
}

.fav-btn .heart-stroke {
  display: block;
}

.fav-btn.active .heart-fill {
  display: block;
}

.fav-btn.active .heart-stroke {
  display: none;
}





/* === Fix: favorite heart fill shows green when active === */
#detailView .fav-btn .heart-fill {
  display: none !important;
}

/* hide by default */
#detailView .fav-btn.active .heart-fill {
  display: block !important;
}

/* show fill when active */
#detailView .fav-btn.active {
  color: var(--brand) !important;
}

/* heart uses currentColor => green */



/* === Polish: clearer, prettier favorite heart on product detail === */
#detailView .fav-btn {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#detailView .fav-btn svg {
  transition: transform .2s ease, filter .2s ease;
}

#detailView .fav-btn:hover svg {
  transform: scale(1.06);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .18));
}

#detailView .fav-btn .heart-fill {
  fill: currentColor !important;
}

#detailView .fav-btn .heart-stroke {
  stroke: currentColor !important;
}

#detailView .fav-btn.active {
  color: var(--brand) !important;
  background: color-mix(in srgb, var(--brand) 14%, transparent) !important;
  border-color: color-mix(in srgb, var(--brand) 45%, transparent) !important;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 12%, transparent);
  animation: fav-pop .28s ease;
}

@keyframes fav-pop {
  0% {
    transform: scale(.92);
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* Support aria-pressed state too */
#detailView .fav-btn[aria-pressed="true"] {
  color: var(--brand) !important;
}

/* Tiny "مفضل" badge to clarify state */
#detailView .fav-btn.active::after {
  content: 'مفضل';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}


/* زيادة المسافة بين الإعلانات وأول قسم */
#adsPeek {
  margin-bottom: 20px !important;
  /* غيّر الرقم كما تريد */
}


/* إخفاء قسم "الأكثر طلبًا" مؤقتًا بدون تعديل الجافاسكربت */
#homeView #rail-pop {
  display: none !important;
}




/* -- FINAL PATCH START -- */

/* === FINAL PATCH (as requested) ========================= */

/* 1) Remove dark overlay from promo cards */
.promo-card::before {
  background: none !important;
}

/* 2) CTA: glass look WITHOUT blur */
.promo-cta {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .12)) !important;
  border: 1px solid rgba(255, 255, 255, .65) !important;
  color: #0b1220 !important;
  font-weight: 900;
  font-size: .86rem;
  padding: 10px 14px;
  border-radius: 12px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55), 0 0 1px rgba(255, 255, 255, .35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .60),
    inset 0 -1px 0 rgba(2, 6, 23, .06);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.promo-cta:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .16)) !important;
  transform: translateY(-2px);
}

/* 3) Footer strip under CTA: remove blur, keep tiny readability gradient */
.promo-content {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 40%, rgba(2, 6, 23, .10) 100%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 4) Hover raise ONLY on the card itself (no global stacking changes) */
.promo-card:hover {
  position: relative;
  z-index: 9999 !important;
}

/* 5) Increase a bit of space above the promo section */
.promo-section {
  margin-top: 26px !important;
  padding-top: 6px !important;
}

@media (max-width:640px) {
  .promo-section {
    margin-top: 20px !important;
    padding-top: 4px !important;
  }
}

/* 6) Remove outer shadow from promo cards (normal & hover) */
.promo-card,
.promo-card:hover {
  box-shadow: none !important;
}

/* ======================================================== */

/* -- FINAL PATCH END -- */

/* -- PATCH V11 START -- */

/* === Patch v11: larger spacing above promo section === */
.promo-section {
  margin-top: 40px !important;
  /* increased */
  padding-top: 10px !important;
  /* increased */
}

@media (max-width:640px) {
  .promo-section {
    margin-top: 30px !important;
    padding-top: 8px !important;
  }
}

/* -- PATCH V11 END -- */

/* -- PATCH V12 START -- */

/* === Patch v12: shorter, balanced spacing above promo section === */
.promo-section {
  margin-top: 22px !important;
  /* balanced desktop spacing */
  padding-top: 6px !important;
}

@media (max-width:640px) {
  .promo-section {
    margin-top: 16px !important;
    /* balanced mobile spacing */
    padding-top: 4px !important;
  }
}

/* -- PATCH V12 END -- */

/* -- PATCH V13 START -- */

/* === Patch v13: prevent top clipping on hover bounce === */
/* Remove upward shift; keep a subtle scale only */
.promo-card:hover {
  transform: scale(1.01) !important;
  /* was translateY(-6px) scale(1.015) in base */
  transform-origin: center !important;
}

/* Allow any inner growth to show within the section itself */
.promo-section {
  overflow: visible !important;
}

/* -- PATCH V13 END -- */










/* ===== Rectangular Category Tiles — v11
   Mobile: ZERO side margins (edge-to-edge), ultra-small 50px, image bottom-right, caption below.
   Desktop: compact, full-bleed inside parent.
===== */

/* Desktop/tablet */
.canva-cats.container {
  padding-inline: 0;
  width: 100%;
  max-width: 100%;
}

.canva-cats {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 15px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

.rect-card {
  --tile: #f4f4f5;
  min-width: 170px;
  max-width: 186px;
  height: 56px;
  display: block;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .82rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.rect-img img {
  height: 66%;
  max-height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

@media (min-width: 1440px) {
  .rect-card {
    min-width: 162px;
    max-width: 176px;
    height: 54px;
  }

  .rect-img img {
    max-height: 42px;
  }
}

/* Mobile: EDGE TO EDGE (no side margins), tiny 50px, caption below, image at bottom-right */
@media (max-width: 640px) {

  /* force full-bleed overriding any parent paddings */
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 4px !important;
    /* very small inset like products (tune here) */
  }

  .canva-cats.container {
    padding-inline: 0 !important;
  }

  .canva-cats .cats-rail {
    gap: 4px !important;
    padding: 0 !important;
    scroll-padding-inline: 0 !important;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  .rect-card {
    min-width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    border-radius: 12px !important;
  }

  .rect-inner {
    padding: 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .rect-text {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: -16px;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  .rect-text b {
    font-size: .60rem;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  .rect-img {
    position: absolute !important;
    inset: 0;
  }

  .rect-img img {
    position: absolute !important;
    right: 3px;
    bottom: 3px;
    height: 22px;
    width: auto;
    object-fit: contain;
    transform: none;
  }
}

/* Desktop/tablet */
.canva-cats.container {
  padding-inline: 0;
  width: 100%;
  max-width: 100%;
}

.canva-cats {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 15px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

.rect-card {
  --tile: #f4f4f5;
  min-width: 170px;
  max-width: 186px;
  height: 56px;
  display: block;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .82rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.rect-img img {
  height: 66%;
  max-height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

@media (min-width: 1440px) {
  .rect-card {
    min-width: 162px;
    max-width: 176px;
    height: 54px;
  }

  .rect-img img {
    max-height: 42px;
  }
}

/* Mobile:
   - Full-bleed trick to bypass parent padding + same 8px side inset as products
   - Extra small squares (52px), caption below, image in bottom-right corner
*/
@media (max-width: 640px) {
  .canva-cats {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-inline: 8px;
  }

  .canva-cats.container {
    padding-inline: 0;
  }

  .canva-cats .cats-rail {
    gap: 4px;
    padding: 0;
  }

  .canva-cats .cats-nav {
    display: none;
  }

  .rect-card {
    min-width: 52px;
    max-width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .rect-inner {
    padding: 0;
    position: relative;
    overflow: hidden;
  }

  .rect-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  .rect-text b {
    font-size: .60rem;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  .rect-img {
    position: absolute;
    inset: 0;
  }

  .rect-img img {
    position: absolute;
    right: 3px;
    bottom: 3px;
    height: 22px;
    width: auto;
    object-fit: contain;
    transform: none;
  }
}

/* Desktop/tablet: full-bleed to edges */
.canva-cats.container {
  padding-inline: 0;
  width: 100%;
  max-width: 100%;
}

.canva-cats {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* arrows only on hover (desktop) */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 15px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* desktop card smaller */
.rect-card {
  --tile: #f4f4f5;
  min-width: 176px;
  max-width: 192px;
  height: 58px;
  display: block;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .84rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.rect-img img {
  height: 68%;
  max-height: 46px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

@media (min-width: 1440px) {
  .rect-card {
    min-width: 168px;
    max-width: 182px;
    height: 56px;
  }

  .rect-img img {
    max-height: 44px;
  }
}

/* Mobile: show >4 items — 56x56 squares, bottom-right image, caption below;
   side space matches products bar (assumed 12px) */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 12px;
  }

  /* نفس شريط المنتجات تقريبًا */
  .canva-cats .cats-rail {
    gap: 4px;
    padding: 0;
  }

  /* لا قص عند الأطراف */
  .canva-cats .cats-nav {
    display: none;
  }

  /* بدون أسهم */

  .rect-card {
    min-width: 56px;
    max-width: 58px;
    height: 56px;
    border-radius: 12px;
  }

  .rect-inner {
    padding: 0;
    position: relative;
    overflow: hidden;
  }

  /* caption below square */
  .rect-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -18px;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  .rect-text b {
    font-size: .62rem;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  /* image anchored to bottom-right corner (not top) */
  .rect-img {
    position: absolute;
    inset: 0;
  }

  .rect-img img {
    position: absolute;
    right: 3px;
    bottom: 3px;
    height: 24px;
    width: auto;
    object-fit: contain;
    transform: none;
  }
}

/* Desktop/tablet: full-bleed to screen edges (within parent), zero side padding */
.canva-cats.container {
  padding-inline: 0;
  width: 100%;
  max-width: 100%;
}

.canva-cats {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* arrows only on hover (desktop) */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 15px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* desktop card smaller */
.rect-card {
  --tile: #f4f4f5;
  min-width: 176px;
  max-width: 192px;
  height: 58px;
  display: block;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .84rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.rect-img img {
  height: 68%;
  max-height: 46px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

/* very large screens: even tighter */
@media (min-width: 1440px) {
  .rect-card {
    min-width: 168px;
    max-width: 182px;
    height: 56px;
  }

  .rect-img img {
    max-height: 44px;
  }
}

/* Mobile: no side margins, tiny squares (~64x64), image bottom-right, caption below, no cropping at end */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 0;
  }

  .canva-cats .cats-rail {
    gap: 6px;
    padding: 0;
  }

  .canva-cats .cats-nav {
    display: none;
  }

  .rect-card {
    min-width: 64px;
    max-width: 68px;
    height: 64px;
    border-radius: 12px;
  }

  .rect-inner {
    padding: 0;
    position: relative;
    overflow: hidden;
  }

  /* caption below the square */
  .rect-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  .rect-text b {
    font-size: .66rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  /* image anchored to bottom-right corner */
  .rect-img {
    position: absolute;
    inset: 0;
  }

  .rect-img img {
    position: absolute;
    right: 4px;
    bottom: 4px;
    height: 28px;
    width: auto;
    object-fit: contain;
    transform: none;
  }
}

/* Desktop/tablet: no side margins */
.canva-cats.container {
  padding-inline: 0;
}

.canva-cats {
  position: relative;
  max-width: 1220px;
  margin: 8px auto 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* arrows only on hover (desktop) */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 26px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 16px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* desktop card compact */
.rect-card {
  --tile: #f4f4f5;
  min-width: 196px;
  max-width: 220px;
  height: 64px;
  display: block;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .86rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.rect-img img {
  height: 70%;
  max-height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

/* very large screens */
@media (min-width: 1440px) {
  .rect-card {
    min-width: 188px;
    max-width: 210px;
    height: 60px;
  }

  .rect-img img {
    max-height: 46px;
  }
}

/* Mobile: smaller squares (~78x78), image sits in bottom-right corner, caption below */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 0;
  }

  .canva-cats .cats-rail {
    gap: 6px;
    padding: 0;
  }

  .canva-cats .cats-nav {
    display: none;
  }

  .rect-card {
    min-width: 78px;
    max-width: 82px;
    height: 78px;
    border-radius: 14px;
  }

  .rect-inner {
    padding: 0;
    position: relative;
    overflow: hidden;
  }

  /* caption below the card */
  .rect-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  .rect-text b {
    font-size: .70rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  /* image anchored to bottom-right corner */
  .rect-img {
    position: absolute;
    inset: 0;
  }

  .rect-img img {
    position: absolute;
    right: 6px;
    bottom: 6px;
    height: 34px;
    width: auto;
    object-fit: contain;
    transform: none;
  }
}

/* Desktop/tablet: remove side margins entirely */
.canva-cats.container {
  padding-inline: 0;
}

.canva-cats {
  position: relative;
  max-width: 1220px;
  margin: 8px auto 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  /* no inner padding on desktop */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* arrows only on hover (desktop) */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 26px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 16px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* desktop card a bit smaller */
.rect-card {
  --tile: #f4f4f5;
  min-width: 200px;
  max-width: 228px;
  height: 68px;
  display: block;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .88rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.rect-img img {
  height: 72%;
  max-height: 54px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

/* very large screens */
@media (min-width: 1440px) {
  .rect-card {
    min-width: 192px;
    max-width: 220px;
    height: 64px;
  }

  .rect-img img {
    max-height: 50px;
  }
}

/* Mobile:  like Canva — ZERO side margins, tiny squares (~86x86), image cropped in top-right corner inside, caption below */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 0;
  }

  /* no side margins */
  .canva-cats .cats-rail {
    gap: 6px;
    padding: 0;
  }

  /* zero inner margins */
  .canva-cats .cats-nav {
    display: none;
  }

  /* hide arrows */

  .rect-card {
    min-width: 86px;
    max-width: 90px;
    height: 86px;
    border-radius: 14px;
  }

  .rect-inner {
    padding: 0;
    position: relative;
    overflow: hidden;
    /* make inner act as pure image container */
  }

  /* put caption below the card */
  .rect-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -26px;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  .rect-text b {
    font-size: .78rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  /* image fills and crops to top-right corner */
  .rect-img {
    position: absolute;
    inset: 0;
  }

  .rect-img img {
    position: absolute;
    right: -6px;
    top: -6px;
    width: 130%;
    height: 130%;
    object-fit: cover;
    max-height: none;
    transform: none;
  }
}

/* Desktop/tablet: edges almost zero */
.canva-cats.container {
  padding-inline: 2px;
}

.canva-cats {
  position: relative;
  max-width: 1220px;
  margin: 8px auto 10px;
}

.canva-cats .cats-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px;
  /* very small inner padding desktop */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* arrows only on hover (desktop) */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 26px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 16px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* desktop card a bit smaller */
.rect-card {
  --tile: #f4f4f5;
  min-width: 210px;
  max-width: 235px;
  height: 70px;
  display: block;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
  position: relative;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .9rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.rect-img img {
  height: 72%;
  max-height: 54px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

/* very large screens */
@media (min-width: 1440px) {
  .canva-cats.container {
    padding-inline: 2px;
  }

  .canva-cats .cats-rail {
    padding: 2px 2px;
  }

  .rect-card {
    min-width: 200px;
    max-width: 228px;
    height: 68px;
  }

  .rect-img img {
    max-height: 50px;
  }
}

/* Mobile: ZERO side margins, tiny squares, image sits in bottom-left corner */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 0;
  }

  /* no side margins at all */
  .canva-cats .cats-rail {
    gap: 6px;
    padding: 0;
  }

  /* zero inner left/right */
  .canva-cats .cats-nav {
    display: none;
  }

  /* hide arrows */

  .rect-card {
    min-width: 96px;
    max-width: 104px;
    height: 96px;
    border-radius: 16px;
  }

  .rect-inner {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px;
    position: relative;
  }

  .rect-text {
    order: 1;
    width: 100%;
    text-align: center;
  }

  .rect-text b {
    font-size: .72rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  .rect-img {
    order: 2;
    width: 100%;
    height: auto;
    display: block;
  }

  .rect-img img {
    position: absolute;
    left: 8px;
    bottom: 8px;
    height: 40px;
    max-height: 40px;
    width: auto;
    transform: none;
  }
}

/* حافة جانبية شبه معدومة على الديسكتوب، ومعدومة تمامًا على الهاتف */
.canva-cats.container {
  padding-inline: 2px;
}

/* ديسكتوب: قريبة جدًا من حافة الحاوية */
.canva-cats {
  position: relative;
  max-width: 1220px;
  margin: 8px auto 12px;
}

/* الشريط: بدون شريط تمرير ظاهر */
.canva-cats .cats-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px;
  /* ديسكتوب: حواف داخلية ضئيلة جدًا */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* الأسهم: لا تظهر إلا عند الهوفر على الديسكتوب */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  line-height: 28px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 17px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* ديسكتوب/تابلت: أصغر قليلاً */
.rect-card {
  --tile: #f4f4f5;
  min-width: 220px;
  max-width: 250px;
  height: 72px;
  display: block;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  direction: rtl;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .9rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.rect-img img {
  height: 74%;
  max-height: 56px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

/* شاشات كبيرة جدًا: هوامش دقيقة وحجم أضيق */
@media (min-width: 1440px) {
  .canva-cats.container {
    padding-inline: 2px;
  }

  .canva-cats .cats-rail {
    padding: 4px 4px;
  }

  .rect-card {
    min-width: 210px;
    max-width: 236px;
    height: 70px;
  }

  .rect-img img {
    max-height: 52px;
  }
}

/* هاتف: أصغر بكثييير، بدون أسهم، وبدون أي هامش جانبي */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 0;
  }

  /* لا هوامش جانبية */
  .canva-cats .cats-rail {
    gap: 6px;
    padding: 4px 0;
  }

  /* صفر من الجوانب */
  .canva-cats .cats-nav {
    display: none;
  }

  /* إخفاء الأسهم تمامًا */

  .rect-card {
    min-width: 100px;
    max-width: 110px;
    height: 100px;
    border-radius: 14px;
  }

  .rect-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
  }

  .rect-img {
    flex: 0 0 auto;
    height: auto;
    display: grid;
    place-items: center;
  }

  .rect-img img {
    height: 42px;
    max-height: 42px;
    transform: none;
  }

  .rect-text {
    flex: 0 0 auto;
    text-align: center;
    width: 100%;
  }

  .rect-text b {
    font-size: .75rem;
    line-height: 1.2;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* هوامش جانبية شبه معدومة على الديسكتوب، ولا شيء على الهاتف */
.canva-cats.container {
  padding-inline: 4px;
}

.canva-cats {
  position: relative;
  max-width: 1220px;
  margin: 8px auto 14px;
}

/* الشريط: بدون شريط تمرير ظاهر، حواف داخلية قليلة */
.canva-cats .cats-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 8px;
  /* تقليل الحواف داخل الشريط (ديسكتوب) */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.canva-cats .cats-rail::-webkit-scrollbar {
  display: none;
}

/* الأسهم: مخفية افتراضيًا وتظهر فقط عند الهوفر */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  line-height: 30px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0b1220;
  font-size: 18px;
  border: 1px solid #e5e7eb;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.canva-cats:hover .cats-nav {
  opacity: 1;
  pointer-events: auto;
}

.canva-cats .cats-prev {
  left: 6px;
}

.canva-cats .cats-next {
  right: 6px;
}

/* حجم البطاقة الافتراضي (تابلت/ديسكتوب متوسط) */
.rect-card {
  --tile: #f4f4f5;
  min-width: 240px;
  max-width: 280px;
  height: 76px;
  display: block;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  direction: rtl;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.rect-text b {
  font-weight: 800;
  font-size: .92rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.rect-img img {
  height: 76%;
  max-height: 62px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg);
}

/* تأثير على الصورة فقط */

/* ديسكتوب كبير جدًا: أصغر قليلًا أيضًا */
@media (min-width: 1280px) {
  .canva-cats.container {
    padding-inline: 4px;
  }

  /* قريب من الخط الأحمر */
  .canva-cats .cats-rail {
    padding: 6px 8px;
  }

  .rect-card {
    min-width: 230px;
    max-width: 260px;
    height: 74px;
  }

  .rect-img img {
    max-height: 58px;
  }
}

/* هاتف: مربّعات صغيرة جدًا، بدون أسهم ولا هوامش جانبية */
@media (max-width: 640px) {
  .canva-cats.container {
    padding-inline: 0;
  }

  /* لا يوجد هامش جانبي */
  .canva-cats .cats-rail {
    gap: 8px;
    padding: 6px 0;
  }

  .canva-cats .cats-nav {
    display: none;
  }

  /* إخفاء الأسهم كليًا */

  .rect-card {
    min-width: 120px;
    max-width: 132px;
    height: 120px;
    border-radius: 16px;
  }

  .rect-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }

  .rect-img {
    flex: 0 0 auto;
    height: auto;
    display: grid;
    place-items: center;
  }

  .rect-img img {
    height: 54px;
    max-height: 54px;
    transform: none;
  }

  .rect-text {
    flex: 0 0 auto;
    text-align: center;
    width: 100%;
  }

  .rect-text b {
    font-size: .80rem;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* nav */
.canva-cats .cats-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: #fff;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
  color: #0b1220;
  border: 1px solid #e5e7eb;
}

.canva-cats .cats-prev {
  left: 6px
}

.canva-cats .cats-next {
  right: 6px
}

/* desktop rectangle */
.rect-card {
  --tile: #f4f4f5;
  min-width: 280px;
  max-width: 320px;
  height: 84px;
  display: block;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--tile);
  scroll-snap-align: start;
  text-decoration: none;
}

.rect-inner {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  direction: rtl;
}

.rect-text {
  flex: 1 1 50%;
  min-width: 0;
  text-align: right
}

.rect-text b {
  font-weight: 800;
  font-size: .95rem;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.rect-img {
  flex: 1 1 50%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center
}

.rect-img img {
  height: 78%;
  max-height: 68px;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease
}

.rect-card:hover .rect-img img {
  transform: translateY(-2px) rotate(-2deg)
}

/* mobile style — مربعات مثل الصورة */
@media (max-width:640px) {
  .canva-cats .cats-rail {
    gap: 8px;
    padding: 6px 8px
  }

  /* حواف جانبية أقل في الجوال */
  .rect-card {
    min-width: 140px;
    max-width: 160px;
    height: 140px;
    border-radius: 18px
  }

  .rect-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px
  }

  .rect-img {
    flex: 0 0 auto;
    height: auto;
    display: grid;
    place-items: center
  }

  .rect-img img {
    height: 66px;
    max-height: 66px;
    transform: none
  }

  .rect-card:hover .rect-img img {
    transform: translateY(-1px)
  }

  .rect-text {
    flex: 0 0 auto;
    text-align: center;
    width: 100%
  }

  .rect-text b {
    font-size: .85rem;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
  }

  .canva-cats .cats-nav {
    width: 28px;
    height: 28px;
    line-height: 28px
  }
}

/* === v13 mobile refined (110px tiles, 2 rows, bottom-right image, edge-to-edge) === */
@media (max-width: 640px) {
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 6px !important;
  }

  .canva-cats.container {
    padding-inline: 0 !important;
  }

  .canva-cats .cats-rail {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: max-content !important;
    grid-template-rows: repeat(2, auto) !important;
    gap: 10px 10px !important;
    padding: 0 !important;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  .rect-card {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 140px !important;
    /* 110 square + ~30 label */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
  }

  .rect-inner {
    width: 110px !important;
    height: 110px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: var(--tile) !important;
    margin: 0 auto 6px !important;
    padding: 0 !important;
    position: relative !important;
  }

  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .82rem !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  .rect-img {
    position: absolute !important;
    right: 6px !important;
    bottom: 6px !important;
    width: auto !important;
    height: auto !important;
  }

  .rect-img img {
    height: 42px !important;
    width: auto !important;
    object-fit: contain !important;
  }
}


/* v15 mobile refinement: smaller squares (104px), symmetric side insets, snap alignment */
@media (max-width:640px) {
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 8px !important;
  }

  .canva-cats .cats-rail {
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 8px !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 8px;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  .rect-card {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 132px !important;
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    scroll-snap-align: start !important;
  }

  .rect-inner {
    width: 104px !important;
    height: 104px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 6px !important;
    padding: 0 !important;
  }

  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .82rem !important;
    line-height: 1.22 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  .rect-img {
    position: absolute !important;
    right: 6px !important;
    bottom: 6px !important;
  }

  .rect-img img {
    height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-6deg) !important;
  }
}


@media (max-width:640px) {
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 6px !important;
    /* نفس المنتجات تقريبًا، ويمكن ضبطها */
  }

  .canva-cats .cats-rail {
    display: flex !important;
    gap: 4px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 6px !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 6px;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  .rect-card {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 72px !important;
    /* 48 مربع + ~24 اسم تحت */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    scroll-snap-align: start !important;
  }

  .rect-inner {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 4px !important;
    padding: 0 !important;
  }

  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .58rem !important;
    line-height: 1.1 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  .rect-img {
    position: absolute !important;
    right: 3px !important;
    bottom: 3px !important;
  }

  .rect-img img {
    height: 20px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-6deg) !important;
  }
}


@media (max-width:640px) {

  /* edge-to-edge with equal side padding (match products bar) */
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 8px !important;
  }

  .canva-cats .cats-rail {
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 8px !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 8px;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  /* strip-like rectangle (like desktop), but compact */
  .rect-card {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 86px !important;
    /* 56 strip + ~26 label + margins */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    scroll-snap-align: start !important;
  }

  .rect-inner {
    width: 104px !important;
    height: 56px !important;
    /* rectangle, not square */
    border-radius: 14px !important;
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 4px !important;
    padding: 0 6px !important;
    /* a bit of inner pad */
    display: block !important;
  }

  /* put title below the strip */
  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .76rem !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* bigger, clearer image inside strip, anchored bottom-right */
  .rect-img {
    position: absolute !important;
    right: 6px !important;
    bottom: 4px !important;
    height: auto !important;
    width: auto !important;
  }

  .rect-img img {
    height: 44px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-6deg) !important;
    image-rendering: auto !important;
  }
}


/* ===== Rectangles v18 — mobile polish: crisper radius, clearer image, title below ===== */
@media (max-width:640px) {

  /* keep edge-to-edge with equal padding */
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 8px !important;
  }

  .canva-cats .cats-rail {
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 8px !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 8px;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  /* strip card — same size, improved corners */
  .rect-card {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 90px !important;
    /* 58 strip + ~28 title + spacing */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    scroll-snap-align: start !important;
  }

  .rect-inner {
    width: 104px !important;
    height: 58px !important;
    /* slightly taller strip */
    border-radius: 10px !important;
    /* crisper radius */
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 6px !important;
    padding: 0 6px !important;
  }

  /* title outside under the strip */
  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .78rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* clearer, larger image; softer tilt */
  .rect-img {
    position: absolute !important;
    right: 6px !important;
    bottom: 4px !important;
  }

  .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
    image-rendering: auto !important;
  }
}


/* ===== Rectangles v19 — mobile shape matches desktop, title outside ===== */
@media (max-width:640px) {
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 8px !important;
  }

  .canva-cats .cats-rail {
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 8px !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 8px;
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  /* card container: allow title below */
  .rect-card {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 90px !important;
    /* 56 strip + spacing + ~28 label */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    /* لا يقص العنوان */
    scroll-snap-align: start !important;
  }

  /* strip: SAME as desktop look */
  .rect-inner {
    width: 104px !important;
    height: 56px !important;
    /* مطابق للديسكتوب */
    border-radius: 14px !important;
    /* نفس الحواف في الديسكتوب */
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 6px !important;
    padding: 0 6px !important;
  }

  /* title outside under the strip */
  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .78rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* image bottom-right, a bit clearer */
  .rect-img {
    position: absolute !important;
    right: 6px !important;
    bottom: 4px !important;
  }

  .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v20 — mobile EXACT desktop shape + perfect symmetric edges ===== */
@media (max-width:640px) {

  /* Full-bleed with perfectly equal side padding on BOTH sides */
  .canva-cats {
    --mob-pad: 8px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
  }

  /* Make scrolling symmetric regardless of RTL by forcing rail LTR,
     but keep inner content RTL so النص يبقى يمين */
  .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  /* Symmetric spacers equal to side padding */
  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  /* CARD container: same look as desktop (strip), title OUTSIDE below */
  .rect-card {
    direction: rtl !important;
    /* محتوى البطاقة نفسه RTL */
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 94px !important;
    /* 56 strip + ~30 label + space */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  /* STRIP: EXACT desktop shape: 56px height + 14px radius */
  .rect-inner {
    width: 112px !important;
    height: 56px !important;
    border-radius: 14px !important;
    /* مطابق للديسكتوب */
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 8px !important;
    padding: 0 8px !important;
    display: block !important;
  }

  /* Title OUTSIDE below the strip */
  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* Image: clearer & bottom-right */
  .rect-img {
    position: absolute !important;
    right: 8px !important;
    bottom: 6px !important;
    height: auto !important;
    width: auto !important;
  }

  .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v21 — scalloped (wavy) sides like desktop Canva, title outside on mobile ===== */

/* Base scallop for all sizes (uses site background var(--bg) to "cut" circles) */
.rect-inner {
  position: relative;
}

.rect-inner::before,
.rect-inner::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  /* leave space for rounded corners */
  width: 12px;
  /* scallop depth */
  pointer-events: none;
  background-color: var(--bg);
  /* fills the cut area */
  background-repeat: repeat-y;
  background-size: 12px 12px;
  /* scallop size */
  z-index: 1;
}

/* left scallops */
.rect-inner::before {
  left: -1px;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  background-image:
    radial-gradient(6px at right 6px top 6px, var(--bg) 99%, transparent 100%);
}

/* right scallops */
.rect-inner::after {
  right: -1px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  background-image:
    radial-gradient(6px at left 6px top 6px, var(--bg) 99%, transparent 100%);
}

/* Desktop: keep strip look and scallops */
@media (min-width:641px) {
  .rect-inner {
    border-radius: 14px;
    overflow: hidden;
  }
}

/* Mobile: exact desktop strip shape + title outside + clearer image */
@media (max-width:640px) {
  .canva-cats {
    --mob-pad: 8px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
  }

  .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  .rect-card {
    direction: rtl !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 96px !important;
    border: none !important;
    background: none !important;
    text-align: center !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  .rect-inner {
    width: 112px !important;
    height: 56px !important;
    border-radius: 14px !important;
    margin: 0 auto 8px !important;
    padding: 0 8px !important;
    overflow: visible !important;
  }

  /* ensure scallop pseudo elements sit above tile color */
  .rect-inner::before,
  .rect-inner::after {
    top: 6px;
    bottom: 6px;
  }

  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  .rect-img {
    position: absolute !important;
    right: 10px !important;
    bottom: 6px !important;
    z-index: 2;
  }

  .rect-img img {
    height: 52px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v22 — SHARP edges (exact desktop shape), no scallops, title outside ===== */

/* Remove scalloped sides everywhere */
.rect-inner::before,
.rect-inner::after {
  content: none !important;
  display: none !important;
}

/* Keep desktop strip as-is (14px radius handled in existing CSS) */

/* Mobile: exact desktop strip with sharp corners, symmetric edges */
@media (max-width:640px) {
  .canva-cats {
    --mob-pad: 8px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
  }

  .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  .canva-cats .cats-rail::before,
  .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  .canva-cats .cats-nav {
    display: none !important;
  }

  /* Container with outside title */
  .rect-card {
    direction: rtl !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 96px !important;
    /* 56 strip + ~30 label + gap */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  /* SHARP desktop-like strip */
  .rect-inner {
    width: 112px !important;
    height: 56px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 8px !important;
    padding: 0 8px !important;
  }

  /* Title outside under */
  .rect-text {
    position: static !important;
    width: 100% !important;
  }

  .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* Image bottom-right, clear */
  .rect-img {
    position: absolute !important;
    right: 8px !important;
    bottom: 6px !important;
  }

  .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* === FORCE OVERRIDE — v23: Mobile desktop-like strip, sharp 14px radius, title under, equal edges === */
@media (max-width:640px) {
  :root .canva-cats {
    --mob-pad: 8px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
    overflow: visible !important;
  }

  :root .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  :root .canva-cats .rect-card {
    direction: rtl !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 96px !important;
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  :root .canva-cats .rect-card .rect-inner {
    width: 112px !important;
    height: 56px !important;
    border-radius: 14px !important;
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 8px !important;
    padding: 0 8px !important;
    overflow: hidden !important;
  }

  :root .canva-cats .rect-card .rect-inner::before,
  :root .canva-cats .rect-card .rect-inner::after {
    content: none !important;
    display: none !important;
  }

  :root .canva-cats .rect-card .rect-text {
    position: static !important;
    width: 100% !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  :root .canva-cats .rect-card .rect-img {
    position: absolute !important;
    right: 8px !important;
    bottom: 6px !important;
  }

  :root .canva-cats .rect-card .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v24 — "Sticky Ribbon": sharp corners + scalloped side edges, title below ===== */

/* Base: prepare inner for scallops (all sizes) */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  overflow: visible !important;
  /* حتى تظهر الحواف المتعرجة */
  border-radius: 0 !important;
  /* زوايا حادّة مثل شريط لاصق */
}

/* عمل تعريجات جانبية بواسطة طبقات تغطي الحواف بلون الخلفية */
.canva-cats .rect-card .rect-inner::before,
.canva-cats .rect-card .rect-inner::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 12px !important;
  /* عمق التعريجة */
  pointer-events: none !important;
  z-index: 2 !important;
  /* نكرر دوائر بلون خلفية الموقع لعمل "عضّات" بالشريط */
  background-size: 12px 12px !important;
  /* المسافة بين التعريجات */
  background-repeat: repeat-y !important;
}

/* يسار: تعريجات تأكل من اليسار */
.canva-cats .rect-card .rect-inner::before {
  left: -1px !important;
  background-image: radial-gradient(circle at right center, var(--bg) 6px, transparent 6px) !important;
}

/* يمين: تعريجات تأكل من اليمين */
.canva-cats .rect-card .rect-inner::after {
  right: -1px !important;
  background-image: radial-gradient(circle at left center, var(--bg) 6px, transparent 6px) !important;
}

/* Desktop strip size stays as your theme defines it;
   we only ensure sharp ribbon look + scallops. */

/* Mobile: equal side edges + desktop-like strip height with title outside */
@media (max-width:640px) {
  :root .canva-cats {
    --mob-pad: 8px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  /* بطاقة الهاتف: المستطيل مثل الديسكتوب (ارتفاع ~56px) والعنوان خارجه */
  :root .canva-cats .rect-card {
    direction: rtl !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 96px !important;
    /* 56 شريط + ~30 عنوان + فراغ */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  :root .canva-cats .rect-card .rect-inner {
    width: 112px !important;
    height: 56px !important;
    margin: 0 auto 8px !important;
    padding: 0 8px !important;
    background: var(--tile) !important;
  }

  :root .canva-cats .rect-card .rect-text {
    position: static !important;
    width: 100% !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  :root .canva-cats .rect-card .rect-img {
    position: absolute !important;
    right: 8px !important;
    bottom: 6px !important;
    z-index: 1 !important;
  }

  :root .canva-cats .rect-card .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v25 — FORCE mobile sticky ribbon (sharp + scalloped), title below, equal edges ===== */
@media (max-width:640px) {
  :root .canva-cats {
    --mob-pad: 8px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  /* container with outside title */
  :root .canva-cats .rect-card {
    direction: rtl !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 96px !important;
    /* 56 ribbon + ~30 label + spacing */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  /* sticky ribbon: SHARP + SCALLOPED sides */
  :root .canva-cats .rect-card .rect-inner {
    width: 112px !important;
    height: 56px !important;
    border-radius: 0 !important;
    /* زوايا حادّة */
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 8px !important;
    padding: 0 8px !important;
    overflow: visible !important;
    /* نحتاجه لإظهار التعريجات */
  }

  /* remove any previous scallop removers */
  :root .canva-cats .rect-card .rect-inner::before,
  :root .canva-cats .rect-card .rect-inner::after {
    display: block !important;
    content: "" !important;
  }

  /* scalloped side cuts using site background */
  :root .canva-cats .rect-card .rect-inner::before,
  :root .canva-cats .rect-card .rect-inner::after {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 12px !important;
    /* عمق التعريجة */
    pointer-events: none !important;
    z-index: 2 !important;
    background-size: 12px 12px !important;
    /* حجم التموج */
    background-repeat: repeat-y !important;
    background-color: transparent !important;
  }

  :root .canva-cats .rect-card .rect-inner::before {
    left: -1px !important;
    background-image: radial-gradient(circle at right center, var(--bg) 6px, transparent 6px) !important;
  }

  :root .canva-cats .rect-card .rect-inner::after {
    right: -1px !important;
    background-image: radial-gradient(circle at left center, var(--bg) 6px, transparent 6px) !important;
  }

  /* title outside below */
  :root .canva-cats .rect-card .rect-text {
    position: static !important;
    width: 100% !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* clearer image bottom-right */
  :root .canva-cats .rect-card .rect-img {
    position: absolute !important;
    right: 8px !important;
    bottom: 6px !important;
    z-index: 1 !important;
  }

  :root .canva-cats .rect-card .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v26 — RTL Arabic, title below, ultra-small equal phone edges ===== */
@media (max-width:640px) {

  /* Arabic site: keep overall RTL, but make rail LTR for symmetric scroll edges */
  :root .canva-cats {
    --mob-pad: 4px;
    /* حافة جانبية صغيرة جدًا ومتساوية (يمكن جعلها 2px لو أردت) */
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
    direction: rtl !important;
    /* المحتوى عربي */
  }

  :root .canva-cats .cats-rail {
    direction: ltr !important;
    /* لضمان تماثل البداية/النهاية في التمرير */
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  /* بطاقة الهاتف: عنوان خارج الشريط وتحته دائمًا */
  :root .canva-cats .rect-card {
    direction: rtl !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 96px !important;
    /* 56 شريط + ~30 عنوان + فراغ */
    border: none !important;
    background: none !important;
    text-align: center !important;
    position: relative !important;
    overflow: visible !important;
    scroll-snap-align: start !important;
  }

  :root .canva-cats .rect-card .rect-inner {
    width: 112px !important;
    height: 56px !important;
    border-radius: 0 !important;
    /* شريط لاصق بحواف حادة */
    background: var(--tile) !important;
    position: relative !important;
    margin: 0 auto 6px !important;
    padding: 0 8px !important;
    overflow: visible !important;
  }

  /* إبقاء الحواف المتعرجة (sticky ribbon) من v25 */
  :root .canva-cats .rect-card .rect-inner::before,
  :root .canva-cats .rect-card .rect-inner::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 12px !important;
    background-size: 12px 12px !important;
    background-repeat: repeat-y !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }

  :root .canva-cats .rect-card .rect-inner::before {
    left: -1px !important;
    background-image: radial-gradient(circle at right center, var(--bg) 6px, transparent 6px) !important;
  }

  :root .canva-cats .rect-card .rect-inner::after {
    right: -1px !important;
    background-image: radial-gradient(circle at left center, var(--bg) 6px, transparent 6px) !important;
  }

  /* العنوان خارج المربع وتحته */
  :root .canva-cats .rect-card .rect-text {
    position: static !important;
    width: 100% !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* الصورة أوضح في أسفل يمين الشريط */
  :root .canva-cats .rect-card .rect-img {
    position: absolute !important;
    right: 8px !important;
    bottom: 6px !important;
    z-index: 1 !important;
  }

  :root .canva-cats .rect-card .rect-img img {
    height: 50px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: rotate(-4deg) !important;
  }
}


/* ===== Rectangles v27 — mobile: title closer under strip + remove left gap (pad=0) ===== */
@media (max-width:640px) {

  /* حواف الهاتف = صفر (لإزالة المسافة التي دائرة عليها) */
  :root .canva-cats {
    --mob-pad: 0px;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail {
    direction: ltr !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: var(--mob-pad) !important;
    scroll-padding-right: var(--mob-pad) !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  /* العنوان أسفل الشريط مباشرة */
  :root .canva-cats .rect-card {
    height: 90px !important;
    /* نخفض الارتفاع العام */
  }

  :root .canva-cats .rect-card .rect-inner {
    margin: 0 auto 2px !important;
    /* تقليل المسافة بين الشريط والعنوان */
    padding: 0 8px !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.15 !important;
  }
}


/* ===== Rectangles v28 — Mobile: RTL drag from right, no trailing gap at end ===== */
@media (max-width:640px) {
  :root .canva-cats {
    --mob-pad: 0px;
    /* لا هامش جانبي */
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: var(--mob-pad) !important;
    padding-right: var(--mob-pad) !important;
    direction: rtl !important;
    /* عربي */
  }

  /* السحب يبدأ من اليمين لليسار، ومحاذاة أول عنصر مع حافة اليمين */
  :root .canva-cats .cats-rail {
    direction: rtl !important;
    /* اسحب من الجهة الأخرى (اليمين) */
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-right: var(--mob-pad) !important;
    /* بداية السحب عند اليمين */
    scroll-padding-left: 0 !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  /* نحافظ فقط على مسافة في بداية السكة (يمين)، ولا نضيف أي مسافة في النهاية */
  :root .canva-cats .cats-rail::before {
    content: "";
    flex: 0 0 var(--mob-pad);
  }

  :root .canva-cats .cats-rail::after {
    content: none !important;
    display: none !important;
  }

  /* العنوان تحت الشريط مباشرة كما في v27 */
  :root .canva-cats .rect-card {
    height: 90px !important;
  }

  :root .canva-cats .rect-card .rect-inner {
    margin: 0 auto 2px !important;
    padding: 0 8px !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.15 !important;
  }
}


/* ===== Rectangles v29 — remove trailing end gap + tighten spacing under bar ===== */
@media (max-width:640px) {
  :root .canva-cats {
    --mob-pad: 0px;
    /* لا هامش جانبي */
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 8px !important;
    /* تقليل المسافة تحت الشريط */
  }

  /* قلل المسافة بين الشريط والعنصر الذي بعده مهما كان */
  :root .canva-cats+* {
    margin-top: 8px !important;
  }

  /* السحب يبدأ من اليمين، ولا padding داخلي ولا فواصل وهمية في النهاية */
  :root .canva-cats .cats-rail {
    direction: rtl !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-left: 0 !important;
    scroll-padding-right: 0 !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  :root .canva-cats .cats-rail::before {
    content: none !important;
  }

  :root .canva-cats .cats-rail::after {
    content: none !important;
  }

  /* تأكد أن آخر عنصر يلتصق بالحافة: ألغِ أي هامش يسار محتمل */
  :root .canva-cats .cats-rail>*:last-child {
    margin-left: 0 !important;
  }

  /* العنوان تحت الشريط مباشرة كما طلبت سابقًا */
  :root .canva-cats .rect-card {
    height: 90px !important;
  }

  :root .canva-cats .rect-card .rect-inner {
    margin: 0 auto 2px !important;
    padding: 0 8px !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    font-size: .80rem !important;
    line-height: 1.15 !important;
  }
}


/* ===== Rectangles v30 — ZERO phone side margins/padding, flush edges ===== */
@media (max-width:640px) {

  /* اجعل الشريط يملأ عرض الشاشة تمامًا ويكسر أي padding/‏margin للأباء */
  :root .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
  }

  /* أزل أي padding/hgap عند السكة نفسها */
  :root .canva-cats .cats-rail {
    direction: rtl !important;
    display: flex !important;
    gap: 6px !important;
    /* مسافة بين العناصر فقط */
    padding: 0 !important;
    scroll-padding-left: 0 !important;
    scroll-padding-right: 0 !important;
  }

  /* لا مسافات في بداية/نهاية السكة */
  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: none !important;
    display: none !important;
  }

  /* لا هوامش إضافية على العناصر */
  :root .canva-cats .cats-rail>* {
    margin: 0 !important;
  }

  :root .canva-cats .cats-rail>*:first-child {
    margin-right: 0 !important;
  }

  :root .canva-cats .cats-rail>*:last-child {
    margin-left: 0 !important;
  }
}


/* ===== Rectangles v31 — PHONE: absolute full‑bleed (no side white space), RTL drag from right, no end gap ===== */
@media (max-width:640px) {

  /* اكسر أي حشو/هوامش من الحاويات العليا، واجعل العنصر يمتد من الحافة للحافة فعليًا */
  :root .post-body .canva-cats,
  :root .blog-posts .canva-cats,
  :root .Blog .canva-cats,
  :root .main .canva-cats,
  :root .container .canva-cats,
  :root .content .canva-cats,
  :root .section .canva-cats,
  :root .widget .canva-cats,
  :root .canva-cats {
    box-sizing: border-box !important;
    max-width: none !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    /* طريقة full-bleed البديلة */
    margin-right: -50vw !important;
    padding: 0 !important;
  }

  /* السكة: من اليمين لليسار، بدون أي padding أو فواصل بداية/نهاية */
  :root .canva-cats .cats-rail {
    direction: rtl !important;
    display: flex !important;
    gap: 6px !important;
    /* مسافة بين العناصر فقط */
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding: 0 !important;
    margin: 0 !important;
  }

  :root .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: none !important;
    display: none !important;
  }

  :root .canva-cats .cats-rail>* {
    margin: 0 !important;
  }

  /* تأكد أن آخر عنصر يصل لحافة الشاشة تمامًا */
  :root .canva-cats .cats-rail>*:last-child {
    margin-left: 0 !important;
  }

  :root .canva-cats .cats-rail>*:first-child {
    margin-right: 0 !important;
  }

  /* قرب العنوان من الشريط */
  :root .canva-cats {
    margin-bottom: 6px !important;
  }

  :root .canva-cats+* {
    margin-top: 6px !important;
  }
}


/* ===== Rectangles v32 — Mobile: move inner text to OUTSIDE under the strip (desktop unchanged) ===== */
@media (max-width:640px) {

  /* اجعل بطاقة الهاتف تسمح بعرض العنوان أسفل المستطيل */
  :root .canva-cats .rect-card {
    height: auto !important;
    /* ليتمد حسب المحتوى */
    padding-bottom: 4px !important;
  }

  /* المستطيل نفسه كما هو (شريط لاصق) */
  :root .canva-cats .rect-card .rect-inner {
    margin: 0 auto 4px !important;
    /* مسافة صغيرة تحت الشريط للعنوان */
  }

  /* حَوّل نص الداخل إلى نص خارجي تحت الشريط */
  :root .canva-cats .rect-card .rect-text {
    position: static !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  :root .canva-cats .rect-card .rect-text b {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    font-weight: 800 !important;
    font-size: .82rem !important;
    line-height: 1.22 !important;
    color: var(--ink) !important;
  }
}


/* v33 block removed in v34: replaced with safer JS-driven caption */

/* ===== Rectangles v34 — Mobile: clone caption below, hide inner text only after cloning ===== */
@media (max-width:640px) {

  /* phone full-bleed, zero side gaps */
  :root .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
    direction: rtl !important;
  }

  :root .canva-cats .cats-rail {
    direction: rtl !important;
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    scroll-padding: 0 !important;
  }

  :root .canva-cats .cats-rail::before,
  :root .canva-cats .cats-rail::after {
    content: none !important;
    display: none !important;
  }

  /* title under the strip */
  :root .canva-cats .rect-card {
    height: auto !important;
    text-align: center !important;
  }

  :root .canva-cats .rect-card .rect-inner {
    margin: 0 auto 4px !important;
  }

  :root .canva-cats .rect-card>.rect-text b {
    font-size: .84rem !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  /* hide inside text ONLY when we have created an outer caption */
  :root .canva-cats .rect-card.has-caption .rect-inner .rect-text,
  :root .canva-cats .rect-card.has-caption .rect-inner .rect-text * {
    display: none !important;
  }
}


/* ===== Rectangles v37 — Desktop: image clearer & slightly larger ONLY (no layout/shape changes) ===== */
@media (min-width:641px) {

  /* لا تغيّر المستطيل إطلاقًا */
  .canva-cats .rect-card .rect-inner {
    box-shadow: none !important;
    /* يضمن عدم وجود ظل أضفناه سابقًا */
  }

  /* حسّن الصورة داخل المستطيل فقط */
  .canva-cats .rect-card .rect-img img {
    max-height: 64px !important;
    /* أكبر قليلًا لوضوح أفضل */
    width: auto !important;
    object-fit: contain !important;
    /* لا نلمس transform حتى تبقى الحركة كما هي */
    filter:
      drop-shadow(0 8px 16px rgba(2, 6, 23, 0.20)) saturate(1.05) contrast(1.04) !important;
    /* وضوح وأناقة خفيفة */
    image-rendering: auto !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
  }
}


@media (min-width:641px) {

  /* تكبير الصورة وجعل الحركة أوضح على الديسكتوب فقط */
  .canva-cats .rect-card .rect-img img {
    max-height: 72px !important;
    /* أكبر لظهور أوضح */
    width: auto !important;
    object-fit: contain !important;
    will-change: transform, filter !important;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), filter .35s ease !important;
    filter: drop-shadow(0 10px 18px rgba(2, 6, 23, .22)) saturate(1.06) contrast(1.05) !important;
  }

  .canva-cats .rect-card:hover .rect-img img {
    transform: translateY(-6px) rotate(-8deg) scale(1.08) !important;
    /* حركة أوضح */
    filter: drop-shadow(0 14px 26px rgba(2, 6, 23, .28)) saturate(1.08) contrast(1.07) !important;
  }

  .canva-cats .rect-card:active .rect-img img {
    transform: translateY(-3px) rotate(-6deg) scale(1.05) !important;
    /* إحساس ضغط */
  }
}


/* ===== Rectangles v39 — Desktop: anti‑crop hover (no clipping) + cleaner motion ===== */
@media (min-width:641px) {

  /* اسمح للصورة أن تتجاوز حدود الشريط عند الحركة */
  .canva-cats .rect-card .rect-inner {
    overflow: visible !important;
    /* يمنع القص */
    padding-right: 10px !important;
    /* مساحة أمان يمين */
    padding-bottom: 10px !important;
    /* مساحة أمان أسفل */
  }

  .canva-cats .rect-card .rect-img {
    right: 10px !important;
    bottom: 8px !important;
  }

  .canva-cats .rect-card .rect-img img {
    max-height: 72px !important;
    /* حجم واضح */
    width: auto !important;
    object-fit: contain !important;
    transform-origin: 100% 100% !important;
    /* محور الحركة أسفل يمين */
    will-change: transform, filter !important;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), filter .35s ease !important;
    filter: drop-shadow(0 10px 18px rgba(2, 6, 23, .22)) saturate(1.06) contrast(1.05) !important;
  }

  /* حركة محسوبة لتبقى داخل الإطار بصريًا بدون قص */
  .canva-cats .rect-card:hover .rect-img img {
    transform: translate(-4px, -6px) rotate(-6deg) scale(1.07) !important;
    filter: drop-shadow(0 16px 28px rgba(2, 6, 23, .30)) saturate(1.08) contrast(1.07) !important;
  }

  .canva-cats .rect-card:active .rect-img img {
    transform: translate(-2px, -3px) rotate(-5deg) scale(1.04) !important;
  }
}


/* ===== Rectangles v40 — glassy arrows + slightly smaller tiles (shape unchanged) ===== */

/* Base arrows: glassmorphism and non-intrusive */
.canva-cats .cats-nav {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  background: rgba(255, 255, 255, .28) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .18) !important;
  color: #0b1220 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 3 !important;
  opacity: .0 !important;
  transition: opacity .2s ease, transform .2s ease !important;
}

/* In dark mode */
.dark .canva-cats .cats-nav {
  border-color: rgba(255, 255, 255, .18) !important;
  background: rgba(15, 23, 42, .35) !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35) !important;
}

/* Place them just a bit outside so they don't cover slides */
.canva-cats .cats-prev {
  left: -10px !important;
  transform: translateY(-50%) !important;
}

.canva-cats .cats-next {
  right: -10px !important;
  transform: translateY(-50%) !important;
}

.canva-cats:hover .cats-nav {
  opacity: 1 !important;
}

/* Hide arrows on phones; show on larger screens only */
@media (max-width:640px) {
  .canva-cats .cats-nav {
    display: none !important;
  }
}

@media (min-width:641px) {
  .canva-cats .cats-nav {
    display: flex !important;
  }
}

/* === Slightly smaller tiles on phone ONLY (shape preserved) === */
@media (max-width:640px) {
  :root .canva-cats .rect-card {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 92px !important;
    /* 56 شريط + ~30 عنوان + فجوة خفيفة */
  }

  :root .canva-cats .rect-card .rect-inner {
    width: 104px !important;
    height: 56px !important;
    /* نفس شكل الشريط */
  }

  :root .canva-cats .cats-rail {
    gap: 5px !important;
  }

  /* مسافة أصغر قليلاً بين الشرائح */
}


/* ===== Rectangles v41 — Desktop: harmonized, consistent image shadow (no layout changes) ===== */
@media (min-width:641px) {

  /* ظل أساسي ناعم ومتناسق مع الإضاءة (فاتح/داكن) */
  .canva-cats .rect-card .rect-img img {
    /* ظل مائل خفيف أسفل يمين + توهج خافت حول الصورة لدمجها مع الخلفية */
    filter:
      drop-shadow(0 8px 14px rgba(15, 23, 42, 0.18)) drop-shadow(2px 4px 0 rgba(15, 23, 42, 0.02)) saturate(1.04) contrast(1.03) !important;
    transition: transform .32s cubic-bezier(.22, .61, .36, 1),
      filter .32s ease !important;
    transform-origin: 100% 100% !important;
  }

  /* تمايز أفضل في الوضع الداكن */
  .dark .canva-cats .rect-card .rect-img img {
    filter:
      drop-shadow(0 10px 18px rgba(2, 6, 23, 0.34)) drop-shadow(2px 3px 0 rgba(2, 6, 23, 0.06)) saturate(1.03) contrast(1.02) !important;
  }

  /* ظل متدرّج عند الهوفر بدون قصّ: أوضح لكن غير مبالغ */
  .canva-cats .rect-card:hover .rect-img img {
    filter:
      drop-shadow(0 14px 26px rgba(15, 23, 42, 0.26)) drop-shadow(2px 4px 0 rgba(15, 23, 42, 0.03)) saturate(1.06) contrast(1.05) !important;
  }

  .dark .canva-cats .rect-card:hover .rect-img img {
    filter:
      drop-shadow(0 16px 30px rgba(2, 6, 23, 0.46)) drop-shadow(2px 4px 0 rgba(2, 6, 23, 0.08)) saturate(1.05) contrast(1.04) !important;
  }

  /* عند الضغط: ظل أقصر وأكثر تركيزًا */
  .canva-cats .rect-card:active .rect-img img {
    filter:
      drop-shadow(0 8px 16px rgba(15, 23, 42, 0.22)) drop-shadow(1px 2px 0 rgba(15, 23, 42, 0.03)) saturate(1.04) contrast(1.04) !important;
  }

  .dark .canva-cats .rect-card:active .rect-img img {
    filter:
      drop-shadow(0 10px 20px rgba(2, 6, 23, 0.42)) drop-shadow(1px 2px 0 rgba(2, 6, 23, 0.06)) saturate(1.04) contrast(1.04) !important;
  }
}

/* ===== Unified card size for ALL pages ===== */
:root {
  --card-basis-desktop: 220px;
  --card-minh-desktop: 120px;

  --card-basis-mobile: 180px;
  --card-minh-mobile: 110px;
}

/*1111111111111111111111111111 (اختياري) ثبّت أقل ارتفاع للكارد نفسه بكل الصفحات */
.card {
  min-height: var(--card-minh-desktop);
}

@media (max-width:640px) {
  .card {
    min-height: var(--card-minh-mobile);
  }
}




/* === الأقسام: خلّ الصورة تملأ المربع بالكامل === */
.canva-cats .rect-card .rect-inner {
  overflow: hidden !important;
  position: relative !important;
}

.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  /* يمسك كل مساحة المربع */
  width: 100% !important;
  height: 100% !important;
}

.canva-cats .rect-card .rect-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  /* هذا اللي يخليها ممتلئة */
  max-height: none !important;
  /* يلغي قيود max-height السابقة */
  transform: none !important;
  /* يلغي الميلان/الدوران إن كان موجود */
}

/* لو عندك نص داخل المربع وتبيه يطلع فوق الصورة */
.canva-cats .rect-card .rect-text {
  position: relative !important;
  z-index: 2 !important;
}

/* === نقل النص تحت صورة القسم === */

.canva-cats .rect-card {
  display: flex !important;
  flex-direction: column !important;
}

.canva-cats .rect-card .rect-inner {
  position: relative !important;
  height: 220px;
  /* ارتفاع المربع (عدل الرقم إذا تحب) */
}

.canva-cats .rect-card .rect-text {
  position: static !important;
  /* إلغاء التمركز فوق الصورة */
  margin-top: 12px !important;
  text-align: center !important;
  background: none !important;
  padding: 0 !important;
  z-index: auto !important;
}

/* === خلي المربع = rect-inner فقط، والنص خارج المربع === */

/* الحاوية */
.canva-cats .rect-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}

/* هذا هو "المربع" اللي عليه الشكل (ظل/حدود/زوايا) */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  /* عدّلها حسب شكل مربعاتك */
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12) !important;
  /* عدّل/احذف لو ما تبي ظل */
  background: #fff !important;
  /* لو تحتاج خلفية للمربع */
  height: 220px;
  /* عدّل ارتفاع المربع */
}

/* النص يصير كـ "كابشن" خارج المربع */
.canva-cats .rect-card .rect-text {
  position: static !important;
  margin-top: 12px !important;
  padding: 0 !important;
  background: none !important;
  text-align: center !important;
}


/* ================================================
   تعديلات التجاوب — v-mobile-2col-global
   عمودان ثابتان في كل الشبكات على الهاتف
   ================================================ */

/* ===== عمودان على كل شبكات الكاردات في جميع الصفحات ===== */
@media (max-width: 640px) {

  /* --- الرئيسية: شبكة الأقسام --- */
  #homeView .section .grid,
  /* --- صفحة القسم --- */
  #categoryView .grid,
  /* --- المفضلة --- */
  #favView .grid,
  /* --- صفحة التفاصيل: المنتجات ذات الصلة --- */
  #detailView #related {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* تعطيل الـ flex/scroll على أي rail داخل الـ grid (نريد grid فقط) */
  #homeView .section .grid .card,
  #categoryView .grid .card,
  #favView .grid .card,
  #detailView #related .card {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    /* إلغاء أي flex قد يكون موروثاً */
  }

  /* نسبة الصورة مربعة لتظهر الكاردات بشكل متناسق */
  #homeView .section .grid .frame,
  #categoryView .grid .frame,
  #favView .grid .frame,
  #detailView #related .frame {
    aspect-ratio: 1 / 1;
  }

  /* إخفاء المقتطف لتوفير مساحة في العمودين */
  #homeView .section .grid .excerpt,
  #categoryView .grid .excerpt,
  #favView .grid .excerpt,
  #detailView #related .excerpt {
    display: none !important;
  }

  /* ضبط حجم الخط للعنوان */
  #homeView .section .grid .title,
  #categoryView .grid .title,
  #favView .grid .title,
  #detailView #related .title {
    font-size: .82rem;
    -webkit-line-clamp: 2;
  }

  /* إبقاء الـ rail (شريط أفقي) كما هو بدون تغيير */
  #homeView .section .rail-wrap .rail>.card {
    flex: 0 0 clamp(146px, 44vw, var(--card-basis-mobile)) !important;
  }
}

/* ===== شاشات صغيرة جداً (≤ 360px) ===== */
@media (max-width: 360px) {
  .container {
    padding-inline: 8px !important;
  }

  .cat-head h2 {
    font-size: 1rem;
  }

  .btn-cta {
    font-size: .68rem;
    padding: 5px 6px;
  }

  #homeView .section .grid,
  #categoryView .grid,
  #favView .grid,
  #detailView #related {
    gap: 6px !important;
  }
}

/* ===== صفحة التفاصيل: ضبط صورة المنتج الرئيسية على الهاتف ===== */
@media (max-width: 640px) {
  .main-frame {
    max-height: 320px !important;
    min-height: 220px;
  }

  .strip {
    gap: 6px;
  }

  .th {
    flex: 0 0 52px;
    height: 52px;
  }
}

/* ===== تابلت: 3 أعمدة في كل الشبكات ===== */
@media (min-width: 641px) and (max-width: 900px) {

  #homeView .section .grid,
  #categoryView .grid,
  #favView .grid,
  #detailView #related {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
}

/* ===== PATCH V45: Flat organic category cards (from user image) ===== */
.canva-cats .rect-card .rect-inner {
  background: #f5f6f8 !important;
  box-shadow: none !important;
  border: 1px solid #eef0f2 !important;
  border-radius: 24px 34px 24px 30px / 30px 24px 34px 24px !important;
  height: 130px !important;
  width: 130px !important;
  margin: 0 auto !important;
  transition: transform 0.3s ease, background 0.3s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    height: 90px !important;
    width: 90px !important;
    border-radius: 18px 26px 18px 22px / 22px 18px 26px 18px !important;
  }
}

.canva-cats .rect-card:hover .rect-inner {
  transform: translateY(-4px) !important;
  background: #edf0f3 !important;
}

.canva-cats .rect-card .rect-img {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
}

.canva-cats .rect-card .rect-img img {
  position: static !important;
  width: 70% !important;
  height: 70% !important;
  max-height: 70% !important;
  object-fit: contain !important;
  transform: none !important;
  filter: none !important;
  margin: auto !important;
}

.canva-cats .rect-card:hover .rect-img img {
  transform: scale(1.05) !important;
  filter: none !important;
}

.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
  transform: none !important;
}

.canva-cats .rect-card {
  min-width: 150px !important;
  max-width: 150px !important;
  height: auto !important;
  padding-bottom: 12px !important;
  align-items: center !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 100px !important;
    max-width: 100px !important;
  }
}

.canva-cats .rect-card .rect-text {
  margin-top: 14px !important;
  text-align: center !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: .95rem !important;
  color: #0b1220 !important;
  display: block;
  white-space: normal !important;
  font-weight: 800 !important;
}

.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f1f5f9 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text b {
    font-size: .8rem !important;
  }
}

/* ===== PATCH V46: Tilted Stacked Category Cards (like the new reference image) ===== */
.canva-cats .rect-card {
  position: relative !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: auto !important;
  padding-bottom: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 10px !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 110px !important;
    max-width: 110px !important;
  }
}

/* Base Wrapper for the image / cards */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 120px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  margin: 0 auto !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 90px !important;
    height: 85px !important;
  }
}

/* Background Card (The tilted one behind) */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #f1f3f5 !important;
  border: 1px solid #e9ecef !important;
  border-radius: 16px !important;
  transform: rotate(-6deg) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease !important;
  z-index: 1 !important;
}

.dark .canva-cats .rect-card .rect-inner::before {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Foreground Card (The one containing the image) */
.canva-cats .rect-card .rect-inner::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #ffffff !important;
  border: 1px solid #f1f3f5 !important;
  border-radius: 16px !important;
  transform: rotate(3deg) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  z-index: 2 !important;
}

.dark .canva-cats .rect-card .rect-inner::after {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

/* Hover effect: Cards straighten out */
.canva-cats .rect-card:hover .rect-inner {
  transform: translateY(-6px) !important;
}

.canva-cats .rect-card:hover .rect-inner::before {
  transform: rotate(-2deg) translate(-2px, 2px) !important;
  background: #e9ecef !important;
}

.dark .canva-cats .rect-card:hover .rect-inner::before {
  background: #334155 !important;
}

.canva-cats .rect-card:hover .rect-inner::after {
  transform: rotate(0deg) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06) !important;
}

.dark .canva-cats .rect-card:hover .rect-inner::after {
  box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
}

/* The Image Container */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important; /* Above both cards */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
}

.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transform: rotate(3deg) !important; /* Match foreground card rotation */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  filter: none !important;
}

/* Straighten image on hover too */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(0deg) scale(1.05) !important;
  filter: none !important;
}

/* Disable generic filters from other rules */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
}

/* Category Text (outside, below) */
.canva-cats .rect-card .rect-text {
  position: static !important;
  margin-top: 16px !important;
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: 1rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text {
    margin-top: 12px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V47: Revert to exact Flat Organic Stacked Category Cards ===== */
.canva-cats .rect-card {
  position: relative !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: auto !important;
  padding-bottom: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 10px !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 110px !important;
    max-width: 110px !important;
  }
}

.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 120px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  margin: 0 auto !important;
  transition: transform 0.3s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 90px !important;
    height: 85px !important;
  }
}

/* Background Card (The tilted organic one behind) */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #f1f3f5 !important;
  border: 1px solid #e9ecef !important;
  border-radius: 24px 34px 24px 30px / 30px 24px 34px 24px !important;
  transform: rotate(-4deg) translate(-4px, 4px) !important;
  transition: transform 0.3s ease, background 0.3s ease !important;
  z-index: 1 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 18px 26px 18px 22px / 22px 18px 26px 18px !important;
  }
}

.dark .canva-cats .rect-card .rect-inner::before {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Foreground Card (The one containing the image) */
.canva-cats .rect-card .rect-inner::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #f8f9fa !important; /* Slightly lighter */
  border: 1px solid #f1f3f5 !important;
  border-radius: 30px 24px 34px 24px / 24px 30px 24px 34px !important;
  transform: rotate(2deg) !important;
  transition: transform 0.3s ease !important;
  z-index: 2 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::after {
    border-radius: 22px 18px 26px 18px / 18px 22px 18px 26px !important;
  }
}

.dark .canva-cats .rect-card .rect-inner::after {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

/* Hover effect: Raise both */
.canva-cats .rect-card:hover .rect-inner {
  transform: translateY(-6px) !important;
}

.canva-cats .rect-card:hover .rect-inner::before {
  background: #e9ecef !important;
}

.dark .canva-cats .rect-card:hover .rect-inner::before {
  background: #334155 !important;
}

/* The Image Container */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important; /* Above both cards */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
}

.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transform: rotate(2deg) !important; /* Match foreground card rotation */
  transition: transform 0.3s ease !important;
  filter: none !important;
}

/* Straighten and scale image on hover */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(0deg) scale(1.05) !important;
  filter: none !important;
}

/* Disable generic filters from other rules */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
}

/* Category Text (outside, below) */
.canva-cats .rect-card .rect-text {
  position: static !important;
  margin-top: 16px !important;
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: .95rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text {
    margin-top: 12px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V48: REVERT to V45 (Flat Square Without Shadows) + Tilted Overlay Logic ===== */

/* 1. Base wrapper: Flat square, slightly tilted */
.canva-cats .rect-card .rect-inner {
  background: #f5f6f8 !important;
  box-shadow: none !important;
  border: 1px solid #eef0f2 !important;
  border-radius: 20px !important; /* Normal rounded corners */
  height: 120px !important;
  width: 120px !important;
  margin: 0 auto !important;
  transform: rotate(-3deg) !important; /* Tilted initially */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease !important;
  position: relative !important;
  overflow: visible !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    height: 90px !important;
    width: 90px !important;
    border-radius: 16px !important;
  }
}

/* 2. Before pseudo-element: The "Second Card" behind it */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e9ecef !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 20px !important;
  transform: rotate(6deg) translate(0, 0) !important; /* Second card rotated the other way */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  z-index: -1 !important; /* Behind the main inner rect */
  opacity: 0 !important; /* Hidden normally */
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 16px !important;
  }
}

/* 3. Hover state: Straighten main card, reveal second card */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(0deg) translateY(-4px) !important; /* Straighten and lift */
  background: #ffffff !important;
  border-color: #f1f3f5 !important;
}

.canva-cats .rect-card:hover .rect-inner::before {
  opacity: 1 !important; /* Show the second card */
  transform: rotate(4deg) translate(4px, 4px) !important; /* Offset it to look stacked */
}

/* 4. Image inside: Full fill, clear */
.canva-cats .rect-card .rect-img {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  padding: 10px !important; /* Padding so it doesn't touch edges */
}

.canva-cats .rect-card .rect-img img {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important; /* Best fit */
  transform: rotate(3deg) !important; /* Counteract parent rotation so image looks straight initially */
  filter: none !important;
  margin: auto !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(0deg) scale(1.05) !important; /* Straighten and zoom slightly */
  filter: none !important;
}

/* Dark mode resets */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
}

.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dark .canva-cats .rect-card .rect-inner::before {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

/* 5. Container & Text positioning */
.canva-cats .rect-card {
  min-width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  padding-bottom: 24px !important; /* Room for text */
  align-items: center !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  margin-top: 10px !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 100px !important;
    max-width: 100px !important;
  }
}

.canva-cats .rect-card .rect-text {
  margin-top: 14px !important;
  text-align: center !important;
  width: 100% !important;
  position: static !important; /* Ensure it's in flow below the box */
}

.canva-cats .rect-card .rect-text b {
  font-size: .95rem !important;
  color: #0b1220 !important;
  display: block;
  white-space: normal !important;
  font-weight: 800 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f1f5f9 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text b {
    font-size: .8rem !important;
  }
}

/* ===== PATCH V49: Exact Design Implementation from latest description ===== */
.canva-cats .rect-card {
  position: relative !important;
  min-width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  padding-bottom: 24px !important; /* text outside */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 15px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 105px !important;
    max-width: 105px !important;
  }
}

/* Base Wrapper for the image / cards - This is the FRONT card */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 125px !important;
  background: #f1f3f6 !important; /* Light gray from design */
  border: none !important; /* NO BORDER */
  box-shadow: none !important; /* NO SHADOW */
  border-radius: 22px !important;
  overflow: visible !important;
  margin: 0 auto !important;
  transform: rotate(3deg) !important; /* Tilted statically */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), background 0.3s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 95px !important;
    height: 90px !important;
    border-radius: 18px !important;
  }
}

/* Background Card (Hidden statically, appears on hover) */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e5e8ec !important; /* Slightly darker gray for depth */
  border-radius: 22px !important;
  transform: rotate(0deg) !important; /* Hidden exactly behind */
  opacity: 0 !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.3s ease !important;
  z-index: -1 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 18px !important;
  }
}

/* Hover effect: The front card straightens, the back card rotates out */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(0deg) translateY(-4px) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
}

.canva-cats .rect-card:hover .rect-inner::before {
  opacity: 1 !important;
  transform: rotate(-6deg) translate(-2px, 4px) !important; /* Rotates out to form two cards */
}

/* The Image Container */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 85% !important;
  height: 85% !important;
  max-height: 85% !important;
  object-fit: contain !important;
  transform: rotate(-3deg) !important; /* Counter rotate so image is straight when card is tilted 3deg */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2) !important;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0)) !important; /* No shadow */
  margin: auto !important;
}

/* On hover, the front card rotates to 0deg, so image also rotates to 0deg */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(0deg) scale(1.08) !important;
}

/* Disable generic filters from other rules */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
}

/* Dark mode colors */
.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
}
.dark .canva-cats .rect-card .rect-inner::before {
  background: #0f172a !important;
}
.dark .canva-cats .rect-card:hover .rect-inner {
  background: #334155 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}

/* Category Text (outside, below) */
.canva-cats .rect-card .rect-text {
  position: static !important;
  margin-top: 15px !important;
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: 1.05rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text {
    margin-top: 12px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V50: EXACT Flat, Tilted-to-Straight Stacked Cards ===== */

/* Base container for the whole category item */
.canva-cats .rect-card {
  position: relative !important;
  min-width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  padding-bottom: 30px !important; /* Space for text below */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 15px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 105px !important;
    max-width: 105px !important;
  }
}

/* The Box containing the image (Front Card) */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 125px !important;
  background: #f1f3f6 !important; /* Light flat gray */
  border: 1px solid #e5e8ec !important; /* Extremely subtle flat border, NO SHADOW */
  box-shadow: none !important;
  border-radius: 20px !important;
  overflow: visible !important;
  margin: 0 auto !important;
  /* Start tilted */
  transform: rotate(4deg) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), background 0.3s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 95px !important;
    height: 90px !important;
    border-radius: 16px !important;
  }
}

/* The "Back Card" (Hidden by default, shows on hover to create stack) */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e2e6ea !important; /* Slightly darker flat gray */
  border: 1px solid #d5dadd !important;
  border-radius: 20px !important;
  transform: rotate(0deg) !important; /* Hidden exactly behind */
  opacity: 0 !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.3s ease !important;
  z-index: -1 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 16px !important;
  }
}

/* HOVER ANIMATION: Front card straightens to flat, back card tilts out */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(0deg) translateY(-4px) !important; /* Straightens to 0deg */
  background: #ffffff !important; /* Brightens */
  box-shadow: none !important; /* STILL NO SHADOW, completely flat */
}

.canva-cats .rect-card:hover .rect-inner::before {
  opacity: 1 !important; /* Reveal back card */
  /* Back card tilts the opposite way to create the "two stacked cards" effect */
  transform: rotate(-5deg) translate(-3px, 5px) !important; 
}

/* Image Wrapper */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* The Image itself */
.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 85% !important; /* Fills nicely */
  height: 85% !important;
  max-height: 85% !important;
  object-fit: contain !important;
  /* Counter-rotate so the image is STRAIGHT even while the box is tilted */
  transform: rotate(-4deg) !important; 
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2) !important;
  filter: none !important; /* NO SHADOW */
  margin: auto !important;
}

/* On hover, since the box goes to 0deg, the image must also go to 0deg */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(0deg) scale(1.05) !important; /* Straightens to 0deg */
  filter: none !important; /* NO SHADOW */
}

/* Force override any inherited filters (dark mode, normal states) */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
  box-shadow: none !important;
}

/* Dark Mode Boxes */
.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dark .canva-cats .rect-card .rect-inner::before {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
.dark .canva-cats .rect-card:hover .rect-inner {
  background: #334155 !important;
  box-shadow: none !important;
}

/* Category Text (Fixed OUTSIDE and BELOW the box) */
.canva-cats .rect-card .rect-text {
  position: absolute !important;
  bottom: 0 !important; /* Anchored to bottom of the entire card container */
  left: 0 !important;
  right: 0 !important;
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: 1.05rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.2 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    padding-bottom: 26px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V51: Static Flat Stacked Cards - NO WOBBLE ANIMATION / TEXT OUTSIDE ===== */

.canva-cats .rect-card {
  position: relative !important;
  min-width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  /* Extra bottom padding so text stays fully outside and below */
  padding-bottom: 35px !important; 
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 15px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 105px !important;
    max-width: 105px !important;
    padding-bottom: 28px !important;
  }
}

/* Base Wrapper (Front Card) */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 125px !important;
  background: #f1f3f6 !important; /* Flat gray */
  border: 1px solid #e5e8ec !important; /* No shadow, just flat border */
  box-shadow: none !important;
  border-radius: 20px !important; /* Normal rounded corners */
  overflow: visible !important;
  margin: 0 auto !important;
  /* STATIC TILT - DOES NOT CHANGE ON HOVER */
  transform: rotate(4deg) !important;
  transition: background 0.2s ease, transform 0.2s ease !important; /* Only smooth color/scale change */
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 95px !important;
    height: 90px !important;
    border-radius: 16px !important;
  }
}

/* Background Card (Always visible, creating static stacked effect) */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e2e6ea !important; /* Darker flat background card */
  border: 1px solid #d5dadd !important;
  border-radius: 20px !important;
  /* STATIC TILT OUTWARD - DOES NOT CHANGE ON HOVER */
  transform: rotate(-8deg) translate(-4px, 2px) !important; 
  opacity: 1 !important; /* ALWAYS VISIBLE NOW */
  z-index: -1 !important;
  transition: background 0.2s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 16px !important;
  }
}

/* HOVER: No wobble/rotation. Just a slight lift and color brighten */
.canva-cats .rect-card:hover .rect-inner {
  /* Keep the EXACT SAME ROTATION, only move up slightly */
  transform: rotate(4deg) translateY(-4px) !important; 
  background: #ffffff !important; 
  box-shadow: none !important; /* STILL FLAT */
}

.canva-cats .rect-card:hover .rect-inner::before {
  /* Keep the EXACT SAME ROTATION, just change color slightly */
  background: #e9ecef !important;
}

/* Image Wrapper */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* The Image itself */
.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 85% !important; 
  height: 85% !important;
  max-height: 85% !important;
  object-fit: contain !important;
  /* STATIC COUNTER TILT - So image looks straight inside the 4deg tilted box */
  transform: rotate(-4deg) !important; 
  transition: transform 0.2s ease !important; /* Only for scale on hover */
  filter: none !important; /* NO SHADOW */
  margin: auto !important;
}

/* Hover on image: Just scale up slightly, NO ROTATION CHANGES */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(-4deg) scale(1.05) !important; /* Keep same rotation, just scale */
  filter: none !important; /* NO SHADOW */
}

/* Force override any inherited filters (dark mode, normal states) */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
  box-shadow: none !important;
}

/* Dark Mode Boxes */
.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dark .canva-cats .rect-card .rect-inner::before {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
.dark .canva-cats .rect-card:hover .rect-inner {
  background: #2dd4bf !important; /* Brand color hint on hover */
  border-color: #2dd4bf !important;
}

/* Category Text (Fixed OUTSIDE and BELOW the box entirely) */
.canva-cats .rect-card .rect-text {
  position: absolute !important;
  bottom: 0 !important; /* Anchored to the very bottom of the card block */
  left: 0 !important;
  right: 0 !important;
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: 1.05rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.2 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V52: Text Formally Outside & Image Fills Box ===== */

/* Base container for the whole category item */
.canva-cats .rect-card {
  position: relative !important;
  min-width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  padding-bottom: 0 !important; /* Remove fixed bottom padding */
  display: flex !important;
  flex-direction: column !important; /* Forces stacking: Box then Text */
  align-items: center !important;
  justify-content: flex-start !important;
  margin-top: 15px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 105px !important;
    max-width: 105px !important;
    padding-bottom: 0 !important;
  }
}

/* Base Wrapper for the image (Front Card) */
/* This is a fixed size block, and text will flow naturally below it */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 125px !important;
  background: #f1f3f6 !important;
  border: 1px solid #e5e8ec !important; /* Flat */
  box-shadow: none !important;
  border-radius: 20px !important;
  overflow: visible !important;
  margin: 0 auto !important;
  flex-shrink: 0 !important; /* Prevents squishing */
  /* Static tilt */
  transform: rotate(4deg) !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 95px !important;
    height: 90px !important;
    border-radius: 16px !important;
  }
}

/* Background Card */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e2e6ea !important;
  border: 1px solid #d5dadd !important;
  border-radius: 20px !important;
  /* Static outward tilt */
  transform: rotate(-8deg) translate(-4px, 2px) !important; 
  opacity: 1 !important;
  z-index: -1 !important;
  transition: background 0.2s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 16px !important;
  }
}

/* Hover slightly lifts and brightens */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(4deg) translateY(-4px) !important; 
  background: #ffffff !important; 
}
.canva-cats .rect-card:hover .rect-inner::before {
  background: #e9ecef !important;
}

/* Image Container */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important; /* Reduced padding to allow image to be bigger */
}

/* The Image itself (LARGER to fill the box) */
.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 95% !important; /* Increased to 95% to fill */
  height: 95% !important;
  max-height: 95% !important;
  object-fit: contain !important;
  /* Counter tilt so image is straight */
  transform: rotate(-4deg) !important; 
  transition: transform 0.2s ease !important;
  filter: none !important; /* NO SHADOW */
  margin: auto !important;
}

/* Small scale on hover */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(-4deg) scale(1.05) !important; 
}

/* Category Text (Now flows natively BELOW .rect-inner) */
.canva-cats .rect-card .rect-text {
  /* Remove absolute positioning! Let it flow natively via flex-direction: column */
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 18px !important; /* Space between box and text */
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: 1.05rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text {
    margin-top: 14px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V53: FINAL Static Off-Set Squares + Title ===== */

/* Section Title Styling */
.canva-cats-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 16px;
}

.canva-cats-header h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #0b1220;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.canva-cats-header p {
  font-size: .95rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.dark .canva-cats-header h2 {
  color: #f8fafc;
}
.dark .canva-cats-header p {
  color: #94a3b8;
}

@media (max-width: 640px) {
  .canva-cats-header {
    margin-bottom: 16px;
  }
  .canva-cats-header h2 {
    font-size: 1.3rem;
  }
  .canva-cats-header p {
    font-size: .85rem;
  }
}

/* Category Cards Static Layout */
.canva-cats .rect-card {
  position: relative !important;
  min-width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  padding-bottom: 0 !important; /* Text is natively below */
  display: flex !important;
  flex-direction: column !important; /* Stack vertically: ImageBox -> Text */
  align-items: center !important;
  justify-content: flex-start !important;
  margin-top: 10px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 105px !important;
    max-width: 105px !important;
  }
}

/* Base Wrapper (Front Card) */
.canva-cats .rect-card .rect-inner {
  position: relative !important;
  width: 130px !important;
  height: 125px !important;
  background: #f1f3f6 !important; /* Flat card color */
  border: 1px solid #e5e8ec !important; /* Flat border, no shadow */
  box-shadow: none !important;
  border-radius: 20px !important;
  overflow: visible !important;
  margin: 0 auto !important;
  flex-shrink: 0 !important;
  transform: rotate(4deg) !important; /* Static tilt */
  transition: transform 0.2s ease, background 0.2s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    width: 95px !important;
    height: 90px !important;
    border-radius: 16px !important;
  }
}

/* Background Card (Always visible, creating static stacked effect) */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e2e6ea !important; /* Darker flat background card */
  border: 1px solid #d5dadd !important;
  border-radius: 20px !important;
  transform: rotate(-8deg) translate(-4px, 2px) !important; /* Static counter tilt */
  opacity: 1 !important; /* ALWAYS VISIBLE */
  z-index: -1 !important;
  transition: background 0.2s ease !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 16px !important;
  }
}

/* Minimal Hover state: just a slight lift, NO WOBBLE/ROTATION changes */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(4deg) translateY(-4px) !important; /* Keep the exact same 4deg rotation */
  background: #ffffff !important; 
}
.canva-cats .rect-card:hover .rect-inner::before {
  background: #e9ecef !important;
}

/* Image Container */
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important; /* minimal padding to maximize image size */
}

/* The Image itself */
.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 95% !important; /* Fill the box */
  height: 95% !important;
  max-height: 95% !important;
  object-fit: contain !important;
  transform: rotate(-4deg) !important; /* Static counter rotation to look straight */
  transition: transform 0.2s ease !important;
  filter: none !important; /* NO SHADOW */
  margin: auto !important;
}

/* Static hover on image */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(-4deg) scale(1.05) !important; /* Keep same rotation, just zoom */
}

/* Force override any inherited filters (dark mode, normal states) */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
  box-shadow: none !important;
}

/* Dark Mode */
.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dark .canva-cats .rect-card .rect-inner::before {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
.dark .canva-cats .rect-card:hover .rect-inner {
  background: #2dd4bf !important;
  border-color: #2dd4bf !important;
}

/* Category Text (Naturally positioned BELOW the box) */
.canva-cats .rect-card .rect-text {
  position: relative !important; /* NOT absolute */
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 18px !important; /* Space between the box and the text */
  text-align: center !important;
  width: 100% !important;
  z-index: 4 !important;
}

.canva-cats .rect-card .rect-text b {
  font-size: 1.05rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text {
    margin-top: 14px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V54: FIX TEXT OUTSIDE & FULL IMAGE ====== */

/* 1. Overall Container (.rect-card)
   - Must be relative so absolute text positions to it
   - Add padding bottom to make room for absolute text
*/
.canva-cats .rect-card {
  position: relative !important;
  min-width: 140px !important;
  max-width: 140px !important;
  height: 125px !important; /* Fixed height for the box part */
  margin-top: 15px !important;
  margin-bottom: 40px !important; /* Space below the box for the text */
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: block !important; /* No flex stacking, use absolute text */
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    min-width: 105px !important;
    max-width: 105px !important;
    height: 95px !important;
    margin-bottom: 35px !important; 
  }
}

/* 2. The Box (.rect-inner) 
   - Takes full height/width of .rect-card
*/
.canva-cats .rect-card .rect-inner {
  position: absolute !important;
  inset: 0 !important; /* Fill .rect-card */
  width: 100% !important;
  height: 100% !important;
  background: #f1f3f6 !important;
  border: 1px solid #e5e8ec !important;
  box-shadow: none !important;
  border-radius: 20px !important;
  overflow: visible !important;
  transform: rotate(4deg) !important; /* Static tilt */
  transition: transform 0.2s ease, background 0.2s ease !important;
  z-index: 2 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner {
    border-radius: 16px !important;
  }
}

/* Background Card */
.canva-cats .rect-card .rect-inner::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e2e6ea !important;
  border: 1px solid #d5dadd !important;
  border-radius: 20px !important;
  transform: rotate(-8deg) translate(-4px, 2px) !important;
  z-index: -1 !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 16px !important;
  }
}

/* Hover effects */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(4deg) translateY(-4px) !important;
  background: #ffffff !important;
}

/* 3. The Image Container (.rect-img)
   - Fills .rect-inner
*/
.canva-cats .rect-card .rect-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important; /* NO PADDING - let image fill */
}

/* 4. The Image (img)
   - Scale to fill bounding box without clipping edges
*/
.canva-cats .rect-card .rect-img img {
  position: relative !important;
  width: 90% !important; /* Large percentage */
  height: 90% !important;
  max-height: 90% !important;
  object-fit: contain !important; /* Keeps aspect ratio, doesn't crop */
  transform: rotate(-4deg) !important; /* Counter act the 4deg tilt */
  transition: transform 0.2s ease !important;
  filter: none !important;
  margin: auto !important;
}

.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(-4deg) scale(1.05) !important;
}

/* Disable generic filters from dark mode / other selectors */
.dark .canva-cats .rect-card:hover .rect-img img,
.dark .canva-cats .rect-card .rect-img img,
.canva-cats .rect-card:active .rect-img img,
.dark .canva-cats .rect-card:active .rect-img img {
  filter: none !important;
  box-shadow: none !important;
}

/* Dark mode */
.dark .canva-cats .rect-card .rect-inner {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dark .canva-cats .rect-card .rect-inner::before {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
.dark .canva-cats .rect-card:hover .rect-inner {
  background: #2dd4bf !important;
  border-color: #2dd4bf !important;
}

/* 5. The Text (.rect-text)
   - Absolute inside .rect-card but pulled OUTSIDE the bottom via negative bottom value 
*/
.canva-cats .rect-card .rect-inner .rect-text, 
.canva-cats .rect-card .rect-text {
  position: absolute !important;
  top: 100% !important; /* Position right below the box */
  left: 50% !important;
  transform: translateX(-50%) rotate(-4deg) !important; /* Counter act inner box rotation if text is inside inner box */
  width: 140px !important;
  text-align: center !important;
  margin-top: 12px !important;
  z-index: 10 !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Fix text rotation if it's placed outside rect-inner by JS */
.canva-cats .rect-card > .rect-text {
  transform: translateX(-50%) rotate(0deg) !important; 
}

.canva-cats .rect-card .rect-text b {
  font-size: 1.05rem !important;
  color: #0b1220 !important;
  font-weight: 800 !important;
  display: block !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.dark .canva-cats .rect-card .rect-text b {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .canva-cats .rect-card .rect-text {
    width: 110px !important;
    margin-top: 8px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: .85rem !important;
  }
}

/* ===== PATCH V55: Center Categories Grid & Wrap (Desktop & Mobile) ===== */

/* Allow the entire section to freely center and overflow if needed */
.canva-cats {
  overflow: visible !important;
  position: relative !important;
}

@media (max-width: 640px) {
  /* Remove the edge-to-edge trick on mobile so it centers normally in the container */
  .canva-cats {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-inline: 4px !important;
  }
}

/* Transform the scroll rail into a wrapped, centered layout */
.canva-cats .cats-rail {
  display: flex !important;
  flex-wrap: wrap !important; /* Cards now drop to next line if there's no space */
  justify-content: center !important; /* Center everything in the middle of page! */
  gap: 16px !important; /* Good spacing between items */
  overflow: visible !important; /* Stop hiding overflowing absolute text */
  margin: 0 auto !important; /* Center the rail itself */
  padding: 10px 0 20px 0 !important;
}

@media (max-width: 640px) {
  .canva-cats .cats-rail {
    gap: 12px !important; /* Tighter gap on phones */
    padding: 10px 5px !important;
  }
}

/* Hide the horizontal scrolling arrows completely since it will now wrap to rows */
.canva-cats .cats-nav {
  display: none !important;
}

/* Ensure absolute text visibility in the new wrapped context */
.canva-cats .rect-card {
  margin-bottom: 40px !important; /* Space so text doesn't hit cards in row below */
}

@media (max-width: 640px) {
  .canva-cats .rect-card {
    margin-bottom: 35px !important;
  }
}

/* ===== PATCH V56: HOVER STRAIGHTENS THE BOX (Flat & Simple) ===== */

/* 1. Base Box (Front Card) starts tilted */
.canva-cats .rect-card .rect-inner {
  transform: rotate(4deg) !important; /* Starts tilted */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), background 0.3s ease !important;
}

/* 2. On Hover: Straightens out cleanly */
.canva-cats .rect-card:hover .rect-inner {
  transform: rotate(0deg) translateY(-2px) !important; /* ONLY straightens to 0deg and slightly lifts */
  background: #ffffff !important; 
}

/* 3. Background Card starts tilted the other way */
.canva-cats .rect-card .rect-inner::before {
  transform: rotate(-8deg) translate(-4px, 2px) !important; 
}

/* 4. On Hover (Background Card): Stays still or gently shifts, NO rotation changes */
.canva-cats .rect-card:hover .rect-inner::before {
  /* It is still attached to the parent .rect-inner which is straightening. 
     To make the back card stay roughly in place while the front straightens, 
     we counter-rotate it back to its original visual position relative to the world */
  transform: rotate(-4deg) translate(-2px, 2px) !important; 
  background: #e9ecef !important;
}

/* 5. Image starts counter-tilted so it looks straight */
.canva-cats .rect-card .rect-img img {
  transform: rotate(-4deg) !important; /* Counter tilt so it's vertically straight */
}

/* 6. On Hover (Image): Since front card goes to 0deg, image must also go to 0deg to stay straight */
.canva-cats .rect-card:hover .rect-img img {
  transform: rotate(0deg) scale(1.03) !important; /* Straightens to 0deg with the box */
}


/* ===== PATCH V57: Mobile Side-Scrolling (Same dimensions as Desktop) ===== */

@media (max-width: 640px) {
  /* 1. Force the rail to scroll horizontally instead of wrapping */
  .canva-cats .cats-rail {
    flex-wrap: nowrap !important; /* Don't wrap to next line */
    justify-content: flex-start !important; /* Start from the right (Arabic RTL) */
    overflow-x: auto !important; /* Enable horizontal scroll */
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Firefox */
    padding: 15px 16px 20px 16px !important; /* Padding for neat edges */
    gap: 16px !important; /* Keep same gap as desktop */
  }

  /* Hide scrollbar for Chrome/Safari */
  .canva-cats .cats-rail::-webkit-scrollbar {
    display: none !important;
  }

  /* 2. Make the cards EXACTLY the same size as desktop and prevent shrinking */
  .canva-cats .rect-card {
    flex: 0 0 auto !important; /* Don't shrink */
    scroll-snap-align: start !important;
    
    /* Desktop Dimensions */
    min-width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    margin-bottom: 40px !important;
  }

  /* Desktop Box Dimensions */
  .canva-cats .rect-card .rect-inner {
    width: 130px !important;
    height: 125px !important;
    border-radius: 20px !important;
  }

  /* Desktop Background Card Dimensions */
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 20px !important;
  }

  /* Desktop Text Dimensions */
  .canva-cats .rect-card .rect-text {
    width: 140px !important;
    margin-top: 18px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: 1.05rem !important; /* Same font size as desktop */
  }

  /* Optional: Re-enable full width container constraint for the scroll area to hit edges */
  .canva-cats {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-inline: 0 !important;
  }
}

/* ===== PATCH V58: Exact Desktop Match on Mobile ===== */

@media (max-width: 640px) {
  /* Ensure the cards are exactly the same size as desktop */
  .canva-cats .rect-card {
    min-width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 40px !important; /* Space for text outside */
  }

  /* Box dimensions exact match */
  .canva-cats .rect-card .rect-inner {
    width: 130px !important;
    height: 125px !important;
    border-radius: 20px !important; /* Match desktop radius exactly */
  }

  /* Back card match */
  .canva-cats .rect-card .rect-inner::before {
    border-radius: 20px !important;
  }

  /* Text size match */
  .canva-cats .rect-card .rect-text {
    width: 140px !important;
    margin-top: 18px !important;
  }
  .canva-cats .rect-card .rect-text b {
    font-size: 1.05rem !important; /* Force desktop font size */
  }

  /* Keep horizontal scroll configuration */
  .canva-cats .cats-rail {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding: 20px 16px 30px 16px !important; /* Generous padding so shadows/tilted edges aren't cut off */
    gap: 16px !important;
  }
}

/* ===== PATCH V59: Fix Duplicate Text & Ensure Mobile Wrapping Grid ===== */

/* 1. Fix duplicated text issue 
   There might be a JS script cloning .rect-text directly under .rect-card, 
   causing two text elements to appear. We FORCE hide any text that is NOT 
   inside the .rect-inner wrapper, to ensure only one text element shows. 
*/
.canva-cats .rect-card > .rect-text {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Ensure the correct text (inside rect-inner) is visible and positioned properly */
.canva-cats .rect-card .rect-inner .rect-text {
  display: block !important;
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-4deg) !important; /* Counter tilt so text is straight */
  width: 140px !important;
  text-align: center !important;
  margin-top: 15px !important;
  z-index: 10 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* 2. Mobile Grid (As requested: "I want the ones that appear on mobile to be like these squares") 
   The user wants the desktop grid behavior (wrapping, centered) on mobile too, 
   not the side-scroller. We remove the scrolling and reinstate wrapping.
*/
@media (max-width: 640px) {
  /* Re-enable wrapping flex grid for mobile */
  .canva-cats .cats-rail {
    flex-wrap: wrap !important; /* WRAP to next line instead of scrolling */
    justify-content: center !important; /* Center the grid */
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    padding: 10px 4px 20px 4px !important;
    gap: 16px !important; 
  }

  /* Reset the container width */
  .canva-cats {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-inline: 4px !important;
  }

  /* Keep the size EXACTLY like the desktop squares */
  .canva-cats .rect-card {
    flex: 0 0 auto !important;
    min-width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    margin-bottom: 45px !important; /* Extra space for text below */
  }

  .canva-cats .rect-card .rect-inner {
    width: 130px !important;
    height: 125px !important;
  }
}


