/* Fargah Design Studio — premium polish layer (mockup-aligned) */

:root {
  --studio-gold: #C5A46E;
  --studio-gold-hover: #B08D4F;
  --studio-cream: #F8F5F0;
  --studio-ink: #1C1B19;
  --header-height: 88px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header overlay on homepage */
.fargah-header--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-stone) 65%, transparent) !important;
}

[data-theme="dark"] .fargah-header--overlay {
  background: color-mix(in srgb, var(--bg-primary) 78%, transparent) !important;
  border-bottom-color: color-mix(in srgb, var(--accent-gold) 25%, transparent) !important;
}

.fargah-header--overlay .fargah-nav > li > a { color: var(--text-secondary); }
.fargah-header--overlay.fargah-header--scrolled {
  position: sticky;
  background: var(--bg-primary) !important;
}

.fargah-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: var(--header-height);
  gap: 24px;
}

.fargah-header nav {
  justify-self: center;
}

.fargah-nav {
  gap: 22px !important;
}

.fargah-nav > li > a {
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.fargah-logo__studio {
  font-size: 0.68rem !important;
  letter-spacing: 0.18em !important;
  color: var(--studio-gold) !important;
}

.fargah-logo__fa { display: none; }

/* Buttons — mockup pill style */
.btn-fargah {
  border-radius: 6px;
  padding: 11px 22px;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.btn-fargah--primary {
  background: linear-gradient(180deg, #D4B87A 0%, var(--studio-gold) 100%);
  box-shadow: 0 2px 8px rgba(197, 164, 110, 0.35);
}

.btn-fargah--primary:hover {
  background: linear-gradient(180deg, var(--studio-gold) 0%, var(--studio-gold-hover) 100%);
}

/* Combined hero — slideshow + studio intro */
.studio-hero-combined {
  position: relative;
  width: 100%;
  min-height: clamp(520px, 78vh, 640px);
  background: #0c0c0c;
  overflow: hidden;
  user-select: none;
}

.studio-hero-combined__media {
  position: absolute;
  inset: 0;
}

.studio-hero-combined__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(248, 245, 240, 0.98) 0%,
    rgba(248, 245, 240, 0.94) 22%,
    rgba(248, 245, 240, 0.72) 34%,
    rgba(248, 245, 240, 0.28) 48%,
    rgba(248, 245, 240, 0.06) 58%,
    transparent 72%
  );
}

[dir="ltr"] .studio-hero-combined__shade {
  background: linear-gradient(
    to right,
    rgba(248, 245, 240, 0.98) 0%,
    rgba(248, 245, 240, 0.94) 22%,
    rgba(248, 245, 240, 0.72) 34%,
    rgba(248, 245, 240, 0.28) 48%,
    rgba(248, 245, 240, 0.06) 58%,
    transparent 72%
  );
}

[data-theme="dark"] .studio-hero-combined__shade {
  background: linear-gradient(
    to left,
    rgba(8, 8, 8, 0.96) 0%,
    rgba(8, 8, 8, 0.9) 24%,
    rgba(8, 8, 8, 0.55) 38%,
    rgba(8, 8, 8, 0.22) 52%,
    transparent 70%
  );
}

[dir="ltr"][data-theme="dark"] .studio-hero-combined__shade {
  background: linear-gradient(
    to right,
    rgba(8, 8, 8, 0.96) 0%,
    rgba(8, 8, 8, 0.9) 24%,
    rgba(8, 8, 8, 0.55) 38%,
    rgba(8, 8, 8, 0.22) 52%,
    transparent 70%
  );
}

.studio-hero-combined__frame {
  position: relative;
  z-index: 2;
  min-height: clamp(520px, 78vh, 640px);
  display: flex;
  align-items: flex-end;
  padding-bottom: 56px;
}

.studio-hero-combined__intro {
  max-width: min(520px, 46vw);
  padding: 24px 0 8px;
}

.studio-hero-combined__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--studio-gold);
}

.studio-hero-combined__stage {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(62%, 920px);
  z-index: 3;
  pointer-events: none;
}

.studio-hero-combined__stage .fargah-hero-slider__arrow,
.studio-hero-combined__stage .fargah-hero-slider__footer {
  pointer-events: auto;
}

.studio-hero-combined .fargah-hero-slider__viewport,
.studio-hero-combined .fargah-hero-slider__track {
  height: 100%;
}

.fargah-hero-slider__viewport {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.fargah-hero-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.fargah-hero-slider__slide {
  flex: 0 0 100%;
  height: 100%;
  min-height: clamp(520px, 78vh, 640px);
  background-repeat: no-repeat;
  background-position: center center;
}

.fargah-hero-slider__slide--cover {
  background-size: cover;
}

.fargah-hero-slider__slide--contain {
  background-size: contain;
  background-color: #0c0c0c;
}

.fargah-hero-slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.42);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.studio-hero-combined:hover .fargah-hero-slider__arrow,
.studio-hero-combined:focus-within .fargah-hero-slider__arrow {
  opacity: 1;
}

.fargah-hero-slider__arrow:hover {
  background: rgba(197, 164, 110, 0.88);
  border-color: var(--studio-gold);
  transform: scale(1.06);
}

.fargah-hero-slider__arrow--prev { inset-inline-start: 20px; }
.fargah-hero-slider__arrow--next { inset-inline-end: 20px; }

[dir="rtl"] .fargah-hero-slider__arrow--prev svg { transform: scaleX(-1); }
[dir="rtl"] .fargah-hero-slider__arrow--next svg { transform: scaleX(-1); }

.fargah-hero-slider__footer {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
}

.fargah-hero-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px 10px;
  pointer-events: auto;
}

.fargah-hero-slider__dot {
  width: 28px;
  height: 3px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.3s ease, background 0.25s ease;
}

.fargah-hero-slider__dot.is-active {
  width: 44px;
  background: var(--studio-gold);
}

.fargah-hero-slider__dot:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.6);
}

.fargah-hero-slider__progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.fargah-hero-slider__progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--studio-gold) 0%, #E8D4A8 100%);
  transition: width 0.1s linear;
}

.studio-hero-combined.is-paused .fargah-hero-slider__progress-bar {
  opacity: 0.55;
}

.studio-hero__eyebrow {
  display: inline-block;
  color: var(--studio-gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.studio-hero__title {
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  font-weight: 800;
  line-height: 1.28;
  color: var(--studio-ink);
  margin-bottom: 18px;
}

[data-theme="dark"] .studio-hero-combined__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 55% at 75% 40%,
    rgba(212, 175, 90, 0.12),
    transparent 65%
  );
}

[data-theme="dark"] .studio-hero__title { color: #FFFFFF; }

.studio-hero__subtitle {
  font-size: 1rem;
  line-height: 1.95;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
}

[data-theme="dark"] .studio-hero__subtitle { color: #D8D1C4; }

.studio-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.studio-hero__ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--studio-ink);
  margin-bottom: 28px;
}

[data-theme="dark"] .studio-hero__ghost-link { color: #E8E2D8; }

.studio-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-hero__chip {
  font-size: 0.75rem;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--accent-stone);
  border-radius: 6px;
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .studio-hero__chip {
  background: rgba(22, 22, 22, 0.75);
  border-color: rgba(214, 180, 109, 0.35);
  color: #D8D1C4;
}

/* Trust strip — minimal like mockup */
.trust-strip {
  margin-top: 0;
  padding: 0 0 56px;
  background: var(--bg-primary);
}

.trust-strip__panel {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 32px 0 0;
  border-top: 1px solid var(--accent-stone);
}

.trust-strip__grid {
  gap: 32px;
}

.trust-strip__icon {
  background: transparent !important;
  border: 1px solid var(--studio-gold);
  color: var(--studio-gold) !important;
  font-size: 0.75rem !important;
  font-weight: 700;
}

.trust-strip__footer { display: none; }

/* Section titles — editorial */
.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-intro .gold-divider { margin-left: auto; margin-right: auto; }

/* Path cards — mockup style */
.card-premium {
  border-radius: 14px;
  border: none;
  box-shadow: 0 2px 18px rgba(84, 65, 42, 0.05);
}

.card-premium__number {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
  background: var(--bg-surface);
}

.card-premium__image { aspect-ratio: 16/10; }

.card-premium__title {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Category compact grid like mockup */
.category-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.category-tile {
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.category-tile:hover,
.category-tile:focus-visible {
  transform: translateY(-4px);
}

.category-tile__img {
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-sanjab-cream-light) 50%, var(--bg-sanjab-cream));
  border: none;
  margin-bottom: 10px;
  box-shadow: 0 2px 14px rgba(84, 65, 42, 0.05);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.category-tile:hover .category-tile__img,
.category-tile:focus-visible .category-tile__img {
  box-shadow: 0 10px 24px rgba(84, 65, 42, 0.09);
  transform: translateY(-2px);
}

.category-tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-tile:hover .category-tile__img img,
.category-tile:focus-visible .category-tile__img img {
  transform: scale(1.08);
}

.category-tile__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.25s ease;
}

.category-tile:hover .category-tile__label,
.category-tile:focus-visible .category-tile__label {
  color: var(--accent-gold-text);
}

@media (max-width: 1200px) {
  .category-mosaic { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
  .category-mosaic { grid-template-columns: repeat(2, 1fr); }
  .fargah-nav { display: none !important; }
  .studio-hero-combined__intro { max-width: 100%; }
}

/* Collapse homepage noise */
.home-secondary { opacity: 1; }
.home-secondary .section-padding { padding: 72px 0; }

/* Hide old split hero if present */
.fargah-hero-split { display: none; }
.fargah-logo__mark-img {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

[data-theme="dark"] .fargah-logo__mark-img {
  filter: drop-shadow(0 1px 4px rgba(212, 184, 90, 0.25));
}


/* Logo — image only */
.fargah-logo--image-only .fargah-logo__text { display: none !important; }
.fargah-logo__brand { width: auto; max-width: 300px; height: 56px; object-fit: contain; }

/* Header tools */
.header-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--accent-stone);
  border-radius: 8px; background: var(--bg-elevated); color: var(--text-primary);
  position: relative; text-decoration: none;
}
.header-icon-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold-text); }
.header-auth-link { font-size: 0.82rem; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.header-auth-link--signup { color: var(--accent-gold-text); font-weight: 600; }
.header-cart__badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--accent-gold); color: #fff; font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.header-search-panel {
  border-top: 1px solid var(--accent-stone); background: var(--bg-elevated);
  padding: 12px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.header-search-form { display: flex; gap: 12px; }
.header-search-form .form-control { flex: 1; }

@media (max-width: 1024px) {
  .studio-hero-combined,
  .studio-hero-combined__frame,
  .fargah-hero-slider__slide {
    min-height: clamp(460px, 72vh, 560px);
  }

  .studio-hero-combined__intro {
    max-width: min(480px, 52vw);
  }

  .studio-hero-combined__stage {
    width: 58%;
  }
}

@media (max-width: 768px) {
  .studio-hero-combined {
    margin-top: 0;
    padding-top: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
  }

  .studio-hero-combined__media {
    position: relative;
    height: clamp(220px, 46vw, 300px);
    flex-shrink: 0;
  }

  .studio-hero-combined__shade {
    background: linear-gradient(to top, rgba(8, 8, 8, 0.42), transparent 55%);
  }

  [data-theme="dark"] .studio-hero-combined__shade {
    background: linear-gradient(to top, rgba(8, 8, 8, 0.55), transparent 60%);
  }

  .studio-hero-combined__frame {
    min-height: 0;
    padding: 28px 0 20px;
    align-items: stretch;
    order: 2;
  }

  .studio-hero-combined__intro {
    max-width: 100%;
    padding: 0;
  }

  .studio-hero-combined__stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: clamp(220px, 46vw, 300px);
    order: 1;
  }

  .fargah-hero-slider__slide {
    min-height: clamp(220px, 46vw, 300px);
    height: clamp(220px, 46vw, 300px);
  }

  .fargah-hero-slider__arrow {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    opacity: 1;
  }

  .fargah-hero-slider__arrow--prev { inset-inline-start: 10px; }
  .fargah-hero-slider__arrow--next { inset-inline-end: 10px; }

  .fargah-hero-slider__dots {
    padding: 10px 12px 8px;
    gap: 6px;
  }

  .studio-hero__title {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
  }

  .studio-hero__subtitle {
    font-size: 0.94rem;
    line-height: 1.75;
    margin-bottom: 24px;
  }

  .studio-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .studio-hero__actions .btn-fargah {
    width: 100%;
    justify-content: center;
  }

  .studio-hero__chips {
    gap: 6px;
  }

  .studio-hero__chip {
    font-size: 0.7rem;
    padding: 6px 10px;
  }
}

@media (max-width: 576px) {
  .fargah-hero-slider__dot {
    width: 20px;
  }

  .fargah-hero-slider__dot.is-active {
    width: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fargah-hero-slider__track {
    transition: none;
  }
}

.fargah-hero-slider__arrow:focus-visible,
.fargah-hero-slider__dot:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Image protection */
.protected-media { position: relative; user-select: none; -webkit-user-select: none; }
.protected-media img,
.gallery-main img {
  -webkit-user-drag: none; user-drag: none; pointer-events: none;
}
.protected-media::after,
.gallery-main::after {
  content: ""; position: absolute; inset: 0; z-index: 2; background: transparent; pointer-events: none;
}
.studio-hero-combined { user-select: none; }

/* Cart */
.cart-row {
  display: grid; grid-template-columns: 80px 1fr auto auto; gap: 16px;
  align-items: center; padding: 16px 0; border-bottom: 1px solid var(--accent-stone);
}
.cart-row__media img { width: 80px; height: 80px; object-fit: contain; background: #F5F0E8; border-radius: 8px; }
.search-page-form { display: flex; gap: 12px; max-width: 640px; }
.search-page-form .form-control { flex: 1; }
@media (max-width: 768px) {
  .cart-row { grid-template-columns: 64px 1fr; }
  .fargah-logo__brand { max-width: 220px; height: 46px; }
}
