/* Gahmi JS Code Start */
/* cloudflare */
div:has(> salla-products-slider[block-title="منتجات قد تعجبك"]) {
  display: none;
}

.sticky-product-bar .s-add-product-button-main salla-button[quick-buy] {
  display: none;
}

#app .s-quick-buy-apple-pay {
  margin-top: 0;
}

.sticky-product-bar salla-add-product-button[width="wide"] {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 0.5rem;
}

.s-add-product-button-main .s-add-product-button-mini-checkout {
  width: 100%;
}

#app .s-add-product-button-main {
  width: 50%;
}

#app .s-add-product-button-with-sticky-bar salla-quick-buy {
  width: 50%;
}

.header-mid-side .header-cart-button-wrapper {
  display: none;
}

li.btm-menu-li:has(> a[aria-label="سلة المشتريات"]) {
  display: none;
}

.s-product-card-content-main {
	flex-direction: column;
}

/* Hide default subtitle — show only when we inject brand - category */
custom-salla-product-card .s-product-card-content-subtitle:not(.fly-mart-card-meta) {
  display: none;
}

.s-block--best-offers {
  padding-bottom: 14px;
}

.categories-section-home {
  padding-bottom: 20px;
}

/* Brand - Category: after title/desc, directly before price */
.fly-mart-card-meta,
custom-salla-product-card .s-product-card-content-subtitle.fly-mart-card-meta {
  display: block !important;
  margin: 6px 0 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s-product-card-content > .fly-mart-card-meta {
  width: 100%;
  order: 0;
}

/* Description below the title */
.fly-mart-card-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hide the “Add to Cart” button after the “Book” button appears */
.s-product-card-content-footer:has(.fly-mart-book-btn) salla-add-product-button {
  display: none !important;
}

/* Book Now Button */
.fly-mart-book-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  background: var(--main-buttons_bg, #000);
  color: var(--main-buttons_text, #fff) !important;
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 768px) {
  .s-products-list-vertical-cards,
  .s-products-list-filters-results {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* Product sliders: 1.25 (mobile) | 3 (tablet) | 4 (desktop) */
salla-products-slider .s-products-slider-card.swiper-slide,
.s-block--best-offers .s-products-slider-card.swiper-slide {
  width: 80% !important;
  max-width: 80% !important;
  box-sizing: border-box;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  salla-products-slider .s-products-slider-card.swiper-slide,
  .s-block--best-offers .s-products-slider-card.swiper-slide {
    width: 33.3333% !important;
    max-width: 33.3333% !important;
  }
}

@media (min-width: 1024px) {
  salla-products-slider .s-products-slider-card.swiper-slide,
  .s-block--best-offers .s-products-slider-card.swiper-slide {
    width: 25% !important;
    max-width: 25% !important;
  }
}

.product-mid-content {
  margin: 0 !important;
  padding: 0 !important;
}

.product-end-content {
  padding: 0 !important;
}

/* ===== Booking options UI (visual only) ===== */
salla-product-options.fly-mart-booking-enhanced {
  position: relative;
}

/* Hide date/time option only — other options are visible */
salla-product-options.fly-mart-booking-enhanced .s-product-options-option-container.fly-book-option-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

.fly-book-ui {
  margin-block: 12px;
}

.fly-book-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: inherit;
  font: inherit;
}

.fly-book-trigger:hover,
.fly-book-trigger.is-selected {
  border-color: var(--main-buttons_bg, #0f766e);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.fly-book-trigger__icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--main-buttons_bg, #0f766e) 12%, #fff);
  color: var(--main-buttons_bg, #0f766e);
  flex-shrink: 0;
}

/* Static red dot — no transform/animation (those shifted the page) */
.fly-book-pulse-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  pointer-events: none;
  z-index: 2;
}

.fly-book-trigger.is-selected .fly-book-pulse-dot {
  display: none;
}

.fly-book-trigger__texts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fly-book-trigger__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.fly-book-trigger__summary {
  font-size: 13px;
  opacity: 0.7;
  line-height: 1.4;
}

.fly-book-trigger__chev {
  font-size: 22px;
  opacity: 0.45;
  line-height: 1;
}

body.fly-book-open {
  overflow: hidden;
}

.fly-book-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.fly-book-overlay.is-open {
  display: flex;
  animation: flyBookFade 0.2s ease;
}

@media (min-width: 640px) {
  .fly-book-overlay,
  .fly-book-overlay.is-open {
    align-items: center;
  }
}

@keyframes flyBookFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fly-book-modal {
  width: min(480px, 100%);
  max-height: min(88vh, 680px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  animation: flyBookUp 0.25s ease;
}

@keyframes flyBookUp {
  from { transform: translateY(16px); opacity: 0.85; }
  to { transform: translateY(0); opacity: 1; }
}

.fly-book-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 8px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.fly-book-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.fly-book-modal__sub {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.65;
}

.fly-book-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #111;
}

.fly-book-section {
  padding: 10px 18px 6px;
}

.fly-book-section__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.75;
}

.fly-book-dates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.fly-book-dates::-webkit-scrollbar {
  height: 4px;
}

.fly-book-date {
  scroll-snap-align: start;
  min-width: 76px;
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: inherit;
  color: inherit;
  transition: 0.15s ease;
}

.fly-book-date__week {
  font-size: 11px;
  opacity: 0.65;
}

.fly-book-date__day {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.fly-book-date__month {
  font-size: 11px;
  opacity: 0.7;
}

.fly-book-date:hover {
  border-color: color-mix(in srgb, var(--main-buttons_bg, #0f766e) 50%, #e5e7eb);
}

.fly-book-date.is-active {
  background: var(--main-buttons_bg, #0f766e);
  border-color: var(--main-buttons_bg, #0f766e);
  color: var(--main-buttons_text, #fff);
}

.fly-book-date.is-disabled,
.fly-book-time.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fly-book-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 420px) {
  .fly-book-times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fly-book-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  color: inherit;
  transition: 0.15s ease;
}

.fly-book-time.is-day {
  color: #b45309;
}

.fly-book-time.is-night {
  color: #334155;
}

.fly-book-time.is-active {
  background: var(--main-buttons_bg, #0f766e);
  border-color: var(--main-buttons_bg, #0f766e);
  color: var(--main-buttons_text, #fff) !important;
}

.fly-book-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fly-book-empty {
  margin: 0;
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  opacity: 0.65;
  padding: 16px 0;
}

.fly-book-modal__foot {
  padding: 12px 18px 18px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}

.fly-book-confirm {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  background: var(--main-buttons_bg, #0f766e);
  color: var(--main-buttons_text, #fff);
}

/* Floating WhatsApp — sit above the mobile bottom nav */
.wa-widget-outer {
  pointer-events: none;
}

#wa-widget {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  body.product-single #wa-widget {
    bottom: 194px;
  }
}

#wa-widget .wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

#wa-widget .sicon-whatsapp2 {
  font-size: 28px;
  line-height: 1;
  color: #fff;
}

body.fly-book-open .wa-widget-outer {
  display: none;
}
/* Gahmi JS Code Start */