/* Reversible market layout layer. Remove its link to restore the previous width. */
body.ms-php-market {
  overflow-x: clip;
  background:
    linear-gradient(90deg, rgba(7, 6, 5, .86), rgba(7, 6, 5, .73) 50%, rgba(7, 6, 5, .86)),
    url('../images/eastern-lattice.svg') center top / 96px 96px repeat,
    url('../../ThemeMetinsah/images/footer-bg.png') center top / cover fixed;
}

body.ms-php-market .shell {
  max-width: 1300px;
  border-inline: 1px solid rgba(223, 164, 58, .18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
}

/* The decorative label consumed navigation space when the shell was narrower. */
body.ms-php-market .navigation-label {
  display: none;
}

/* Keep featured cards legible without adding another enclosing frame. */
body.ms-php-market .market-featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ms-php-market .market-catalog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-height: none;
  overflow: visible;
}

/* The section heading already separates the catalog; a second panel frame adds clutter. */
body.ms-php-market .market-filters {
  margin-bottom: 22px;
  padding: 0 0 17px;
  border: 0;
  border-bottom: 1px solid rgba(223, 164, 58, .25);
  background: transparent;
}

body.ms-php-market .market-filter-links {
  max-height: none;
  overflow-y: visible;
}

@media (max-width: 1050px) {
  body.ms-php-market .market-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.ms-php-market .shell {
    border-inline: 0;
    box-shadow: none;
  }

  body.ms-php-market .market-featured-grid,
  body.ms-php-market .market-catalog-grid {
    grid-template-columns: 1fr;
  }

  body.ms-php-market .market-filters {
    padding-bottom: 13px;
  }
}

/* Campaign artwork: keep both characters in frame at each layout width. */
@media (min-width: 1101px) {
  body.ms-php-market .hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr);
  }

  body.ms-php-market .hero,
  body.ms-php-market .offer {
    height: clamp(340px, 26vw, 390px);
  }

  body.ms-php-market .offer > img {
    object-position: 92% center;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body.ms-php-market .hero-copy h1 {
    font-size: clamp(28px, 3.1vw, 38px);
  }

  body.ms-php-market .hero > img {
    object-position: 66% center;
  }

  body.ms-php-market .offer > img {
    object-position: 88% center;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  body.ms-php-market .hero-grid {
    grid-template-columns: 1fr;
  }

  body.ms-php-market .hero {
    height: clamp(310px, 38vw, 345px);
  }

  body.ms-php-market .offer {
    height: 230px;
  }

  body.ms-php-market .offer > img {
    object-position: center 36%;
  }

  body.ms-php-market .offer::after {
    background: linear-gradient(90deg, #130b06, rgba(19, 10, 4, .7) 36%, transparent 78%);
  }

  body.ms-php-market .offer-copy {
    right: auto;
    width: min(340px, 50%);
  }
}

@media (max-width: 760px) {
  body.ms-php-market .hero {
    height: clamp(300px, 83vw, 350px);
  }

  body.ms-php-market .hero > img {
    object-position: 78% center;
  }

  body.ms-php-market .hero-copy {
    width: min(290px, calc(100% - 44px));
  }

  body.ms-php-market .hero-copy h1 {
    font-size: clamp(26px, 6.8vw, 32px);
  }

  body.ms-php-market .hero-copy p {
    font-size: 11px;
  }
}

@media (max-width: 400px) {
  /* Yükseklik genişliğe oranlı: görsel tam sığar, 3 karakter de görünür, altta siyah boşluk kalmaz */
  body.ms-php-market .hero {
    height: clamp(230px, calc((100vw - 34px) / 1.285), 300px);
  }

  body.ms-php-market .hero > img {
    height: 100%;
    object-position: 78% center;
  }

  body.ms-php-market .hero::after {
    background: linear-gradient(0deg, #130b06, rgba(19, 11, 6, .94) 28%, rgba(19, 11, 6, .3) 72%, transparent);
  }

  body.ms-php-market .hero-copy {
    bottom: 20px;
  }
}

/* The login artwork is vertical; contain it instead of cropping it with cover. */
body.market-login-page .market-auth-story {
  background-color: #100905;
  background-image:
    linear-gradient(0deg, rgba(13, 8, 5, .97), rgba(13, 8, 5, .18) 76%),
    url('../images/loginform-bg.png?v=2');
  background-position: center, center top;
  background-size: cover, auto min(100%, 688px);
  background-repeat: no-repeat;
}

/* Mobile: compact artwork strip on top, short copy below it, login fields stay visible. */
@media (max-width: 760px) {
  body.market-login-page .market-auth-story {
    --story-art-h: clamp(170px, 52vw, 240px);
    position: relative;
    display: block;
    min-height: 0;
    /* Text stays clear of the inner gold frame (inset 15px) with a gap. */
    padding: calc(var(--story-art-h) + 14px) 30px 30px;
    background: #100905;
  }

  /* Full-width artwork like desktop; anchored at its top so the heads sit below the frame line. */
  body.market-login-page .market-auth-story::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: var(--story-art-h);
    background:
      linear-gradient(0deg, #100905 0, rgba(16, 9, 5, 0) 60%),
      url('../images/loginform-bg.png?v=2') center top / cover no-repeat;
    content: "";
    pointer-events: none;
  }

  body.market-login-page .market-auth-story > div {
    max-width: none;
  }

  body.market-login-page .market-auth-story .eyebrow {
    font-size: 9px;
  }

  body.market-login-page .market-auth-story h2 {
    margin: 6px 0 6px;
    font-size: clamp(19px, 5.4vw, 23px);
    line-height: 1.15;
  }

  body.market-login-page .market-auth-story p {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
  }

  body.market-login-page .market-auth-panel {
    padding: 22px 20px;
  }

  body.market-login-page .market-auth-panel .page-title {
    font-size: clamp(24px, 7vw, 28px);
  }
}

@media (max-width: 400px) {
  body.market-login-page .market-auth-story {
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* Mobil: "Tarzını Konuştur" kartı. Buton alta inmesin, yazının yanında kalsın; bant ince olsun, karakter görünsün */
@media (max-width: 760px) {
  body.ms-php-market .offer {
    height: 250px;
  }
}

@container (max-width: 390px) {
  body.ms-php-market .offer .offer-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 12px 14px 14px;
  }

  body.ms-php-market .offer .offer-copy h2 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.2;
  }

  body.ms-php-market .offer .offer-copy p {
    font-size: 12px;
    line-height: 1.4;
  }

  body.ms-php-market .offer .offer-copy .offer-link {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
    padding: 8px 10px;
    font-size: 9px;
    gap: 6px;
  }
}

/* Nesne Depom sayfası: 3 adımlı yönlendirme kartları */
.depot-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 26px; }
.depot-step { position: relative; padding: 24px 20px 22px; border: 1px solid var(--line); background: rgba(10, 6, 3, .45); }
.depot-step-num { position: absolute; top: 14px; right: 16px; color: rgba(223, 164, 58, .35); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.depot-step-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 0 16px; border: 1px solid var(--line); background: rgba(223, 164, 58, .1); color: var(--gold2); font-size: 20px; }
.depot-step h3 { margin: 0 0 8px; color: var(--cream); font-size: 16px; line-height: 1.3; }
.depot-step p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
@media (max-width: 860px) { .depot-steps { grid-template-columns: 1fr; } }

/* Hata sayfası (Market/Error): sebep listesi */
body.ms-php-market .mm-result .mm-reasons { max-width: 440px; margin: 26px auto 0; padding: 0 0 0 20px; text-align: left; color: var(--muted); font-size: 14px; line-height: 1.6; }
body.ms-php-market .mm-result .mm-reasons li { margin: 0 0 8px; padding-left: 4px; }
body.ms-php-market .mm-result .mm-reasons li::marker { color: var(--gold); }
body.ms-php-market .mm-result .mm-note { max-width: 440px; margin: 18px auto 0; padding-top: 16px; border-top: 1px solid var(--line); color: #b9a98f; font-size: 13px; line-height: 1.6; text-align: left; }

/* Nesne Depom: eşya listesi varsa kartlarla arasında boşluk */
body.ms-php-market .mini-item + .depot-steps { margin-top: 26px; }
