/* Thuraya Collection - Clean performance-friendly CSS */

/* General */
body.index {
  background-color: #fff;
}

/* Logo: keep a stable box and avoid oversized rendering */
.navbar-brand img {
  display: block;
  width: auto;
  height: auto;
  max-height: 5rem;
}

/* Main fixed banner */
body.index header.store-header + section.s-block.s-block--fixed-banner {
  margin-top: 0 !important;
}

.s-block--fixed-banner .container {
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  padding: 0;
}

.banner--fixed {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.banner--fixed img {
  display: block;
  width: 100%;
  height: 100% !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0 !important;
  background-color: transparent;
}


/* Main photo slider */
body.index salla-slider.photos-slider .swiper {
  padding-bottom: 0 !important;
}

[dir="rtl"] .carousel-slider .swiper {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

section.s-block.s-block--photos-slider {
  margin-top: 0 !important;
}

section.s-block.s-block--photos-slider img {
  display: block;
  border-radius: 0 !important;
}

section.s-block.s-block--photos-slider .swiper-slide {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Product cards */
.s-product-card-entry {
  border: 1px solid #6d4937 !important;
  box-shadow: 0 0 5px rgba(104, 104, 104, 0.35) !important;
}

.s-products-slider-card {
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

.s-slider-block__title h2 {
  color: #090909 !important;
}

.s-product-card-image {
  background-color: transparent !important;
}

.s-slider-nav-arrow {
  border-color: #6d4937 !important;
  background-color: #6d4937 !important;
}

.s-slider-nav-arrow svg,
.s-slider-nav-arrow:not(:disabled):hover svg {
  fill: #fff !important;
}

.product-index-offers .s-products-list-vertical-cards,
.product-index .s-products-list-vertical-cards {
  margin: 0.2rem;
}

/* Buttons */
.s-button-primary-outline {
  background-color: #543522 !important;
  color: #fff !important;
}

/* First banners section only */
body.index
section.s-block.s-block--banners.container:not(section.s-block--banners ~ section.s-block--banners)
.grid {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.index
section.s-block.s-block--banners.container:not(section.s-block--banners ~ section.s-block--banners)
.grid > a.banner-entry {
  flex: 0 0 calc(20% - 8px);
  width: auto;
  min-width: 0;
  aspect-ratio: 4 / 3;
  height: auto !important;
  padding: 0;
  overflow: hidden;
  background-color: transparent !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 0 !important;
}

/* All banner entries: use a stable ratio instead of conflicting fixed heights */
.banner-entry {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  height: auto;
  padding: 0.75rem;
  text-align: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 0.375rem;
  color: #fff;
}

body.index
section.s-block.s-block--banners.container:not(section.s-block--banners ~ section.s-block--banners)
.grid > a.banner-entry > div {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain !important;
  background-position: center;
}

/* Footer */
.store-footer .store-footer__inner {
  background-color: #543522 !important;
}

.store-footer,
.store-footer *,
.store-footer a,
.store-footer h3,
.store-footer p,
.store-footer span {
  color: #fff !important;
}

.store-footer svg,
.store-footer i {
  fill: #fff !important;
  color: #fff !important;
}

/* Marquee: desktop only; JS also waits until near viewport */
.bn-marquee .square-photos-grid {
  display: block !important;
  overflow: hidden;
  direction: ltr;
}

.bn-marquee .bn-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: bnScroll 30s linear infinite;
  will-change: transform;
}

.bn-marquee .bn-track:hover {
  animation-play-state: paused;
}

.bn-marquee .banner-entry {
  flex: 0 0 auto;
  width: 420px;
  height: 260px;
  aspect-ratio: auto;
}

.bn-marquee .banner-entry .lazy__bg {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

@keyframes bnScroll {
  to {
    transform: translateX(calc(-50% - 10px));
  }
}

/* Center footer content on small screens */
@media (max-width: 767px) {
  .store-footer__inner * {
    justify-content: center;
    text-align: center;
  }

  body.index
  section.s-block.s-block--banners.container:not(section.s-block--banners ~ section.s-block--banners)
  .grid > a.banner-entry {
    flex-basis: calc(33.333% - 8px);
    aspect-ratio: 1 / 1;
  }

  /* Do not display the custom marquee on mobile */
  .bn-marquee .bn-track {
    animation: none;
    transform: none;
  }
}

/* Respect users who disable motion */
@media (prefers-reduced-motion: reduce) {
  .bn-track {
    animation: none !important;
    transform: none !important;
  }
}

/* Safe square-photo grid override
   Keeps the normal Salla photo grid stable and prevents large two-column tiles. */
body.index
section.s-block.s-block--banners:not(.bn-marquee)
.square-photos-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

body.index
section.s-block.s-block--banners:not(.bn-marquee)
.square-photos-grid > .banner-entry {
  width: auto !important;
  min-width: 0;
  height: auto !important;
  aspect-ratio: 1 / 1;
  margin: 0 !important;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
}

body.index
section.s-block.s-block--banners:not(.bn-marquee)
.square-photos-grid > .banner-entry > div {
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

@media (max-width: 767px) {
  body.index
  section.s-block.s-block--banners:not(.bn-marquee)
  .square-photos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}