/* AI Software Development: the app store look (2026-10-19). A department-store layout in the site's
   own navy and cyan: the store bar (department picker, search, cart), the department strip, rows of
   apps, the filter sidebar (css/shop.css), the product page's buy box and the cart drawer.
   Tokens come from base.css; nothing here changes what a page says or does. */

/* ---------- Store bar ---------- */
.shopbar { position: sticky; top: 72px; z-index: 40; background: var(--sidebar); border-bottom: 1px solid var(--border); }
.shopbar__inner { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.shopbar__search { flex: 1 1 auto; display: flex; min-width: 0; height: 44px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--outline-active); background: var(--panel); }
.shopbar__search:focus-within { box-shadow: var(--focus); }
.shopbar__dept { flex: 0 0 auto; max-width: 190px; border: 0; border-right: 1px solid var(--border); background: var(--raised); color: var(--text-2); padding: 0 10px; font-size: 14px; cursor: pointer; }
.shopbar__q { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 0 14px; font-size: 15px; }
.shopbar__q::placeholder { color: var(--muted); }
.shopbar__q:focus, .shopbar__dept:focus { outline: none; }
.shopbar__go { flex: 0 0 52px; border: 0; background: var(--cyan); color: #03202C; display: grid; place-items: center; cursor: pointer; }
.shopbar__go:hover { background: var(--highlight); }
.shopbar__cart { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: transparent; color: var(--text); font: 600 15px var(--font-body); cursor: pointer; }
.shopbar__cart:hover { border-color: var(--outline-active); background: var(--raised); }
.shopbar__count { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--cyan); color: #03202C; font: 600 13px var(--font-mono); display: inline-grid; place-items: center; }
.shopbar__depts { background: var(--panel); border-top: 1px solid rgba(23, 59, 81, 0.6); }
.shopbar__depts-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-top: 4px; padding-bottom: 4px; }
.shopbar__depts a { flex: 0 0 auto; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; text-decoration: none; white-space: nowrap; }
.shopbar__depts a:hover { color: var(--text); background: var(--raised); }

/* ---------- /products: rows, tiles and app cards ---------- */
.store-band--slim { padding: 40px 0 32px; }
.store-band--slim .store-band__title { font-size: clamp(30px, 3.4vw, 44px); margin: 10px 0 12px; }
.pp-section { padding-top: 32px; }
.pp-home { display: grid; gap: 40px; }
.pp-row__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pp-row__head .store-h2 { margin: 0; font-size: clamp(22px, 2vw, 28px); }
.pp-row__all { font-size: 14px; }
.pp-row .prod-grid { margin-top: 0; }
.pp-row__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.pp-row__track > * { scroll-snap-align: start; }
.pp-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pp-tile { display: grid; gap: 6px; padding: 18px; min-height: 96px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, rgba(21, 136, 208, 0.18), rgba(7, 27, 41, 0.9)); }
.pp-tile:hover { border-color: var(--outline-active); }
.pp-tile__name { font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.pp-tile__count { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pp-grid:empty { display: none; }

.app-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0; }
.app-card__media { position: relative; display: grid; place-items: center; height: 120px; text-decoration: none;
  background: radial-gradient(ellipse 80% 90% at 70% 20%, rgba(52, 200, 244, 0.28), transparent 70%), var(--raised); border-bottom: 1px solid var(--border); }
.app-card__initial { font: 700 40px var(--font-head); color: var(--highlight); letter-spacing: 0.02em; }
.app-card__dept { position: absolute; left: 10px; bottom: 8px; font: 500 11px var(--font-mono); color: var(--muted); letter-spacing: 0.06em; }
.app-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.app-card__name { font-size: 18px; }
.app-card__name a { color: var(--text); text-decoration: none; }
.app-card__name a:hover { color: var(--highlight); text-decoration: underline; }
.app-card__outcome { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.app-card__price { font-family: var(--font-head); color: var(--cyan); font-size: 16px; margin-top: auto; }
.shop__depts a.shop__dept { text-decoration: none; }
.shop__depts a.shop__dept[aria-current] { background: rgba(52, 200, 244, 0.12); color: var(--cyan); }

/* ---------- Product page: media, details, buy box ---------- */
.pdp { padding: 28px 0 48px; }
.pdp .crumbs { margin-bottom: 18px; }
.pdp__grid { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) minmax(260px, 320px); gap: 28px; align-items: start; }
.pdp__media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: radial-gradient(ellipse 80% 80% at 65% 25%, rgba(52, 200, 244, 0.32), transparent 70%), var(--raised); }
.pdp__initial { font: 700 88px var(--font-head); color: var(--highlight); }
.pdp__media-dept { position: absolute; left: 14px; bottom: 12px; font: 500 12px var(--font-mono); color: var(--muted); letter-spacing: 0.06em; }
.pdp__info .store-band__labels { margin-top: 0; }
.pdp__info .store-band__title { font-size: clamp(30px, 3.2vw, 44px); margin: 12px 0 6px; }
.pdp__by { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pdp__about { font-size: 18px; margin: 22px 0 10px; }
.pdp__bullets { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.pdp__info .disclosure { margin-top: 16px; }
.pdp__buy { position: sticky; top: 190px; padding: 20px; display: grid; gap: 12px; border-color: var(--outline-active); }
.pdp__price { font: 600 26px var(--font-head); color: var(--cyan); }
.pdp__ctas { margin-top: 4px; display: grid; gap: 10px; }
.pdp__ctas .btn { width: 100%; justify-content: center; }
.pdp__fine { color: var(--muted); font-size: 13px; }

/* ---------- Cart drawer ---------- */
.cart { position: fixed; inset: 0; z-index: 90; background: rgba(1, 6, 10, 0.66); display: flex; justify-content: flex-end; }
.cart__panel { width: min(420px, 100%); height: 100%; border-radius: 0; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cart__head { display: flex; justify-content: space-between; align-items: center; }
.cart__head .store-h2 { margin: 0; font-size: 24px; }
.cart__close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.cart__note { color: var(--text-2); font-size: 14px; }
.cart__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--raised); }
.cart__name { font-weight: 600; color: var(--text); grid-column: 1 / -1; }
.cart__price { color: var(--cyan); font-size: 14px; grid-column: 1 / -1; }
.cart__empty { color: var(--muted); }
.cart__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

/* ---------- Home: the search panel ---------- */
.finder { position: relative; z-index: 3; margin-top: -120px; }
.finder__card { padding: 22px 24px 24px; border-color: var(--outline-active); background: rgba(7, 27, 41, 0.96); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45); }
.finder__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.finder__brand .brand__mark { width: 30px; height: 30px; color: var(--cyan); }
.finder__brand-name { font: 600 18px var(--font-head); }
.finder__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.finder__tab { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--text-2); font: 600 15px var(--font-body); cursor: pointer; }
.finder__tab[aria-selected="true"] { color: var(--cyan); border-bottom-color: var(--cyan); }
.finder__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; align-items: end; }
.finder__fields--two { grid-template-columns: minmax(0, 1fr) auto; }
.finder .field label { font-size: 13px; color: var(--text-2); }
.finder .field select, .finder .field input { width: 100%; }
.finder__go { min-height: 48px; }
.finder__note { margin-top: 12px; color: var(--muted); font-size: 13px; }
.finder__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.finder__links a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); font-size: 13px; text-decoration: none; }
.finder__links a:hover { color: var(--text); border-color: var(--outline-active); }

@media (max-width: 1180px) {
  .pdp__grid { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); }
  .pdp__buy { grid-column: 1 / -1; position: static; }
  .pp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .finder__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .finder__fields .finder__go { grid-column: 1 / -1; }
  .finder__fields--two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shopbar { top: 64px; }
  .shopbar__dept { max-width: 110px; }
  .shopbar__cart-label { display: none; }
  .pp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-grid { grid-template-columns: minmax(0, 1fr); }
  .pdp__grid { grid-template-columns: minmax(0, 1fr); }
  .pdp__media { aspect-ratio: auto; height: 160px; }
  .pdp__initial { font-size: 56px; }
  .finder { margin-top: -48px; }
  .finder__card { padding: 16px; }
  .finder__fields { grid-template-columns: minmax(0, 1fr); }
}

/* Fixes after the first preview screenshots. */
.pp-row .prod-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
button.pp-row__all { min-height: 44px; padding: 0; border: 0; background: none; color: var(--highlight); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.shop__bar { align-items: center; }
.shop__bar-note { flex: 1 1 240px; color: var(--text-2); font-size: 14px; }
.shop__rows { display: grid; gap: 32px; margin-bottom: 24px; }
.shop__rows:empty { display: none; }
.shop__track { grid-auto-columns: minmax(260px, 300px); }
@media (max-width: 860px) { .shopbar__dept { max-width: 96px; font-size: 13px; padding: 0 6px; } }
.pp-row .prod-grid > *, .pp-grid > * { min-width: 0; }
.pp-row .prod-card .chip, .pp-row .prod-card .state { white-space: normal; }
@media (max-width: 860px) { .finder { margin-top: 24px; } }
.pp-home, .shop__rows, .pp-results { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.pp-row { min-width: 0; }
