/* Mashaer homepage sections — match https://mashaer.store/ */

:root {
  --home-cream: #f8f4ed;
  --home-ink: #181613;
  --home-muted: #6f6a61;
  --home-gold: #c19d60;
  --home-primary: #3b2b22;
  --home-secondary: #a89078;
  --home-line: rgba(24, 22, 19, 0.12);
  --home-card-border: #ece3d2;
  --home-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.mashaer-home {
  color: var(--home-ink);
  overflow: hidden;
}

.mashaer-home__hero {
  content-visibility: visible;
}

.text-gold { color: var(--home-gold) !important; }
.text-primary-m { color: var(--home-primary) !important; }
.text-secondary-m { color: var(--home-secondary) !important; }

/* —— Hero —— */
.mashaer-home__hero {
  height: 100svh;
  min-height: 100svh;
  width: 100%;
  position: relative;
  display: block;
  color: #fff;
  margin: 0;
  padding: 0;
  background: #181613;
  overflow: hidden;
  flex-shrink: 0;
}

.mashaer-home__hero > a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  line-height: 0;
}

.mashaer-home__hero picture {
  display: block;
  width: 100%;
  height: 100%;
}

.mashaer-home__hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* —— Shared section —— */
.mashaer-section {
  padding: 92px max(20px, calc(50vw - 615px));
  position: relative;
  z-index: 1;
  scroll-margin-top: 96px;
}

.mashaer-section--white {
  background: #faf6ef;
}

.mashaer-section--cream {
  background: #f5efe6;
}

.mashaer-home__kicker {
  margin: 0 0 9px;
  color: var(--home-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mashaer-section__heading {
  width: min(100%, 760px);
  margin: 0 auto 44px;
  text-align: center;
}

.mashaer-section__heading h2 {
  margin: 0;
  color: var(--home-ink);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.13;
  font-weight: 400;
}

.mashaer-section__heading p:not(.mashaer-home__kicker) {
  margin: 12px 0 0;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.8;
}

/* —— Products —— */
.mashaer-products {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 16px 0;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .mashaer-products { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px) {
  .mashaer-products { padding-left: 32px; padding-right: 32px; }
}

.mashaer-products__intro {
  text-align: center;
  margin-bottom: 40px;
  margin-top: 40px;
}

.mashaer-products__eyebrow {
  margin: 0 0 12px;
  color: var(--home-gold);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mashaer-products__intro h2 {
  margin: 0;
  color: var(--home-primary);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .mashaer-products__intro h2 { font-size: 36px; }
}

.mashaer-products__rule {
  width: 48px;
  height: 1px;
  background: var(--home-gold);
  margin: 20px auto 0;
}

.mashaer-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 0 40px;
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mashaer-filters::-webkit-scrollbar { display: none; }

.mashaer-filter-btn {
  flex-shrink: 0;
  box-sizing: border-box;
  contain: layout;
  min-width: 92px;
  min-height: 42px;
  padding: 12px 0;
  border: 0.8px solid #e7ddd0;
  background: #fff;
  color: #6e5744;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  border-radius: 0;
}

.mashaer-filter-btn:hover {
  border-color: var(--home-gold);
  color: var(--home-primary);
}

.mashaer-filter-btn.is-active {
  border-color: var(--home-primary);
  background: var(--home-primary);
  color: #fff;
  /* Selected filter is inert; don't keep advertising it as clickable. */
  cursor: default;
}

.mashaer-filter-btn:disabled {
  cursor: default;
}

.mashaer-products__more {
  margin: 8px 0 40px;
  text-align: center;
}

.mashaer-products__more-link {
  display: inline-block;
  min-width: 160px;
  text-decoration: none;
}

.mashaer-products__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .mashaer-products__grid { gap: 24px; }
}

@media (min-width: 768px) {
  .mashaer-products__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .mashaer-products__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.mashaer-products__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--home-muted);
  display: none;
}

.mashaer-products__empty.is-visible { display: block; }

.mashaer-products__empty .material-symbols-outlined {
  font-size: 40px;
  color: #cbb9a4;
  display: block;
  margin-bottom: 12px;
}

/* —— Product card —— */
.mashaer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: right;
  background: #fff;
  border: 0.8px solid var(--home-card-border);
  border-radius: 0;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 0;
  transition: border-color 0.5s var(--home-ease), box-shadow 0.5s var(--home-ease),
    opacity 0.18s var(--home-ease), transform 0.18s var(--home-ease);
}

html[dir="ltr"] .mashaer-card,
body.ltr .mashaer-card { text-align: left; }

.mashaer-card:hover {
  border-color: var(--home-gold);
  box-shadow: rgba(59, 43, 34, 0.22) 0 10px 26px -16px;
}

.mashaer-card.is-oos {
  border-color: #e8d8d2;
  opacity: 0.9;
}

.mashaer-card.is-oos:hover {
  border-color: #e8d8d2;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 0;
}

.mashaer-card.is-hidden {
  display: none;
}

.mashaer-card__media {
  display: block;
  position: relative;
  overflow: hidden;
  background: #faf6ef;
  text-decoration: none;
  color: inherit;
}

.mashaer-card__media-inner {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mashaer-card__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.7s var(--home-ease);
}

.mashaer-card:hover .mashaer-card__media img {
  transform: scale(1.05);
}

.mashaer-card__media img.is-oos {
  filter: grayscale(1);
  opacity: 0.7;
}

.mashaer-card__oos-veil {
  position: absolute;
  inset: 0;
  background: rgba(247, 239, 229, 0.3);
  pointer-events: none;
}

.mashaer-card__oos-badge {
  position: absolute;
  inset-inline: 12px;
  top: 12px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.mashaer-card__oos-badge > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: #3b2b22;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 10px 24px rgba(59, 43, 34, 0.18);
}

.mashaer-card__oos-badge > span > span {
  display: inline-flex;
  align-items: center;
}

.mashaer-card__oos-badge .material-symbols-outlined {
  font-size: 14px;
}

.mashaer-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 0;
  @media (max-width: 450px) {
    padding: 8px 8px 0;
  }
}

@media (min-width: 640px) {
  .mashaer-card__body { padding-left: 20px; padding-right: 20px; }
}

.mashaer-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  text-transform: uppercase;
}

.mashaer-card__cat { color: #7a6230; }
.mashaer-card__size { color: #6e5744; }

.mashaer-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
  color: var(--home-primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

@media (min-width: 640px) {
  .mashaer-card__title { font-size: 15px; }
}

.mashaer-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.mashaer-card__title a:hover { color: var(--home-gold); }

.mashaer-card__subtitle {
  margin: 0;
  font-size: 11px;
  color: #6e5744;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

@media (min-width: 640px) {
  .mashaer-card__subtitle { font-size: 12px; }
}

.mashaer-card__footer {
  margin-top: auto;
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px dashed #f0e7dc;
  padding: 14px 0;
}

.mashaer-card__price {
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--home-primary);
}

@media (min-width: 640px) {
  .mashaer-card__price { font-size: 18px; }
}

.mashaer-card__price-old {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #9a836d;
  text-decoration: line-through;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  contain: layout;
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #3d2b1f;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(193, 157, 96, 0.18);
  transition: background-color 0.2s ease;
}

.cart-btn:hover { background: var(--home-gold); }
.cart-btn:disabled,
.cart-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.cart-btn svg,
.cart-btn .add-to-cart-progress {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* —— Niche / info —— */
.mashaer-info {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.mashaer-info__copy { max-width: 560px; }

.mashaer-info h2 {
  margin: 0;
  color: var(--home-ink);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.04;
  text-transform: uppercase;
}

.mashaer-info p {
  margin: 18px 0 0;
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.8;
  text-align: justify;
}

.mashaer-info__media {
  overflow: hidden;
  border-radius: 8px;
  background: #101010;
  box-shadow: rgba(0, 0, 0, 0.12) 0 18px 42px;
}

.mashaer-info__media img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* —— FAQ —— */
.mashaer-faq-list {
  width: min(100%, 820px);
  margin: 0 auto;
}

.mashaer-faq-list details {
  border-bottom: 1px solid var(--home-line);
}

.mashaer-faq-list details:first-child {
  border-top: 1px solid var(--home-line);
}

.mashaer-faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  color: #3e3932;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.mashaer-faq-list summary::-webkit-details-marker { display: none; }

.mashaer-faq-list summary .material-symbols-outlined {
  color: #8f897f;
  font-size: 22px;
  transition: transform 0.2s;
}

.mashaer-faq-list details[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}

.mashaer-faq-list details p,
.mashaer-faq-list__answer {
  margin: -6px 0 18px;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.8;
}

.mashaer-faq-list__answer > *:first-child { margin-top: 0; }
.mashaer-faq-list__answer > *:last-child { margin-bottom: 0; }

.mashaer-faq-list.is-hidden,
.mashaer-faq-dynamic__loading.is-hidden,
.mashaer-faq-dynamic__empty.is-hidden {
  display: none !important;
}

.mashaer-faq-dynamic__loading,
.mashaer-faq-dynamic__empty {
  width: min(100%, 820px);
  margin: 0 auto;
  text-align: center;
  color: var(--home-muted);
  font-size: 14px;
}

/* —— Reviews carousel —— */
.mashaer-dynamic-reviews__loading,
.mashaer-dynamic-reviews__empty {
  margin: 0;
  text-align: center;
  color: var(--home-muted);
  font-size: 14px;
}

.mashaer-dynamic-reviews__empty.is-hidden,
.mashaer-dynamic-reviews__loading.is-hidden,
.mashaer-carousel.is-hidden {
  display: none;
}

.mashaer-carousel {
  --carousel-visible: 1;
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
  box-sizing: border-box;
}

.mashaer-carousel--coverflow {
  --coverflow-card-width: clamp(292px, 38vw, 450px);
  --coverflow-depth: 2;
  --coverflow-x-step: 238;
  --coverflow-rotate-step: 11;
  --coverflow-scale-step: 0.13;
  --coverflow-opacity-step: 0.24;
  max-width: 1180px;
  padding: 0 58px;
}

.mashaer-carousel__viewport {
  overflow: hidden;
}

.mashaer-carousel--coverflow .mashaer-carousel__viewport {
  min-height: 350px;
  overflow: hidden;
  perspective: 980px;
  perspective-origin: center center;
}

.mashaer-carousel--coverflow .mashaer-carousel__track {
  position: relative;
  height: 330px;
  display: block;
  transform-style: preserve-3d;
}

.mashaer-carousel--coverflow .mashaer-carousel__slide {
  position: absolute;
  top: 18px;
  left: 50%;
  width: var(--coverflow-card-width);
  min-width: 0;
  height: auto;
  flex: 0 0 auto;
  transform-style: preserve-3d;
  transition: transform 0.62s var(--home-ease), opacity 0.35s, filter 0.35s;
  will-change: transform, opacity;
}

/* Before JS init: only the first card is visible (avoids stacked FOUC on PDP). */
.mashaer-carousel--coverflow:not(.is-ready):not(.is-single) .mashaer-carousel__slide:not(:first-child) {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.mashaer-carousel__btn {
  position: absolute;
  z-index: 1 !important;
  top: 50%;
  z-index: 150;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(193, 157, 96, 0.3);
  border-radius: 999px;
  background: #fff;
  color: var(--home-gold);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mashaer-carousel__btn:hover {
  background: var(--home-gold);
  color: #fff;
  border-color: var(--home-gold);
}

.mashaer-carousel__btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* One review: centered card, no carousel chrome / side padding. */
.mashaer-carousel--coverflow.is-single {
  padding-inline: 0;
  max-width: var(--coverflow-card-width);
}

.mashaer-carousel--coverflow.is-single .mashaer-carousel__btn {
  display: none !important;
}

.mashaer-carousel--coverflow.is-single .mashaer-carousel__slide {
  position: relative;
  top: 0;
  left: auto;
  width: 100%;
  transform: none !important;
  opacity: 1 !important;
}

.mashaer-carousel--coverflow.is-single .mashaer-carousel__viewport {
  min-height: 0;
  perspective: none;
}

.mashaer-carousel--coverflow.is-single .mashaer-carousel__track {
  height: auto;
}

.mashaer-carousel__btn svg {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

.mashaer-carousel__btn--prev { inset-inline-start: 4px; }
.mashaer-carousel__btn--next { inset-inline-end: 4px; }

[dir="rtl"] .mashaer-carousel__btn--prev svg,
.rtl .mashaer-carousel__btn--prev svg { transform: scaleX(-1); }

[dir="rtl"] .mashaer-carousel__btn--next svg,
.rtl .mashaer-carousel__btn--next svg { transform: scaleX(-1); }

.mashaer-impression {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 0;
  border-radius: 8px;
  padding: 24px 30px 20px;
  border: 1px solid rgba(193, 157, 96, 0.2);
  background:
    linear-gradient(rgba(255, 255, 255, 0.98), rgba(250, 246, 239, 0.98)),
    radial-gradient(circle at 50% 0, rgba(193, 157, 96, 0.16), transparent 42%);
  text-align: center;
  filter: saturate(0.92);
  box-sizing: border-box;
}

.mashaer-impression.is-active {
  border-color: rgba(193, 157, 96, 0.52);
  filter: saturate(1);
}

.mashaer-impression__product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  color: inherit;
  text-decoration: none;
  align-items: center;
}

.mashaer-impression__image {
  display: flex;
  width: 88px;
  height: 88px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 999px;
  background: #f5efe6;
  box-shadow:
    0 0 0 1px rgba(193, 157, 96, 0.42),
    0 12px 28px rgba(62, 41, 18, 0.12);
}

.mashaer-impression__image img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  margin: 0;
}

.mashaer-impression__product-name {
  max-width: 100%;
  color: var(--home-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.mashaer-impression > p {
  display: -webkit-box;
  flex: 0 1 auto;
  max-width: 34ch;
  margin: 0;
  overflow: hidden;
  color: #4f4031;
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.mashaer-impression > p::before {
  content: "\"";
  color: var(--home-gold);
  font-family: var(--mashaer-font-family);
  font-size: 18px;
  margin-inline-end: 2px;
}

.mashaer-impression > p::after {
  content: "\"";
  color: var(--home-gold);
  font-family: var(--mashaer-font-family);
  font-size: 18px;
  margin-inline-start: 2px;
}

.mashaer-impression__meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-top: 1px solid rgba(193, 157, 96, 0.22);
  padding-top: 14px;
}

.mashaer-impression__meta strong {
  color: #2f2418;
  font-size: 14px;
  line-height: 1.4;
}

.mashaer-impression__meta span {
  color: #b48846;
  font-size: 11px;
}

@media (max-width: 1024px) {
  .mashaer-info {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 960px) {
  .mashaer-carousel--coverflow {
    --coverflow-card-width: min(430px, 72vw);
    --coverflow-depth: 1;
    --coverflow-x-step: 206;
    --coverflow-rotate-step: 8;
    padding: 0 34px;
  }

  .mashaer-carousel--coverflow .mashaer-carousel__viewport { min-height: 342px; }
  .mashaer-carousel--coverflow .mashaer-carousel__track { height: 322px; }
}

@media (max-width: 720px) {
  .mashaer-home__hero {
    height: auto;
    min-height: 0;
  }

  .mashaer-home__hero > a,
  .mashaer-home__hero picture {
    height: auto;
  }

  .mashaer-home__hero-img {
    height: auto;
    aspect-ratio: 4 / 5;
    object-position: center top;
  }

  .mashaer-section {
    padding-top: 66px;
    padding-bottom: 66px;
  }
}

@media (max-width: 640px) {
  .mashaer-carousel--coverflow {
    /* Padding reserves arrow space; card uses full track width. */
    --coverflow-card-width: 100%;
    --coverflow-depth: 1;
    --coverflow-x-step: 72;
    --coverflow-rotate-step: 4;
    --coverflow-scale-step: 0.14;
    --coverflow-opacity-step: 0.4;
    width: 100%;
    max-width: 100%;
    padding: 0 36px;
    overflow: hidden;
  }

  .mashaer-carousel--coverflow .mashaer-carousel__viewport { min-height: 300px; }
  .mashaer-carousel--coverflow .mashaer-carousel__track { height: 280px; }
  .mashaer-carousel--coverflow .mashaer-carousel__slide { top: 8px; }

  .mashaer-carousel__btn { width: 34px; height: 34px; }
  .mashaer-carousel__btn svg { width: 18px; height: 18px; }
  .mashaer-carousel__btn--prev { inset-inline-start: 0; }
  .mashaer-carousel__btn--next { inset-inline-end: 0; }

  .mashaer-carousel--coverflow .mashaer-impression {
    padding: 16px 14px 14px;
  }

  .mashaer-carousel--coverflow .mashaer-impression__image {
    width: 68px;
    height: 68px;
  }

  .mashaer-carousel--coverflow .mashaer-impression__product-name { font-size: 15px; }
  .mashaer-carousel--coverflow .mashaer-impression > p {
    font-size: 13px;
    max-width: 28ch;
    -webkit-line-clamp: 5;
  }
}
