/* F5R Plus fixed header and footer — intentionally loaded after all theme customization. */

/* Branded refresh loader */
.f5r-page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  background: var(--f5r-bg);
  background: color-mix(in srgb, var(--f5r-bg) 72%, transparent);
  backdrop-filter: blur(15px) saturate(.75);
  -webkit-backdrop-filter: blur(15px) saturate(.75);
  transition: opacity .46s ease, visibility .46s ease;
  animation: f5r-loader-failsafe 4s step-end forwards;
}

.f5r-page-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--f5r-primary) 13%, transparent), transparent 27%),
    linear-gradient(180deg, color-mix(in srgb, var(--f5r-surface) 48%, transparent), color-mix(in srgb, var(--f5r-bg) 78%, transparent));
}

.f5r-page-loader.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.f5r-page-loader__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.f5r-page-loader__spinner {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: rgba(255, 255, 255, .82);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 18 16;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, .2));
  animation: f5r-loader-spin .82s linear infinite;
}

.f5r-page-loader__logo {
  display: grid;
  place-items: center;
  animation: f5r-loader-logo 1.05s ease-in-out infinite;
}

.f5r-page-loader__logo img {
  width: auto;
  max-width: min(290px, 58vw);
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .38));
}

.f5r-page-loader__logo strong {
  color: var(--f5r-primary-light);
  font-size: clamp(30px, 8vw, 64px);
}

@keyframes f5r-loader-spin { to { transform: rotate(360deg); } }
@keyframes f5r-loader-logo {
  0%, 100% { opacity: .58; transform: scale(.965); filter: brightness(.82); }
  46% { opacity: 1; transform: scale(1.025); filter: brightness(1.13); }
  62% { opacity: .72; transform: scale(.99); filter: brightness(.92); }
  78% { opacity: 1; transform: scale(1.01); filter: brightness(1.08); }
}
@keyframes f5r-loader-failsafe {
  0%, 99% { visibility: visible; pointer-events: auto; }
  100% { visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .f5r-page-loader__logo { animation: none; }
  .f5r-page-loader__spinner { animation-duration: 1.5s; }
}

.f5r-fixed-header {
  position: sticky !important;
  top: 0;
  z-index: 1900;
  display: block !important;
  color: var(--f5r-text) !important;
  background: var(--f5r-bg) !important;
  background: color-mix(in srgb, var(--f5r-bg) 97%, transparent) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--f5r-primary) !important;
  border-bottom-color: color-mix(in srgb, var(--f5r-primary) 18%, transparent) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .24) !important;
  backdrop-filter: blur(18px);
}

.f5r-fixed-header::after { display: none !important; }

body.admin-bar .f5r-fixed-header { top: 32px !important; }

.f5r-fixed-header__row {
  min-height: 72px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center;
  gap: 28px;
}

.f5r-fixed-header__primary,
.f5r-fixed-header__utilities {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.f5r-fixed-header__primary {
  grid-column: 1;
  justify-content: flex-start;
}

.f5r-fixed-header__brand {
  grid-column: 2;
  justify-self: center;
}

.f5r-fixed-header__utilities {
  grid-column: 3;
  justify-content: flex-end;
}

.f5r-fixed-header__brand .custom-logo-link,
.f5r-fixed-header__brand > a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.f5r-fixed-header__brand .custom-logo,
.f5r-fixed-header__brand .f5r-brand__img {
  width: auto !important;
  max-width: 170px !important;
  max-height: 52px !important;
  object-fit: contain;
}

/* أيقونات الهيدر: مجردة بدون مربع أو حدود، على الموبايل والبي سي */
.f5r-header-menu,
.f5r-header-icon,
.f5r-fixed-cart,
.f5r-liquid-glass .f5r-header-menu,
.f5r-liquid-glass .f5r-header-icon,
.f5r-liquid-glass .f5r-fixed-cart {
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 4px !important;
  color: var(--f5r-text) !important;
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.f5r-header-menu {
  width: auto !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.f5r-header-menu:hover,
.f5r-header-icon:hover,
.f5r-fixed-cart:hover {
  color: var(--f5r-primary-light) !important;
  background: none !important;
  transform: none !important;
}

.f5r-header-menu svg,
.f5r-header-icon svg,
.f5r-fixed-cart svg {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.f5r-header-menu svg { color: var(--f5r-primary); }

.f5r-header-currency {
  color: var(--f5r-muted);
  white-space: nowrap;
  font-size: 14px;
}

.f5r-fixed-cart { position: relative; }
.f5r-fixed-cart .f5r-cart__total {
  color: var(--f5r-on-primary);
  font-size: 13px;
  white-space: nowrap;
}
.f5r-fixed-cart .f5r-cart__count {
  top: 1px;
  right: 0;
  min-width: 20px;
  height: 20px;
  color: var(--f5r-on-danger);
  background: var(--f5r-danger);
  border: 2px solid var(--f5r-bg);
}

.f5r-fixed-drawer {
  color: var(--f5r-text);
  background: var(--f5r-surface) !important;
  border-color: var(--f5r-primary) !important;
}

@media (min-width: 901px) { .f5r-currency-trigger--drawer { display: none !important; } }

/* الشريط الإعلاني أعلى الهيدر — نص متحرك بسرعة من الإعدادات */
.f5r-announce {
  position: relative;
  z-index: 1600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 40px 0 12px;
  color: var(--f5r-on-primary);
  background: linear-gradient(90deg, var(--f5r-primary-dark), var(--f5r-primary), var(--f5r-primary-dark));
}
.f5r-announce[hidden] { display: none !important; }
.f5r-announce__viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.f5r-announce__track {
  display: flex;
  width: max-content;
  animation: f5r-announce-roll var(--announce-speed, 26s) linear infinite;
}
.f5r-announce:hover .f5r-announce__track { animation-play-state: paused; }
.f5r-announce__group { display: flex; flex: 0 0 auto; }
.f5r-announce__item {
  display: inline-flex;
  align-items: center;
  padding: 6px 22px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.f5r-announce__item::after {
  content: "•";
  margin-inline-start: 26px;
  opacity: .55;
}
@keyframes f5r-announce-roll { to { transform: translateX(50%); } }
.f5r-announce__close {
  position: absolute;
  inset-inline-start: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: .8;
}
.f5r-announce__close:hover { opacity: 1; }
.f5r-announce__close svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round;
}
@media (prefers-reduced-motion: reduce) {
  .f5r-announce__track { animation: none; }
}

/* لوحة البحث — تفتح من أيقونة البحث في الهيدر */
.f5r-search { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: flex-start; justify-content: center; }
.f5r-search[hidden] { display: none !important; }
.f5r-search__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.f5r-search__panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  margin-top: clamp(70px, 14vh, 150px);
  /* Grid, not a flat flex row: the field and the close button share row 1 and
     the live results take the full width underneath them. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--f5r-surface);
  border: 1px solid color-mix(in srgb, var(--f5r-primary) 34%, transparent);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.f5r-search__form { min-width: 0; display: flex; align-items: center; gap: 10px; }
.f5r-search__icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: var(--f5r-primary-light); stroke-width: 1.9; stroke-linecap: round; }
.f5r-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 4px;
  color: var(--f5r-text);
  background: none;
  border: 0;
  outline: none;
  font-size: 16px;
}
.f5r-search__input::placeholder { color: var(--f5r-muted); }
.f5r-search__submit {
  flex: 0 0 auto;
  padding: 11px 20px;
  color: var(--f5r-on-primary);
  background: var(--f5r-primary);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.f5r-search__close {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  padding: 0;
  color: var(--f5r-muted);
  background: none; border: 0; cursor: pointer;
}
.f5r-search__close:hover { color: var(--f5r-text); }
.f5r-search__close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 600px) {
  .f5r-search__panel { padding: 11px; gap: 6px; }
  .f5r-search__submit { padding: 10px 14px; font-size: 13px; }
  .f5r-search__input { font-size: 16px; }
}

/* زر العملة + نافذة اختيارها */
.f5r-currency-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  color: var(--f5r-text);
  background: none;
  border: 1px solid color-mix(in srgb, var(--f5r-primary) 30%, transparent);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.f5r-currency-trigger:hover { color: var(--f5r-primary-light); border-color: var(--f5r-primary); }
.f5r-currency-trigger svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.f5r-currency-trigger--drawer {
  width: 100%;
  justify-content: space-between;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 15px;
}

.f5r-currency-modal { position: fixed; inset: 0; z-index: 2200; display: flex; align-items: center; justify-content: center; }
.f5r-currency-modal[hidden] { display: none !important; }
.f5r-currency-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.f5r-currency-modal__panel {
  position: relative;
  width: min(420px, calc(100% - 36px));
  padding: 26px 22px 22px;
  background: var(--f5r-surface);
  border: 1px solid color-mix(in srgb, var(--f5r-primary) 38%, transparent);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  text-align: start;
}
.f5r-currency-modal__close {
  position: absolute;
  inset-inline-end: 16px;
  top: 16px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  padding: 0;
  color: var(--f5r-on-danger);
  background: var(--f5r-danger);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.f5r-currency-modal__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.f5r-currency-modal__title { margin: 0 0 18px; padding-inline-end: 44px; color: var(--f5r-text); font-size: 19px; font-weight: 800; }
.f5r-currency-modal__form { display: grid; gap: 14px; }
.f5r-currency-modal__select {
  width: 100%;
  padding: 14px 16px;
  color: var(--f5r-text);
  background: var(--f5r-surface-2);
  border: 1px solid color-mix(in srgb, var(--f5r-primary) 46%, transparent);
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.f5r-currency-modal__select:focus-visible { outline: 2px solid var(--f5r-primary); outline-offset: 2px; }
.f5r-currency-modal__submit {
  width: 100%;
  padding: 14px 16px;
  color: var(--f5r-on-primary);
  background: linear-gradient(180deg, var(--f5r-primary-light), var(--f5r-primary));
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.f5r-currency-modal__submit:hover { filter: brightness(1.05); }

/* لوحة البحث — تفتح من أيقونة البحث في الهيدر */
.f5r-search { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: flex-start; justify-content: center; }
.f5r-search[hidden] { display: none !important; }
.f5r-search__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.f5r-search__panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  margin-top: clamp(70px, 14vh, 150px);
  /* Grid, not a flat flex row: the field and the close button share row 1 and
     the live results take the full width underneath them. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--f5r-surface);
  border: 1px solid color-mix(in srgb, var(--f5r-primary) 34%, transparent);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.f5r-search__form { min-width: 0; display: flex; align-items: center; gap: 10px; }
.f5r-search__icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: var(--f5r-primary-light); stroke-width: 1.9; stroke-linecap: round; }
.f5r-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 4px;
  color: var(--f5r-text);
  background: none;
  border: 0;
  outline: none;
  font-size: 16px;
}
.f5r-search__input::placeholder { color: var(--f5r-muted); }
.f5r-search__submit {
  flex: 0 0 auto;
  padding: 11px 20px;
  color: var(--f5r-on-primary);
  background: var(--f5r-primary);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.f5r-search__close {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  padding: 0;
  color: var(--f5r-muted);
  background: none; border: 0; cursor: pointer;
}
.f5r-search__close:hover { color: var(--f5r-text); }
.f5r-search__close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 600px) {
  .f5r-search__panel { padding: 11px; gap: 6px; }
  .f5r-search__submit { padding: 10px 14px; font-size: 13px; }
  .f5r-search__input { font-size: 16px; }
}

/* محوّل العملات — زر حقيقي في الهيدر وفي القائمة الجانبية */
.f5r-currency--drawer .f5r-currency__opt { flex: 1 1 auto; justify-content: center; border-radius: 11px; padding: 9px 12px; font-size: 13.5px; }

/* Fixed footer — one DOM, layout re-arranged with grid only */
.f5r-fixed-footer {
  position: relative;
  display: block !important;
  padding: 0 0 30px;
  color: var(--f5r-text) !important;
  background: var(--f5r-bg) !important;
  background-image: radial-gradient(circle at 82% 28%, color-mix(in srgb, var(--f5r-primary) 7%, transparent), transparent 32%) !important;
  border: 0 !important;
}

/* الإطار الخارجي: يقفل الفوتر كقطعة واحدة، بأركان سفلية منحنية */
.f5r-footer-shell {
  padding: 0 clamp(20px, 4vw, 56px) clamp(14px, 1.6vw, 18px);
  border: 1px solid var(--f5r-primary) !important;
  border-color: color-mix(in srgb, var(--f5r-primary) 34%, transparent) !important;
  border-top: 0 !important;
  border-radius: 0 0 clamp(24px, 3vw, 38px) clamp(24px, 3vw, 38px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--f5r-surface) 42%, transparent), transparent 55%);
  box-shadow: 0 -1px 0 color-mix(in srgb, var(--f5r-primary) 18%, transparent),
              0 24px 60px -40px color-mix(in srgb, var(--f5r-primary) 45%, transparent);
}

.f5r-footer-top {
  display: flex;
  justify-content: center;
  padding: clamp(12px, 1.5vw, 16px) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--f5r-primary) 14%, transparent);
}

.f5r-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--f5r-muted) !important;
  font-size: 15px;
}
.f5r-back-to-top:hover { color: var(--f5r-primary-light) !important; }

/* الشعار + وصف المتجر: في المنتصف على كل الأجهزة */
.f5r-footer-brand {
  padding: clamp(18px, 2vw, 24px) 0 clamp(14px, 1.6vw, 18px);
  text-align: center;
}
.f5r-footer-logo .custom-logo-link,
.f5r-footer-logo > a { display: inline-flex; justify-content: center; }
.f5r-footer-logo .custom-logo,
.f5r-footer-logo img {
  width: auto !important;
  max-width: 150px !important;
  max-height: 58px !important;
  object-fit: contain;
}
.f5r-footer-brand p {
  max-width: 760px;
  margin: 10px auto 0;
  color: var(--f5r-text) !important;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.95;
}

/* شبكة الفوتر: الروابط يمين + تحتها التواصل، وخدمة العملاء في النص */
.f5r-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas:
    "links contact"
    "social contact";
  align-items: start;
  gap: clamp(16px, 2vw, 24px) clamp(40px, 7vw, 110px);
  max-width: 940px;
  margin-inline: auto;
  padding-bottom: clamp(16px, 2vw, 22px);
}
.f5r-footer-links { grid-area: links; }
.f5r-footer-contact { grid-area: contact; }
.f5r-footer-social { grid-area: social; }
.f5r-footer-grid section { min-width: 0; }

.f5r-footer-grid h3 {
  margin: 0 0 10px !important;
  color: var(--f5r-primary-light) !important;
  font-size: clamp(17px, 1.4vw, 20px) !important;
  line-height: 1.4;
}
.f5r-footer-grid p,
.f5r-footer-grid a,
.f5r-footer-grid li {
  color: var(--f5r-text) !important;
  font-size: 15px;
  line-height: 1.9;
}

.f5r-footer-links .menu { list-style: none; margin: 0; padding: 0; }
.f5r-footer-links .menu li { margin: 6px 0; }
.f5r-footer-links .menu a:hover { color: var(--f5r-primary-light) !important; }

/* "خدمة العملاء" داخل شريط بحدود بسيطة زي المرجع */
.f5r-footer-contact { text-align: center; }
.f5r-footer-contact h3 {
  display: block;
  padding: 12px 20px;
  border: 1px solid color-mix(in srgb, var(--f5r-primary) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--f5r-surface-2) 60%, transparent);
}

.f5r-footer-social,
.f5r-contact-icons,
.f5r-payment-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* One supplied strip instead of the generated badges: it carries the store's
   own artwork, so it is scaled, never cropped or recoloured. */
.f5r-payment-strip {
  flex: 0 0 auto;
  width: min(300px, 100%);
  height: auto;
}

.f5r-contact-icons { justify-content: center; flex-wrap: wrap; }
.f5r-footer-social { justify-content: flex-start; flex-wrap: wrap; }

.f5r-footer-social a,
.f5r-contact-icons a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--f5r-text) !important;
  background: var(--f5r-surface-2);
  border: 1px solid var(--f5r-primary);
  border-color: color-mix(in srgb, var(--f5r-primary) 16%, transparent);
  border-radius: 14px;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.f5r-footer-social a:hover,
.f5r-contact-icons a:hover {
  color: var(--f5r-primary-light) !important;
  border-color: var(--f5r-primary);
  transform: translateY(-2px);
}
.f5r-footer-social svg,
.f5r-contact-icons svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.f5r-footer-contact-text {
  display: block;
  margin-top: 12px;
  overflow-wrap: anywhere;
}

/* السطر السفلي: الحقوق يسار وطرق الدفع يمين */
.f5r-footer-closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(12px, 1.5vw, 16px);
  border-top: 1px solid color-mix(in srgb, var(--f5r-primary) 14%, transparent);
}
.f5r-footer-closing p {
  margin: 0;
  color: var(--f5r-muted) !important;
  font-size: 13px;
}

.f5r-payment-badges { flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
.f5r-payment-badges span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  color: var(--f5r-text);
  background: var(--f5r-surface-2);
  border: 1px solid var(--f5r-border);
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.f5r-payment-badges span em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .01em;
}
.f5r-payment-badges span svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--f5r-primary-light);
}
.f5r-payment-badges img {
  width: auto;
  max-width: 62px;
  max-height: 22px;
  margin: 0;
  object-fit: contain;
}

/* Floating contact button: a brand-coloured circle with a chat bubble sitting
   beside it. The bubble is always out — it is the invitation, not a tooltip —
   and it is positioned outside the circle, so the button keeps `overflow`
   visible and the bubble's tail can poke into it. */
.f5r-floating-whatsapp {
  position: fixed;
  /* Physical `right`, not a logical property: the button is anchored to the
     bottom-right corner of the viewport in every language. */
  right: 24px;
  bottom: 24px;
  z-index: 1800;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 4px solid color-mix(in srgb, var(--f5r-text) 90%, transparent);
  border-radius: 50%;
  color: var(--f5r-on-primary, #fff) !important;
  background: var(--f5r-primary);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .3);
  text-decoration: none;
  overflow: visible;
  transition: transform .2s ease, filter .2s ease;
}
/* The sticky purchase bar owns the bottom edge of the product page and sits on a
   higher layer, so the contact button is lifted clear of it rather than left
   hiding behind it. Two heights because the bar itself switches from a stacked
   column to a single row at 901px (see product.css). The safe-area inset is
   added because the bar grows by exactly that much on devices that have one. */
body:has(.f5r-mobile-buy-bar) .f5r-floating-whatsapp {
  bottom: calc(97px + env(safe-area-inset-bottom));
}

.f5r-floating-whatsapp:hover,
.f5r-floating-whatsapp:focus-visible {
  color: var(--f5r-on-primary, #fff) !important;
  transform: translateY(-3px);
  filter: brightness(1.06);
}
.f5r-floating-whatsapp:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--f5r-primary) 45%, transparent);
  outline-offset: 3px;
}
.f5r-floating-whatsapp__icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.f5r-floating-whatsapp svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The bubble. Anchored to the circle's left edge (the inward side at the
   bottom-right corner) so it can never grow off-screen. */
.f5r-floating-whatsapp__bubble {
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  transform: translateY(-50%);
  padding: 10px 16px;
  border: 1px solid var(--f5r-border);
  border-radius: 14px 14px 3px 14px;
  background: var(--f5r-surface);
  color: var(--f5r-text);
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
  animation: f5rWaBubble 3.4s ease-in-out infinite;
}
/* Tail: a rotated square, drawn from the same surface and border so it reads as
   part of the bubble rather than a separate shape. */
.f5r-floating-whatsapp__bubble::after {
  position: absolute;
  top: 50%;
  right: -6px;
  width: 11px;
  height: 11px;
  content: '';
  transform: translateY(-50%) rotate(45deg);
  border-top: 1px solid var(--f5r-border);
  border-right: 1px solid var(--f5r-border);
  background: var(--f5r-surface);
}

@keyframes f5rWaBubble {
  0%, 88%, 100% { transform: translateY(-50%); }
  92%           { transform: translateY(calc(-50% - 4px)); }
  96%           { transform: translateY(-50%); }
}

/* Very small screens: the bubble would crowd the thumb reach, so drop it. */
@media (max-width: 380px) {
  .f5r-floating-whatsapp__bubble { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .f5r-floating-whatsapp { transition: none; }
  .f5r-floating-whatsapp__bubble { animation: none; }
}

/* The shell stays visible on checkout and all WooCommerce endpoints. */
.woocommerce-checkout .f5r-fixed-header,
.woocommerce-checkout .f5r-fixed-footer { display: block !important; }

@media (max-width: 900px) {
  .f5r-header-currency,
  .f5r-currency-trigger--header,
  .f5r-fixed-cart .f5r-cart__total { display: none !important; }

  .f5r-announce__item { padding: 6px 16px; font-size: 12px; }
  .f5r-announce__item::after { margin-inline-start: 18px; }

  .f5r-footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px 40px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .f5r-fixed-header { top: 46px !important; }
}

@media (max-width: 720px) {
  .f5r-fixed-header__row {
    min-height: 64px !important;
    width: calc(100% - 24px) !important;
    grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr) !important;
    gap: 8px;
  }

  .f5r-fixed-header__primary,
  .f5r-fixed-header__utilities { gap: 2px; }

  .f5r-header-menu span { display: none !important; }

  .f5r-header-menu,
  .f5r-header-icon,
  .f5r-fixed-cart {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 4px !important;
  }

  .f5r-header-menu svg,
  .f5r-header-icon svg,
  .f5r-fixed-cart svg {
    width: 23px;
    height: 23px;
  }

  .f5r-fixed-header__brand .custom-logo,
  .f5r-fixed-header__brand .f5r-brand__img {
    max-width: 124px !important;
    max-height: 40px !important;
  }

  /* موبايل: كل شيء عمودي ومتمركز — شعار، وصف، روابط، خدمة العملاء، تواصل، دفع، حقوق */
  .f5r-footer-shell {
    padding: 0 18px 16px;
    border-radius: 0 0 26px 26px;
  }

  .f5r-footer-brand { padding: 16px 0 12px; }
  .f5r-footer-logo .custom-logo,
  .f5r-footer-logo img { max-width: 132px !important; max-height: 48px !important; }
  .f5r-footer-brand p { font-size: 13px; line-height: 1.7; }

  .f5r-footer-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "links"
      "contact"
      "social";
    gap: 18px;
    text-align: center;
    padding-bottom: 16px;
  }

  .f5r-footer-grid section { width: 100%; }
  .f5r-footer-links .menu { text-align: center; }
  .f5r-footer-contact h3 { display: inline-block; }
  .f5r-footer-social { justify-content: center; }

  .f5r-footer-closing {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding-top: 14px;
    text-align: center;
  }
  .f5r-payment-badges { justify-content: center; }
  .f5r-payment-strip { width: min(240px, 80%); margin-inline: auto; }
  .f5r-footer-closing p { font-size: 12.5px; }

  .f5r-floating-whatsapp {
    right: 16px;
    bottom: 18px;
    width: 58px;
    height: 58px;
  }
  body:has(.f5r-mobile-buy-bar) .f5r-floating-whatsapp {
    bottom: calc(137px + env(safe-area-inset-bottom));
  }
  .f5r-floating-whatsapp__bubble { padding: 9px 13px; font-size: 13.5px; right: calc(100% + 11px); }
}

@media (max-width: 390px) {
  .f5r-fixed-header__row {
    width: calc(100% - 14px) !important;
    grid-template-columns: minmax(66px, 1fr) auto minmax(66px, 1fr) !important;
  }
  .f5r-fixed-header__brand .custom-logo,
  .f5r-fixed-header__brand .f5r-brand__img { max-width: 138px !important; }
  .f5r-header-menu,
  .f5r-header-icon,
  .f5r-fixed-cart { min-width: 36px !important; }
}

/* ---------------------------------------------------------------------
   Live search results
--------------------------------------------------------------------- */
.f5r-search__results {
  grid-column: 1 / -1;
  max-height: min(56vh, 460px);
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--f5r-border);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.f5r-search__results[hidden] { display: none; }
.f5r-search__result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--f5r-text);
  text-decoration: none;
  transition: background .16s ease;
}
.f5r-search__result:hover,
.f5r-search__result.is-active {
  background: color-mix(in srgb, var(--f5r-primary) 14%, transparent);
  color: var(--f5r-text);
}
.f5r-search__thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 1px solid var(--f5r-border);
  border-radius: 10px;
  object-fit: cover;
  background: var(--f5r-bg);
}
.f5r-search__thumb--blank { display: block; }
.f5r-search__meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.f5r-search__name {
  overflow: hidden;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.f5r-search__price { color: var(--f5r-primary-light, var(--f5r-primary)); font-weight: 800; font-size: 13.5px; }
.f5r-search__stock { color: var(--f5r-muted); font-size: 12.5px; }
.f5r-search__empty {
  margin: 0;
  padding: 14px 10px;
  color: var(--f5r-muted);
  font-size: 14px;
  text-align: center;
}
.f5r-search__more {
  display: block;
  margin-top: 6px;
  padding: 11px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--f5r-primary) 12%, transparent);
  color: var(--f5r-primary-light, var(--f5r-primary));
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}
.f5r-search__more:hover,
.f5r-search__more.is-active { background: color-mix(in srgb, var(--f5r-primary) 22%, transparent); }

@media (max-width: 600px) {
  .f5r-search__results { max-height: 52vh; }
  .f5r-search__thumb { width: 42px; height: 42px; }
  .f5r-search__name { font-size: 14px; }
}
.f5r-search__price { display: inline-flex; align-items: center; gap: 7px; }
.f5r-search__was { color: var(--f5r-muted); font-weight: 600; font-size: 12.5px; }

/* ---------------------------------------------------------------------
   Shop cards: smaller, and showing the whole product image.
   The image sits in a fixed 4:5 box with `contain`, so tall artwork is
   letterboxed rather than cropped and every card in a row lines up.
--------------------------------------------------------------------- */
.woocommerce ul.products li.product { padding: 11px; border-radius: 14px; }
/* The aspect ratio and object-fit are set by the theme studio's inline CSS
   (printed after this file), so they are deliberately not repeated here. */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
  width: 100%;
  height: auto;
  margin-bottom: 9px;
  border-radius: 11px;
  background: var(--f5r-bg);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  line-height: 1.5;
  margin: 0 0 5px;
}
.woocommerce ul.products li.product .price { font-size: 14px; }
.woocommerce ul.products li.product .button { margin-top: 8px; padding: 9px 10px; font-size: 13px; }

@media (min-width: 1200px) {
  .woocommerce ul.products { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
}

/* ---------------------------------------------------------------------
   Category landing: one section per sub-category
--------------------------------------------------------------------- */
.f5r-catnav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
}
.f5r-catnav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--f5r-border);
  border-radius: 999px;
  background: var(--f5r-surface);
  color: var(--f5r-text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease;
}
.f5r-catnav__link:hover {
  border-color: var(--f5r-primary);
  color: var(--f5r-primary-light, var(--f5r-primary));
}
.f5r-catnav__count {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--f5r-primary) 16%, transparent);
  color: var(--f5r-primary-light, var(--f5r-primary));
  font-size: 12px;
}

.f5r-catsection { margin-bottom: 38px; }
.f5r-catsection__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.f5r-catsection__title {
  margin: 0;
  color: var(--f5r-text);
  font-size: clamp(18px, 2.1vw, 23px);
  font-weight: 900;
}
.f5r-catsection__all {
  flex: 0 0 auto;
  color: var(--f5r-primary-light, var(--f5r-primary));
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.f5r-catsection ul.products {
  margin: 0 !important;
  /* auto-fill, not a fixed column count: a sub-category with two products keeps
     cards the same size as a row with six instead of stretching them. */
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
@media (max-width: 600px) {
  .f5r-catsection ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .f5r-catnav { gap: 7px; margin-bottom: 20px; }
  .f5r-catnav__link { padding: 8px 12px; font-size: 13px; }
  .f5r-catsection { margin-bottom: 28px; }
}

/* ---------------------------------------------------------------------
   Add-to-cart toast
--------------------------------------------------------------------- */
.f5r-toast {
  /* Top-left, clear of the sticky header. The exact offset is measured from
     the live header at show time (assets/js/woocommerce.js) because the
     announcement bar changes the header height as the page scrolls. */
  position: fixed;
  left: 18px;
  top: var(--f5r-toast-top, 96px);
  z-index: 2200;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(440px, calc(100% - 28px));
  padding: 13px 15px;
  border: 1px solid var(--f5r-border);
  border-radius: 16px;
  background: var(--f5r-surface);
  box-shadow: 0 22px 54px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity .24s ease, transform .24s ease;
}
.f5r-toast[hidden] { display: none; }
.f5r-toast.is-visible { opacity: 1; transform: translateY(0); }
.f5r-toast__check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--f5r-success, #2fbf71);
  color: var(--f5r-on-success, #fff);
  font-weight: 900;
}
.f5r-toast__body { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.f5r-toast__title { color: var(--f5r-text); font-weight: 800; font-size: 14.5px; }
.f5r-toast__name {
  overflow: hidden;
  color: var(--f5r-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.f5r-toast__name:empty { display: none; }
.f5r-toast__cta {
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding: 9px 15px;
  border-radius: 10px;
  background: var(--f5r-primary);
  color: var(--f5r-on-primary, #fff);
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
}
.f5r-toast__close {
  flex: 0 0 auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--f5r-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Full-width across the top on phones — a 440px corner card would overflow. */
@media (max-width: 900px) {
  .f5r-toast { left: 14px; right: 14px; width: auto; gap: 10px; padding: 11px 13px; }
  .f5r-toast__title { font-size: 13.5px; }
  .f5r-toast__cta { padding: 8px 12px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .f5r-toast { transition: none; }
}

/* ---------------------------------------------------------------------
   Side drawer navigation
--------------------------------------------------------------------- */
.f5r-drawer__nav { margin-top: 6px; }
.f5r-drawer__menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.f5r-drawer__menu--links { margin-top: 10px; border-top: 1px solid var(--f5r-border); }
.f5r-drawer__item { margin: 0; }

.f5r-drawer__row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--f5r-border);
}
.f5r-drawer__link {
  flex: 1 1 auto;
  min-width: 0;
  padding: 15px 4px;
  color: var(--f5r-text);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.5;
  text-decoration: none;
}
.f5r-drawer__link:hover { color: var(--f5r-primary-light, var(--f5r-primary)); }
.f5r-drawer__count {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--f5r-primary) 15%, transparent);
  color: var(--f5r-primary-light, var(--f5r-primary));
  font-size: 12px;
}

.f5r-drawer__toggle {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--f5r-muted);
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.f5r-drawer__toggle:hover {
  background: color-mix(in srgb, var(--f5r-primary) 12%, transparent);
  color: var(--f5r-primary-light, var(--f5r-primary));
}
.f5r-drawer__toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* The chevron points into the page (left in RTL, right in LTR) when closed,
     and downwards once the branch is open. */
  transform: rotate(180deg);
  transition: transform .25s ease;
}
.f5r-drawer__item.is-open > .f5r-drawer__row .f5r-drawer__toggle svg { transform: rotate(270deg); }
.f5r-drawer__item.is-open > .f5r-drawer__row .f5r-drawer__toggle { color: var(--f5r-primary-light, var(--f5r-primary)); }

/* Sub-items: collapsed by default, opened by the row's expander. */
.f5r-drawer__sub {
  margin: 0;
  padding: 0 14px 0 0;
  list-style: none;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .22s ease;
}
.f5r-drawer__item.is-open > .f5r-drawer__sub {
  max-height: 1200px;
  opacity: 1;
}
.f5r-drawer__sub .f5r-drawer__link {
  padding: 12px 4px;
  color: var(--f5r-text-secondary, var(--f5r-muted));
  font-weight: 600;
  font-size: 14.5px;
}
.f5r-drawer__sub .f5r-drawer__link:hover { color: var(--f5r-primary-light, var(--f5r-primary)); }
.f5r-drawer__sub .f5r-drawer__row { border-bottom-style: dashed; }
.f5r-drawer__sub > .f5r-drawer__item:last-child > .f5r-drawer__row { border-bottom: 0; }

[dir="ltr"] .f5r-drawer__toggle svg { transform: rotate(0deg); }
[dir="ltr"] .f5r-drawer__item.is-open > .f5r-drawer__row .f5r-drawer__toggle svg { transform: rotate(90deg); }
[dir="ltr"] .f5r-drawer__sub { padding: 0 0 0 14px; }

@media (prefers-reduced-motion: reduce) {
  .f5r-drawer__sub,
  .f5r-drawer__toggle svg { transition: none; }
}
