/* Storefront pages (product + category pages). Colors and fonts come from the storefront theme variables,
   so these pages always match the rest of the store. */
#productView { display: none; }
/* a page route shows only its own sections: everything else inside the main area (hero, beats, shelves, featured products, license studio) stays hidden */
body.product-page-view #top > :not(#productView) { display: none !important; }
body.product-page-view #productView { display: block; width: min(1120px, calc(100% - 48px)); margin: 34px auto 90px; }
.pg-wrap { display: flex; flex-direction: column; gap: 34px; }
.pg-empty { margin: 40px 0; color: var(--muted); }
.pg-sec { min-width: 0; }
html.sfe-embed .pg-sec { cursor: pointer; transition: outline-color .15s; outline: 2px solid transparent; outline-offset: 8px; border-radius: 10px; }
html.sfe-embed .pg-sec:hover { outline-color: color-mix(in srgb, var(--red) 55%, transparent); }

/* buy box */
.pg-buybox { display: grid; grid-template-columns: minmax(260px, 460px) minmax(0, 1fr); gap: 44px; align-items: start; }
.pg-art { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-soft); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.pg-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-kicker { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.pg-title { margin: 0; font: var(--heading-weight) calc(clamp(1.8rem, 3.2vw, 3rem) * var(--heading-scale, 1))/1.05 var(--display); letter-spacing: var(--heading-tracking); color: var(--ink); }
.pg-price { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.pg-price s { color: var(--muted); font-size: .85rem; font-weight: 500; }
.pg-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 0; }
.pg-meta span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .74rem; color: var(--muted); }
.pg-buy { margin-top: 22px; }
.pg-buy button { min-height: 50px; padding: 0 30px; border: 0; border-radius: 999px; background: var(--red); color: var(--palette-accent-text, #fff); font: 800 .95rem var(--sans); cursor: pointer; }
.pg-buy button:disabled { opacity: .55; cursor: default; }
.pg-status { min-height: 1.2em; margin: 10px 0 0; color: var(--muted); font-size: .85rem; }

/* beat catalog */
.pg-catalog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.pg-catalog-head { display: flex; justify-content: space-between; align-items: center; height: 42px; padding: 0 16px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pg-rows { overflow-y: auto; }
.pg-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 16px 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pg-row:first-child { border-top: 0; }
.pg-row:hover { background: var(--surface-soft); }
.pg-row img { width: 46px; height: 46px; object-fit: cover; flex: none; }
.pg-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.pg-row-meta { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.pg-row-time { min-width: 76px; text-align: right; color: var(--red); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pg-row.is-active { background: var(--surface-soft); }
.pg-row.is-active .pg-row-name { color: var(--red); }
.pg-row-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.pg-row.is-active .pg-row-bar { background: var(--line); }
.pg-row-bar b { display: block; height: 100%; width: 0; background: var(--red); }

/* description + related */
.pg-desc h2, .pg-related h2 { margin: 0 0 12px; font: var(--heading-weight) 1.25rem var(--display); color: var(--ink); }
.pg-desc p { max-width: 64ch; margin: 0; color: var(--muted); line-height: 1.6; }
.pg-desc-body { max-width: 64ch; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.pg-desc-body p { margin: 0 0 12px; color: inherit; }
.pg-desc-body > :last-child { margin-bottom: 0; }
.pg-desc-body :is(ul, ol) { padding-left: 24px; }
.pg-desc-body blockquote { margin: 0 0 12px 24px; }

/* banner + cards */
.pg-banner h1 { margin: 0; font: var(--heading-weight) calc(clamp(2rem, 4vw, 3.4rem) * var(--heading-scale, 1))/1.05 var(--display); letter-spacing: var(--heading-tracking); color: var(--ink); }
.pg-banner p { margin: 10px 0 0; max-width: 60ch; color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.pg-grid { display: grid; grid-template-columns: repeat(var(--pv, 4), minmax(0, 1fr)); gap: 44px 24px; }
.pg-grid-grid .pg-card { padding: 0; background: transparent; border-radius: 0; gap: 14px; }
.pg-grid-grid .pg-card:hover { transform: none; box-shadow: none; }
.pg-grid-grid .pg-card-cover { border-radius: 6px; }
.pg-grid-grid .pg-card-copy strong { font: 700 16px/1.35 var(--sans); }
.pg-grid-grid .pg-card-price { font-size: 14px; font-weight: 600; }
.pg-grid-cards { gap: 22px; }
.pg-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.pg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pg-card-cover { position: relative; display: block; aspect-ratio: 1; border-radius: 11px; background: var(--canvas) center / cover no-repeat; }
.pg-badge { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--red); color: var(--palette-accent-text, #fff); font: 800 .62rem var(--sans); font-style: normal; text-transform: uppercase; }
.pg-card-copy { display: flex; flex-direction: column; gap: 3px; }
.pg-card-copy strong { font-weight: 650; }
.pg-card-copy small { color: var(--muted); font-size: .76rem; }
.pg-card-price { display: flex; gap: 7px; align-items: baseline; font-weight: 800; }
.pg-card-price b.is-sale { color: var(--red); }
.pg-card-price s { color: var(--muted); font-size: .8rem; font-weight: 500; }

@media (max-width: 760px) {
  body.product-page-view #productView { width: min(100% - 24px, 620px); margin-top: 18px; }
  .pg-wrap { gap: 26px; }
  .pg-buybox { grid-template-columns: 1fr; gap: 20px; }
  .pg-art { width: min(100%, 460px); margin-inline: auto; }
  .pg-title { font-size: 1.6rem; }
  .pg-buy button { width: 100%; }
  .pg-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 230px)); justify-content: start; gap: 12px; }
  .pg-row-meta { display: none; }
  .pg-row-time { min-width: 64px; }
}
