/* SuperNova marketplace */
.shop-header .header-main { min-height: 65px; }
body:has(.market-hero) .shop-header {
  width: min(calc(100% - 32px), 1280px); margin: 8px auto 0;
  border: 1px solid var(--line); border-radius: 17px; background: var(--surface);
  box-shadow: 0 6px 24px #160e2910; overflow: hidden;
}
body:has(.market-hero) .shop-header .wrap { width: calc(100% - 36px); }
body:has(.market-hero) .header-main { display: flex; justify-content: space-between; gap: 12px; }
body:has(.market-hero) .shop-nav { border-top: 1px solid var(--line); }
.market-hero { position: relative; isolation: isolate; overflow: hidden; text-align: center; }
.market-intro { position: relative; padding-block: clamp(46px, 6vw, 83px) 35px; }
.market-kicker { display: inline-flex; align-items: center; gap: .55em; padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font-size: .76rem; font-weight: 800; }
.market-kicker > span:first-child { color: var(--purple); }
.market-intro h1 { max-width: 880px; margin: 17px auto 8px; font-size: clamp(2.1rem, 5.2vw, 4.25rem); font-weight: 900; line-height: 1.24; }
.market-intro h1 em { display: inline-block; color: var(--purple); font-style: normal; }
[data-theme=dark] .market-intro h1 em { color: #b79aff; }
.market-intro > p { margin: 12px auto 23px; max-width: 42rem; color: var(--muted); font-size: clamp(.9rem, 1.5vw, 1.06rem); }
.market-orbit { position: absolute; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 22%, #8d65ff26, transparent 69%); }
.market-orbit i { position: absolute; width: 66%; height: 260px; inset-inline-start: 17%; top: 20px; border: 1px solid #9672ec2c; border-radius: 50%; transform: rotate(-9deg); }
.market-orbit i:nth-child(2) { transform: rotate(12deg) scale(1.25); }
.market-orbit i:nth-child(3) { transform: rotate(-16deg) scale(1.65); opacity: .55; }
.market-orbit span { position: absolute; color: #9e77ee; inset-inline-start: 17%; top: 33%; }
.market-orbit span:nth-of-type(2) { inset-inline-start: 84%; top: 23%; font-size: 1.5rem; }
.market-orbit span:nth-of-type(3) { inset-inline-start: 79%; top: 70%; font-size: .75rem; }
#hero-search .search-form { display: flex; max-width: 620px; width: 100%; margin: auto; background: var(--surface); border-radius: 14px; box-shadow: 0 8px 34px #5e35f21a; }
#hero-search .search-form input { min-width: 0; }
#hero-search .search-form button { display: inline-block; }
.category-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .82rem; font-weight: 700; cursor: pointer; }
.category-pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 4; }
.category-pill:hover, .category-pill[aria-pressed=true] { border-color: var(--purple); background: var(--soft); }
.market-feature { display: grid; grid-template-columns: 1fr minmax(240px, .9fr); overflow: hidden; border-radius: 23px; min-height: 270px; margin-block: 20px 35px; background: #19112d; color: #fff; }
.market-feature[hidden], .market-feature [hidden] { display: none; }
.feature-copy { position: relative; z-index: 1; padding: clamp(24px, 4vw, 46px); }
.feature-copy .market-kicker { border-color: #a987ff55; color: #e8dcff; background: #a987ff23; }
.feature-copy .market-kicker > span { color: inherit; }
.feature-copy h2 { margin: 10px 0 3px; font-size: clamp(1.8rem, 4vw, 3.1rem); line-height: 1.2; }
.feature-copy p { margin: 10px 0; color: #ded2ef; font-size: .9rem; }
.feature-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-block: 10px 16px; }
.feature-price > span, .feature-price del { color: #d2bff5; font-size: .8rem; }
.feature-price strong { font-size: 1.5rem; }
.feature-copy .button { min-height: 40px; background: #754af1; color: white; }
.feature-art { min-height: 100%; position: relative; display: grid; place-items: center; isolation: isolate; background: radial-gradient(ellipse at 50% 50%, #7540d7 0, #42227d 35%, transparent 74%); }
.feature-art svg { width: clamp(82px, 11vw, 142px); height: auto; padding: 20px; border-radius: 25%; background: linear-gradient(145deg,#fff,#e1d1ff); color: #442280; stroke: currentColor; fill: none; stroke-width: 5px; transform: rotate(-10deg); box-shadow: 0 16px 46px #15072680; }
.feature-orbit { position: absolute; width: 87%; aspect-ratio: 2.7; border: 1px solid #d3b9ff70; border-radius: 50%; transform: rotate(-22deg); z-index: -1; }
.feature-star { position: absolute; inset-inline-end: 21%; top: 20%; color: #e1c6ff; font-size: 1.9rem; }
.feature-brand { position: absolute; bottom: 19px; font: 900 .69rem Arial,sans-serif; letter-spacing: .22em; color: #eddbff; }
.feature-brand b { color: #c79bff; }
body:has(.market-hero) .bestsellers-heading { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 15px; }
body:has(.market-hero) .bestsellers-heading button { color: var(--ink); }
body:has(.market-hero) .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
body:has(.market-hero) .catalog-product { border-radius: 16px; }
body:has(.market-hero) .product-poster { width: 100%; height: auto; aspect-ratio: 1.18; }
body:has(.market-hero) .product-poster .poster-caption { display: none; }
body:has(.market-hero) .product-poster .dynamic-poster-title { min-height: 0; margin-block: 36px 8px; }
@media (max-width: 900px) { body:has(.market-hero) .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 640px) {
  body:has(.market-hero) .shop-header { width: calc(100% - 20px); }
  body:has(.market-hero) .shop-header .wrap { width: calc(100% - 20px); }
  .market-intro { padding-block: 41px 26px; }
  .market-intro > p { max-width: 25rem; }
  .market-feature { grid-template-columns: minmax(0,1fr) minmax(100px,.52fr); min-height: 228px; }
  .feature-copy { padding: 19px; }
  .feature-art svg { padding: 12px; }
  .feature-brand { display: none; }
  .feature-star { inset-inline-end: 13%; }
  body:has(.market-hero) .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body:has(.market-hero) .product-poster { aspect-ratio: .88; }
  body:has(.market-hero) .product-poster .dynamic-poster-title { font-size: .86rem; }
}
@media (max-width: 355px) {
  body:has(.market-hero) .catalog-grid { grid-template-columns: minmax(0,1fr); }
  .market-feature { grid-template-columns: minmax(0,1fr); }
  .feature-art { display: none; }
}

/* Marketplace cover and product shelves */
.market-hero {
  width: min(calc(100% - 32px),1280px);
  margin: 16px auto 26px; border-radius: 24px;
  background: linear-gradient(120deg,#29116a 0%,#4e24ca 52%,#6935ed 100%); color: #fff;
}
.market-hero .market-kicker { border-color: #d7c5ff6b; background: #190c524c; color: #fff; }
.market-hero .market-kicker > span:first-child { color: #e4ccff; }
.market-hero .market-intro h1 em { color: #e0cdff; }
.market-hero .market-intro > p { color: #f0e8ff; }
.market-orbit { background: radial-gradient(ellipse at 52% 105%,#be8cff80,transparent 65%); }
.market-orbit i { border-color: #f0ddff43; }
.market-orbit span { color: #f0dfff; }
.market-hero #hero-search .search-form { border-radius: 999px; }
.hero-categories { margin-top: 15px; }
.hero-categories .categories-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.hero-categories .category-pill { min-height: 34px; background: #26105d73; color: #f9f5ff; border-color: #d8c1ff61; }
.hero-categories .category-pill:hover, .hero-categories .category-pill[aria-pressed=true] { background: #fff; color: #4621a1; border-color: #fff; }
body:has(.market-hero) .catalog-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
body:has(.market-hero) .product-poster { aspect-ratio: .78; }
body:has(.market-hero) .catalog-product { box-shadow: 0 8px 25px #3012660c; }
body:has(.market-hero) .catalog-product:hover { box-shadow: 0 8px 25px #633ce047; }
body:has(.market-hero) .catalog-info h3 { text-align: start; }
@media(max-width: 1000px) { body:has(.market-hero) .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width: 640px) {
  .market-hero { width: calc(100% - 20px); border-radius: 18px; }
  .hero-categories .category-pill { padding-inline: 9px; font-size: .72rem; }
  body:has(.market-hero) .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Featured products inside the cover */
.market-hero-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); align-items: center; gap: clamp(18px,4vw,56px); }
.market-hero-layout:not(:has(.market-feature:not([hidden]))) { display: block; }
.market-hero-layout .market-intro { text-align: start; padding-block: 50px; }
.market-hero-layout:not(:has(.market-feature:not([hidden]))) .market-intro { text-align: center; }
.market-hero-layout .market-intro h1 { font-size: clamp(2rem,4vw,3.6rem); }
.market-hero-layout:has(.market-feature:not([hidden])) .categories-grid { justify-content: flex-start; }
.market-hero-layout:has(.market-feature:not([hidden])) #hero-search .search-form { margin-inline: 0; }
.market-hero-layout .market-feature { position: relative; grid-template-columns: minmax(0,1fr) minmax(100px,.66fr); margin: 25px 0; min-height: 210px; text-align: start; border-radius: 19px; border: 1px solid #f0deff61; background: #180c4b8c; }
.market-hero-layout .feature-copy { padding: clamp(14px,2.2vw,28px); }
.market-hero-layout .feature-copy h2 { font-size: clamp(1.22rem,2vw,1.85rem); }
.market-hero-layout .feature-copy p { margin-block: 6px; font-size: .8rem; }
.market-hero-layout .feature-price { margin-block: 8px 12px; }
.market-hero-layout .feature-art svg { width: clamp(58px,8vw,104px); padding: 12px; }
.market-hero-layout .feature-brand { font-size: .55rem; }
.feature-art img { width: min(80%,125px); max-height: 155px; object-fit: contain; border-radius: 9px; box-shadow: 0 12px 30px #14092c99; }
.feature-controls { grid-column: 1/-1; justify-self: center; display: flex; justify-content: center; flex-wrap: wrap; padding: 0 10px 8px; }
.feature-controls button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: #d8c1ff; cursor: pointer; }
.feature-controls button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; }
.feature-controls button[aria-pressed="true"]::before { background: currentColor; }
.feature-controls button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; border-radius: 50%; }
.shelf-actions button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.35rem; line-height: 1; }
/* Horizontal product shelf */
.market-shelf { margin-block: 30px 34px; }
.shelf-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.shelf-heading h2 { margin: 4px 0 0; font-size: clamp(1.25rem,2.4vw,1.8rem); }
.shelf-heading h2 span { color: var(--purple); }
.shelf-actions { display: flex; align-items: center; gap: 6px; }
.shelf-actions a { margin-inline-end: 6px; color: var(--ink); font-size: .78rem; font-weight: 750; }
.shelf-actions button[hidden] { display: none; }
.shelf-actions button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.shelf-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(142px,18%,230px); gap: 14px; overflow-x: auto; padding: 3px 2px 11px; scrollbar-color: var(--purple) transparent; scrollbar-width: thin; }
.shelf-item { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.shelf-item h3 { margin: 8px 4px 0; font-size: .88rem; overflow-wrap: anywhere; }
.shelf-item p { margin: 4px; font-size: .76rem; color: var(--muted); }
@media(max-width: 760px) {
 .market-hero-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
 .market-hero-layout .market-intro { padding-block: 31px 11px; text-align: center; }
 .market-hero-layout:has(.market-feature:not([hidden])) .categories-grid { justify-content: center; }
 .market-hero-layout:has(.market-feature:not([hidden])) #hero-search .search-form { margin-inline: auto; }
 .market-hero-layout .market-feature { margin: 12px 0 20px; min-height: 160px; }
 .market-hero-layout .feature-art { display: grid; }
}
.market-feature .feature-copy .featured-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.market-feature .featured-more {
  display: inline-block;
  color: inherit;
  font-weight: 700;
  font-size: .875rem;
  text-underline-offset: .2em;
}
.market-feature .featured-more[hidden] { display: none; }
.market-feature #featured-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  block-size: 2.4em;
}
.feature-description-slot {
  --excerpt-edge: left;
  --excerpt-fade: right;
  position: relative; block-size: 3.2rem; overflow: hidden; font-size: .8rem; line-height: 1.45;
}
.feature-description-slot:dir(rtl) { --excerpt-edge: right; --excerpt-fade: left; }
.market-hero-layout .feature-description-slot .featured-excerpt { line-height: 1.45; margin: 0 0 .15rem; }
.feature-description-slot:has(.featured-more:not([hidden])) .featured-excerpt {
  --excerpt-second-line: clamp(0px, calc(100% - var(--more-width, 0px) - .4rem), 54%);
  mask: linear-gradient(#000 0 0) left top / 100% 1lh no-repeat,
        linear-gradient(to var(--excerpt-fade), #000 78%, transparent) var(--excerpt-edge) bottom / var(--excerpt-second-line) 1lh no-repeat;
}
.market-feature .featured-more { position: absolute; inset-block-start: 1.45em; inset-inline-end: 0; font-size: inherit; line-height: inherit; white-space: nowrap; unicode-bidi: isolate; }
.market-hero-layout .feature-price { display: grid; grid-template-columns: max-content minmax(0,1fr); grid-template-rows: auto 1rem; gap: 2px 8px; }
.feature-price strong { white-space: nowrap; font-size: clamp(.95rem, 1.9vw, 1.45rem); }
.feature-price del { grid-column: 2; }
.feature-media {
  display: grid;
  place-items: center;
  width: min(86%, 135px);
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, #693ac4, #26155c);
}
.feature-media img { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; box-shadow: none; }
.feature-media svg { max-width: 80%; }
