/*
 * WAQIT storefront layer for the Salla "Click" theme  ·  waqit-custom.css
 *
 * Paste this whole file into: Theme editor → تخصيص متقدم → CSS.
 * Every rule is scoped to html.waqit-on, a class added only by waqit-custom.js,
 * so nothing here changes the store until the script switches the layer on.
 * Checkout, account and payment pages are never targeted.
 */

/* ---------- Tokens ---------- */
html.waqit-on {
  --wq-deep: #1A120C;
  --wq-brown: #2A1D14;
  --wq-brick: #5A3F2B;
  --wq-sand: #D9C6A5;
  --wq-parchment: #F4ECDD;
  --wq-gold: #B08D57;
  --wq-gold-deep: #8C6D3F;
  --wq-night: #0B0710;
  --wq-engraving-base: #F8ECDB;
  --wq-display: 'El Messiri', var(--font-main), sans-serif;
  --wq-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Header: one row, WAQIT wordmark centred ---------- */
html.waqit-on .store-header,
html.waqit-on .store-header .main-nav-container {
  background-color: var(--wq-deep);
  color: var(--wq-parchment);
  box-shadow: none;
}

html.waqit-on .store-header .header-container {
  position: relative;
}

html.waqit-on .wq-wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--wq-parchment);
  text-decoration: none;
  white-space: nowrap;
}

/* search becomes an icon at every width, as in the approved header */
html.waqit-on .store-header .search-bar {
  display: none !important;
}

html.waqit-on .store-header .search-item {
  display: list-item !important;
}

html.waqit-on .store-header .header-btn,
html.waqit-on .store-header .mburger,
html.waqit-on .store-header .header-btn i,
html.waqit-on .store-header .mburger i,
html.waqit-on .store-header salla-cart-summary,
html.waqit-on .store-header salla-cart-summary i {
  color: var(--wq-parchment);
  background-color: transparent;
}

html.waqit-on .store-header .s-cart-summary-total {
  display: none;
}

html.waqit-on .store-header .s-cart-summary-count {
  background-color: var(--wq-gold);
  color: var(--wq-deep);
}

/* home page: the header sits over the hero and turns solid once pinned on scroll */
html.waqit-on body.index .store-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: 0;
  background-color: transparent;
}

html.waqit-on body.index .store-header .main-nav-container:not(.fixed-pinned) {
  background-color: transparent;
  border-bottom: 1px solid rgba(244, 236, 221, 0.18);
}

html.waqit-on body.index .store-header .main-nav-container.fixed-pinned {
  background-color: var(--wq-deep);
}

/* ---------- Home page: Click's own blocks give way to the WAQIT sections ---------- */
html.waqit-on body.index {
  background-color: var(--wq-parchment);
}

html.waqit-on body.index .hero-area,
html.waqit-on body.index #main-content > section.s-block--latest-products {
  display: none !important;
}

#waqit-home {
  color: var(--wq-brown);
}

#waqit-home *,
#waqit-home *::before,
#waqit-home *::after {
  box-sizing: border-box;
}

#waqit-home h2,
#waqit-home h3 {
  font-family: var(--wq-display);
  margin: 0;
}

#waqit-home p {
  margin: 0;
}

#waqit-home .wq-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 10px;
  padding-right: 10px;
}

/* Small Latin labels: letter-spacing is safe because the text is Latin */
#waqit-home .wq-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

#waqit-home .wq-eyebrow--sub {
  margin-bottom: 20px;
  font-size: 10px;
  opacity: 0.8;
}

#waqit-home .wq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 28px;
  border: 1px solid rgba(244, 236, 221, 0.7);
  border-radius: 4px;
  background-color: rgba(26, 18, 12, 0.25);
  color: var(--wq-parchment);
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

#waqit-home .wq-btn:hover {
  background-color: var(--wq-parchment);
  color: var(--wq-deep);
}

#waqit-home .wq-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

[dir="ltr"] #waqit-home .wq-btn i,
[dir="ltr"] #waqit-home .wq-link i {
  transform: rotate(180deg);
}

@keyframes wq-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 01 Hero ---------- */
#waqit-home .wq-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  min-height: clamp(30rem, 168vw, 42rem);
  background-color: var(--wq-deep);
  color: var(--wq-parchment);
}

#waqit-home .wq-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

#waqit-home .wq-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 0;
}

#waqit-home .wq-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(26, 18, 12, 0.82) 0%, rgba(26, 18, 12, 0.5) 30%, rgba(26, 18, 12, 0) 58%);
}

#waqit-home .wq-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 6rem;
  padding-bottom: 2.5rem;
}

#waqit-home .wq-hero__text {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  animation: wq-rise 0.9s var(--wq-ease) both;
}

/* phones show the brand once, in the header */
#waqit-home .wq-hero__text .wq-eyebrow {
  display: none;
  color: var(--wq-parchment);
}

#waqit-home .wq-hero__title {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--wq-parchment);
}

#waqit-home .wq-hero__subtitle {
  margin-top: 4px;
  margin-bottom: 24px;
  font-size: 18px;
  line-height: 1.9;
  color: rgba(244, 236, 221, 0.9);
}

/* ---------- 02 Collection beside 03 ingredients panel ---------- */
#waqit-home .wq-collection__grid {
  display: grid;
}

#waqit-home .wq-collection__main {
  min-width: 0;
  padding: 40px 16px 32px;
  background-color: var(--wq-engraving-base);
  background-image: var(--wq-engraving, none);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

#waqit-home .wq-collection__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  text-align: center;
}

#waqit-home .wq-collection__head .wq-eyebrow {
  color: var(--wq-brown);
}

#waqit-home .wq-collection__title {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--wq-deep);
}

#waqit-home .wq-collection__head .wq-link {
  color: var(--wq-brown);
}

#waqit-home .wq-collection__head .wq-link:hover {
  color: var(--wq-gold-deep);
}

#waqit-home .wq-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 20rem;
  background-color: var(--wq-deep);
  color: var(--wq-parchment);
}

#waqit-home .wq-panel__media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#waqit-home .wq-panel::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(26, 18, 12, 0.82) 0%, rgba(26, 18, 12, 0.35) 60%, rgba(26, 18, 12, 0.2) 100%);
}

#waqit-home .wq-panel__text {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 48px 16px;
}

#waqit-home .wq-panel .wq-eyebrow {
  color: var(--wq-parchment);
}

#waqit-home .wq-panel__title {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--wq-parchment);
}

#waqit-home .wq-panel__body {
  max-width: 16rem;
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 18px;
  line-height: 1.9;
  color: rgba(244, 236, 221, 0.9);
}

#waqit-home .wq-panel .wq-link {
  font-size: 16px;
  color: var(--wq-parchment);
}

#waqit-home .wq-panel .wq-link:hover {
  color: var(--wq-gold);
}

/* Salla's native product list and Click's native product cards, restyled inside the collection only */
#waqit-home salla-products-list {
  display: block;
}

#waqit-home .s-products-list-wrapper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 16px;
  margin: 0;
}

#waqit-home custom-salla-product-card.product-entry {
  height: auto;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  overflow: visible;
}

#waqit-home .product-entry .product-options:empty {
  display: none;
}

#waqit-home .product-entry__image {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  aspect-ratio: 6 / 7;
  flex: none;
  overflow: hidden;
  border-radius: 4px;
  background-color: rgba(217, 198, 165, 0.5);
}

#waqit-home .product-entry__image > a {
  display: block;
  height: 100%;
}

#waqit-home .product-entry__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--wq-ease), opacity 0.5s;
}

#waqit-home .product-entry:hover .product-entry__image img {
  transform: scale(1.03);
}

#waqit-home .product-entry .content-wrap {
  padding: 0;
  background: transparent;
}

/* name and price on one side, compact cart button on the other */
#waqit-home .product-entry__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 0 0;
  text-align: start;
}

#waqit-home .product-entry__content > * {
  grid-column: 1;
}

#waqit-home .product-entry__title {
  font-family: var(--wq-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--wq-deep);
  text-decoration: none;
}

#waqit-home .product-entry__title:hover {
  color: var(--wq-gold-deep);
}

#waqit-home .product-entry__subtitle {
  display: none;
}

#waqit-home .product-entry .price-wrapper,
#waqit-home .product-entry .price-wrapper span {
  font-size: 14px;
  font-weight: 400;
  color: var(--wq-brick);
}

#waqit-home .product-entry .price-wrapper .regular-price {
  opacity: 0.6;
  text-decoration: line-through;
}

#waqit-home .product-entry .add-to-cart-conatiner {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* in stock: icon-only square button; the label stays in the markup for screen readers */
#waqit-home .product-entry:not(.out-of-stock):not(.out) .add-to-cart-conatiner salla-add-product-button {
  display: block;
  width: 44px;
}

#waqit-home .product-entry:not(.out-of-stock):not(.out) .add-to-cart-conatiner .s-button-element {
  width: 44px;
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(42, 29, 20, 0.6);
  border-radius: 4px;
  background-color: transparent;
  color: var(--wq-deep);
}

#waqit-home .product-entry:not(.out-of-stock):not(.out) .add-to-cart-conatiner .s-button-element:hover {
  background-color: var(--wq-brown);
  color: var(--wq-parchment);
}

#waqit-home .product-entry:not(.out-of-stock):not(.out) .add-to-cart-conatiner .s-button-text > span {
  font-size: 0;
  gap: 0;
}

#waqit-home .product-entry:not(.out-of-stock):not(.out) .add-to-cart-conatiner .s-button-text i {
  font-size: 20px;
}

/* sold out (from Salla inventory): the native state button sits under the name, full width */
#waqit-home .product-entry.out-of-stock .add-to-cart-conatiner,
#waqit-home .product-entry.out .add-to-cart-conatiner {
  grid-column: 1 / -1;
  grid-row: auto;
  margin-top: 12px;
}

#waqit-home .product-entry.out-of-stock .product-entry__image img {
  filter: grayscale(0.6);
  opacity: 0.75;
}

/* ---------- 04 Tamara strip: edge to edge, artwork shown as supplied ---------- */
#waqit-home .wq-tamara__banner {
  display: block;
}

#waqit-home .wq-tamara__banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

/* ---------- 05 Purple mountain: the last section of the home page ---------- */
#waqit-home .wq-feature {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  min-height: clamp(30rem, 172vw, 43rem);
  background-color: var(--wq-night);
  color: var(--wq-parchment);
}

#waqit-home .wq-feature__media {
  position: absolute;
  top: 11rem;
  right: 0;
  bottom: 0;
  left: 0;
}

#waqit-home .wq-feature__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 100%;
}

#waqit-home .wq-feature::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, #0B0710 0, #0B0710 11rem, rgba(11, 7, 16, 0) 19rem);
}

#waqit-home .wq-feature__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 48px;
  padding-bottom: 40px;
}

#waqit-home .wq-feature__text {
  max-width: 32rem;
}

#waqit-home .wq-feature .wq-eyebrow {
  color: var(--wq-parchment);
}

#waqit-home .wq-feature__title {
  margin-bottom: 24px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--wq-parchment);
}

/* the mountain closes the page: the footer follows it directly */
html.waqit-on body.index .footer-wrapper,
html.waqit-on body.index .store-footer {
  margin-top: 0;
}

/* ---------- Footer: dark, as approved ---------- */
html.waqit-on .store-footer {
  background-color: var(--wq-deep);
  color: var(--wq-sand);
}

html.waqit-on .store-footer .store-footer__inner {
  background-color: var(--wq-brown);
}

html.waqit-on .store-footer .store-footer__info-bar {
  background-color: var(--wq-deep);
  border-color: rgba(217, 198, 165, 0.1);
}

html.waqit-on .store-footer h3 {
  color: var(--wq-gold);
}

html.waqit-on .store-footer a {
  color: inherit;
  transition: color 0.3s;
}

html.waqit-on .store-footer a:hover {
  color: var(--wq-gold);
}

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  #waqit-home .wq-container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (min-width: 768px) {
  #waqit-home .wq-hero {
    align-items: center;
    min-height: clamp(34rem, 56vw, 52rem);
  }

  /* the scene fills the side opposite the copy and fades into the dark surface */
  #waqit-home .wq-hero__media {
    left: 30%;
  }

  [dir="ltr"] #waqit-home .wq-hero__media {
    left: 0;
    right: 30%;
  }

  #waqit-home .wq-hero__media img {
    object-position: center;
  }

  #waqit-home .wq-hero::after {
    background:
      linear-gradient(to bottom, rgba(26, 18, 12, 0.55) 0%, rgba(26, 18, 12, 0) 24%),
      linear-gradient(to right, #1A120C 0%, #1A120C 30%, rgba(26, 18, 12, 0) 56%);
  }

  [dir="ltr"] #waqit-home .wq-hero::after {
    background:
      linear-gradient(to bottom, rgba(26, 18, 12, 0.55) 0%, rgba(26, 18, 12, 0) 24%),
      linear-gradient(to left, #1A120C 0%, #1A120C 30%, rgba(26, 18, 12, 0) 56%);
  }

  #waqit-home .wq-hero__inner {
    padding-top: 9rem;
    padding-bottom: 9rem;
  }

  /* the approved layout sets the copy on the far side from the reading start */
  #waqit-home .wq-hero__text {
    margin-left: 0;
    margin-right: auto;
    text-align: left;
  }

  [dir="ltr"] #waqit-home .wq-hero__text {
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }

  #waqit-home .wq-hero__text .wq-eyebrow {
    display: block;
  }

  #waqit-home .wq-hero__title {
    font-size: 48px;
  }

  #waqit-home .wq-hero__subtitle {
    margin-bottom: 32px;
    font-size: 24px;
  }

  #waqit-home .wq-collection__main {
    padding: 48px 40px;
  }

  #waqit-home .wq-panel__text {
    padding: 40px;
  }

  #waqit-home .wq-tamara__banner img {
    aspect-ratio: 5 / 1;
  }

  #waqit-home .wq-feature {
    align-items: center;
    min-height: clamp(26rem, 50vw, 48rem);
  }

  /* the mountain fills the side opposite the copy */
  #waqit-home .wq-feature__media {
    top: 0;
    right: 32%;
  }

  [dir="ltr"] #waqit-home .wq-feature__media {
    right: 0;
    left: 32%;
  }

  #waqit-home .wq-feature__media img {
    object-position: 30% 60%;
  }

  #waqit-home .wq-feature::after {
    background: linear-gradient(to left, #0B0710 0%, #0B0710 34%, rgba(11, 7, 16, 0) 62%);
  }

  [dir="ltr"] #waqit-home .wq-feature::after {
    background: linear-gradient(to right, #0B0710 0%, #0B0710 34%, rgba(11, 7, 16, 0) 62%);
  }

  #waqit-home .wq-feature__inner {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

@media (min-width: 1024px) {
  html.waqit-on .wq-wordmark {
    font-size: 36px;
  }

  #waqit-home .wq-hero__title {
    font-size: 60px;
  }

  /* the ingredients panel is ordered first, so in RTL it takes the narrow track on the right */
  #waqit-home .wq-collection__grid {
    grid-template-columns: 3fr 7fr;
  }

  #waqit-home .wq-panel {
    order: -1;
  }

  #waqit-home .wq-panel__text {
    align-self: flex-end;
    padding-bottom: 64px;
  }

  #waqit-home .wq-collection__main {
    padding-left: 48px;
    padding-right: 48px;
  }

  #waqit-home .wq-collection__head {
    flex-direction: row-reverse;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
  }

  [dir="ltr"] #waqit-home .wq-collection__head {
    text-align: right;
  }

  #waqit-home .wq-collection__head .wq-link {
    flex-shrink: 0;
    padding-bottom: 12px;
  }

  #waqit-home .wq-collection__title {
    font-size: 48px;
  }

  #waqit-home .wq-feature__title {
    font-size: 48px;
  }
}

/* ---------- Phones: a touch-scrolled row with a little more than two cards in view ---------- */
@media (max-width: 639px) {
  #waqit-home .s-products-list-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
  }

  #waqit-home .s-products-list-wrapper::-webkit-scrollbar {
    display: none;
  }

  #waqit-home .s-products-list-wrapper > * {
    flex: 0 0 45%;
    scroll-snap-align: start;
  }

  #waqit-home .wq-collection__main {
    background-size: 220% auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #waqit-home *,
  #waqit-home *::before,
  #waqit-home *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}