/* The hero banners are made at 2880×600, as on Digikala, with their content in
   the middle. On a desktop the carousel runs edge to edge right under the
   header, a little taller than the artwork, so object-fit trims only the plain
   ends. On a phone each banner is a rounded card with a sliver of the previous
   and next banners showing at the sides. */
.banner-slider-container {
  /* how far the slide in view sits in from each side, and the space between
     neighbouring slides; the script steps by a slide's width plus the gap */
  --banner-peek: 0px;
  --banner-gap: 0px;
  position: relative;
  width: 100%;
  overflow: hidden;
  container-type: inline-size;
}

/* The slides are stacked in one box and placed by the script with transforms,
   which is what lets the carousel loop in both directions without end. */
.banner-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 36 / 10;
  max-height: 400px;
  overflow: hidden;
  /* vertical swipes still scroll the page; sideways ones move the slides */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  /* the banners are links, so the pointer stays the link pointer, dragging or not */
  cursor: pointer;
}

.banner-slider.is-dragging {
  cursor: pointer;
}

.banner-slide {
  position: absolute;
  inset: 0 var(--banner-peek);
  overflow: hidden;
  will-change: transform;
}

/* Until the script has placed the slides, only the first one shows. */
.banner-slide:not(:first-child) {
  visibility: hidden;
}

.banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Arrows and dots share one column in the bottom corner, so the pair of arrows is
   centred over the dots however many banners there are. */
.banner-controls {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.banner-arrows {
  display: flex;
  gap: 10px;
}

.banner-dots {
  display: flex;
  gap: 8px;
}

.dot {
  padding: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  /* white like the arrows; the shadow keeps them visible on a pale banner */
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.dot.active {
  background-color: #fff;
  width: 28px;
  border-radius: 5px;
}

/* Two white circles with a chevron, above the dots. They fade in while the pointer
   is on the banner, and fade out again when it leaves. A click leaves the button
   focused, so keyboard focus only holds them open when it is the keyboard's own
   focus ring (:focus-visible), not after a mouse click. */
.banner-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: #4b5563;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.banner-arrow svg {
  display: block;
}

.banner-slider-container:hover .banner-arrow,
.banner-slider-container:has(:focus-visible) .banner-arrow {
  opacity: 1;
}

.category {
  padding-top: 48px;
}

.category-slider-wrapper {
  position: relative;
}

.category-slider {
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  /* stops a sideways flick from turning into a browser back gesture */
  overscroll-behavior-x: contain;
  /* the arrows already say where the reader is */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-slider::-webkit-scrollbar {
  display: none;
}

.category-item a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.category-item span {
  color: var(--blue-800);
  font-weight: 600;
  transition: 0.2s ease;
}

.category-item a:hover span {
  color: var(--orange-400);
}

.category-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #fff;
  border: none;
  box-shadow: 0 0 14px -3px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #333;
  transition: opacity 0.3s ease;
}

.category-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.category-arrow-prev {
  right: 10px;
}

.category-arrow-next {
  left: 10px;
}

.features {
  padding-top: 48px;
}

.feature svg {
  width: 120px;
  height: 120px;
}

.widget {
  padding-top: 48px;
}

.kitchen {
  padding-top: 48px;
}

.mini-banners {
  padding-top: 48px;
}

.product-cards {
  background-color: #fff;
  padding-top: 48px;
}

.product-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.1);
}

.product-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.btn-view-products {
  background-color: #fff;
  color: var(--blue-400);
  padding: 6px 12px;
  border: 2px solid var(--blue-400);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.btn-view-products:hover {
  background-color: var(--blue-400);
  color: #fff;
}

@media (max-width: 991.98px) {

  /* 3:1 cards (the 2880×600 artwork keeps its middle 62%, where its content
     is), 12px of each neighbour peeking in beyond an 8px gap. */
  .banners {
    padding-top: 12px;
  }

  .banner-slider-container {
    --banner-peek: 20px;
    --banner-gap: 8px;
  }

  .banner-slider {
    aspect-ratio: auto;
    max-height: none;
    /* 2.8:1, taller than the 3:1 card it replaces. Measured across the six
       banner files, the artwork's content reaches at most 822px either side of
       centre, so 2.74:1 is as tall as a card can get before it starts trimming
       the design; 2.8 leaves that margin alone. */
    height: calc((100vw - 2 * var(--banner-peek)) / 2.8);
    height: calc((100cqw - 2 * var(--banner-peek)) / 2.8);
  }

  .banner-slide {
    border-radius: 12px;
  }

  .banner-arrow {
    display: none !important;
  }

  .banner-slide img {
    object-fit: cover !important;
    background-color: #f0f0f0 !important;
  }

  /* On a phone there are no arrows, so the dots keep the middle of the card. */
  .banner-controls {
    right: auto !important;
    left: 50% !important;
    bottom: 6px !important;
    transform: translateX(-50%) !important;
  }

  .banner-dots {
    gap: 6px !important;
  }

  .dot {
    width: 8px !important;
    height: 8px !important;
  }

  .dot.active {
    width: 20px !important;
  }

  .features-container > div {
    gap: 16px !important;
  }

  .feature svg {
    width: 60px !important;
    height: 60px !important;
  }

  .features {
    padding-top: 24px !important;
  }

  .category-item {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .category-item > a > img {
    width: 90px !important;
    height: 90px !important;
  }

  .category-item > a > span {
    font-size: 12px !important;
  }

  .category-arrow {
    display: none !important;
  }

  .category {
    padding-top: 24px !important;
  }

  .cups p:nth-child(1) {
    font-size: 14px !important;
  }

  .cups p:nth-child(2) {
    font-size: 17px !important;
  }

  .cups a.btn {
    --bs-btn-padding-y: var(--bs-btn-padding-y-sm, 4px) !important;
    --bs-btn-padding-x: var(--bs-btn-padding-x-sm, 8px) !important;
    --bs-btn-font-size: var(--bs-btn-font-size-sm, 14px) !important;
  }

  .spices p:nth-child(1) {
    font-size: 14px !important;
  }

  .spices p:nth-child(2) {
    font-size: 17px !important;
  }

  .cups p:nth-child(2) {
    font-size: 17px !important;
  }

  .tablecloth p:nth-child(1) {
    font-size: 12px !important;
  }

  .tableware p:nth-child(1) {
    font-size: 12px !important;
  }

  .widget {
    padding-top: 24px !important;
  }

  .kitchen {
    padding-top: 24px !important;
  }

  .mini-banners {
    padding-top: 24px !important;
  }

  .product-cards {
    background-color: #fff !important;
    padding-top: 24px !important;
  }

  .product-card-overlay {
    padding: 10px !important;
  }

  .btn-view-products {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }
}
