/* Dükkan as in the 2016 client: categories | framed item cards (2 columns, scrolled with arrows) | showcase on a hangar plate | quantity + buy column.
   Loaded after site.css; the markup is in index.html (#tab-shop) and site.js (shopCard, renderShopDetail). */

.shop { grid-template-columns: 176px 214px minmax(0, 1fr) 168px; gap: 8px; align-items: stretch; }
.shop-nav, .shop-main, .shop-buy { align-self: start; }
.shop-detail { position: static; align-self: start; min-width: 0; }

/* ---- item list ---- */
.shop-main { position: relative; padding-bottom: 22px; }
.shop-main .panel-head { font-size: 11px; flex-wrap: wrap; }
.shop-main .panel-head .ph-right { flex: 1 0 100%; margin: 3px 0 0; text-align: center; }
.shop-main .disc-badge { display: block; font-size: 9px; padding: 2px 4px; }
.shop-main .panel-body { height: 396px; padding: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scroll-behavior: smooth; }
.shop-main .panel-body::-webkit-scrollbar { display: none; }
.shop-main .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px 8px 10px; }
.sl-arrow { display: block; width: calc(100% - 16px); height: 20px; margin: 0 8px; padding: 0; border: 1px solid #2f5d7e; position: relative;
  background: linear-gradient(180deg, #1c3a52, #0d1f2e); box-shadow: inset 0 1px 0 rgba(150, 205, 240, .28); }
.sl-arrow.up { margin-top: 6px; }
.sl-arrow.down { position: absolute; left: 0; bottom: 0; margin-bottom: 0; }
.shop-main .sl-arrow.down { bottom: 0; }
.sl-arrow i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-right: 2px solid #8fd6ff; border-bottom: 2px solid #8fd6ff; transform: translate(-50%, -30%) rotate(-135deg); }
.sl-arrow.down i { transform: translate(-50%, -75%) rotate(45deg); }
.sl-arrow:hover { background: linear-gradient(180deg, #27506e, #12293b); }
.sl-arrow.off { opacity: .35; pointer-events: none; }

.bp-shop-card { padding: 0; gap: 0; min-height: 96px; border: 1px solid #35607f; border-radius: 2px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 52%, rgba(110, 175, 230, .26), rgba(110, 175, 230, 0) 70%),
    linear-gradient(180deg, #16344f 0%, #0b1b2a 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(160, 210, 245, .28); transition: border-color .12s, box-shadow .12s; }
.bp-shop-card:hover { border-color: #6cb8ec; }
.bp-shop-card.selected { border-color: #f1dd4d; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), 0 0 0 1px #f1dd4d, 0 0 12px rgba(241, 221, 77, .32); }
.bp-shop-name { padding: 4px 4px 0; min-height: 17px; font: bold 11px/1.1 var(--font-hea); letter-spacing: .3px; color: #e4eff9; text-shadow: 0 1px 2px #000;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-shop-card .sc-img { flex: 1; display: grid; place-items: center; padding: 1px 4px 2px; }
.bp-shop-card img { height: 58px; width: auto; max-width: 94%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }
.bp-shop-price { padding: 2px 3px 3px; background: rgba(2, 8, 14, .62); border-top: 1px solid rgba(120, 175, 215, .12); font: 11px var(--font-hea); color: #9bb2c6; }
.bp-shop-price.c { color: #dcc383; } .bp-shop-price.u { color: #84c8f2; }
.sc-owned { bottom: 1px; font-size: 9px; }
#quickbuy-grid .bp-shop-card { min-height: 0; }

/* ---- showcase ---- */
.sd-show { position: relative; height: 336px; border: 2px solid #5d7185; border-radius: 3px; overflow: hidden;
  background: #060b10 url('/assets/oo_shop/showcase_bg.jpg') center 58% / cover no-repeat;
  box-shadow: inset 0 0 0 1px #0a1219, inset 0 0 28px rgba(0, 0, 0, .75), 0 0 0 1px #0a1219; }
.sd-show::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3; border: 1px solid rgba(170, 205, 235, .22);
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 26%, transparent 78%, rgba(0, 0, 0, .5)); }
.sd-title { position: absolute; left: 0; right: 0; top: 12px; z-index: 4; text-align: center; pointer-events: none; }
.sd-title b { display: block; font: 30px/1.05 var(--font-hea); letter-spacing: 1px; color: #fff; text-shadow: 0 2px 6px #000, 0 0 14px rgba(120, 190, 255, .35); }
.sd-title span { display: block; margin-top: 3px; font: 12px var(--font-hea); letter-spacing: 1.2px; text-transform: uppercase; color: #e6f1fb; text-shadow: 0 1px 3px #000; }
.shop-detail .sd-show .sd-img { position: absolute; left: 6px; right: 6px; top: 66px; bottom: 44px; height: auto; z-index: 2; background: none; display: grid; place-items: center; }
.shop-detail .sd-show .sd-img.has3d { height: auto; }
.shop-detail .sd-show .sd-img img { width: 88%; height: 84%; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .65)); }
.shop-detail .sd-show .sd-img.ship img { height: 100%; }
.sd-unit { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 4; text-align: center; font: 17px var(--font-hea); text-shadow: 0 1px 4px #000; pointer-events: none; }
.sd-unit.c { color: #ffe9b0; } .sd-unit.u { color: #bfe6ff; }
.sd-unit small { font-size: 11px; color: #9fb4c8; }
.sd-unit s { color: #8aa0b4; font-size: 12px; }
.sd-box { margin-top: 8px; padding: 9px 11px; min-height: 84px; border: 1px solid #2c4256; background: linear-gradient(180deg, #0d1822, #070d13); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55); }
.sd-box .sd-desc { margin: 0 0 6px; font-size: 12.5px; color: #c5d4e2; }
.sd-box .ability { margin: 0 0 6px; font-size: 12px; color: #ffcf5a; white-space: pre-line; }
.sd-box .sd-levels { margin: 0 0 8px; }
.sd-box .spec.small { margin: 0; }

/* ---- quantity / buy column ---- */
.shop-buy #shop-buy-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.sb-name { margin: -8px -8px 2px; padding: 8px 4px; font: bold 15px var(--font-hea); letter-spacing: .5px; color: #fff; text-shadow: 0 1px 3px #000;
  background: linear-gradient(180deg, #2f4458, #16222e); border-bottom: 1px solid #0a1219; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.sb-label { font: 12px var(--font-hea); color: #d7e6f3; }
.sb-quick { display: grid; gap: 4px; padding: 0 12px; }
.sb-q { height: 22px; border: 1px solid #3c7aa6; background: linear-gradient(180deg, #17364f, #0b1b29); font: bold 12px var(--font-hea); color: #f2f8fd; letter-spacing: .5px;
  box-shadow: inset 0 1px 0 rgba(160, 215, 250, .3); }
.sb-q:hover { background: linear-gradient(180deg, #25577c, #11293b); }
.sb-chev { height: 12px; margin: 2px auto 0; width: 30px; background: linear-gradient(180deg, #8fa4b6, #46586a); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .8; }
.sb-step { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 4px; align-items: center; }
.sb-pm { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1px solid #6bb4e6; background: radial-gradient(circle at 40% 30%, #4aa0dc, #164a73); font: bold 16px/1 var(--font-hea); color: #fff; }
.sb-pm:hover { filter: brightness(1.2); }
.sb-step input { width: 100%; min-width: 0; padding: 5px 6px; border: 1px solid #3a5367; background: #000; color: #fff; text-align: right; font: 14px var(--font-hea); }
.sb-sep { height: 10px; margin: 4px 14px 0; border-top: 2px solid #20384c; border-bottom: 1px solid #0a1219; }
.shop-buy .sd-price { padding: 6px 8px; border: 1px solid #3a5367; background: #000; text-align: center; font: 16px var(--font-hea); }
.shop-buy .btn-metal { width: 100%; padding: 9px 4px; font-size: 15px; }
.shop-buy .sd-locked { display: block; line-height: 1.3; }

/* ---- narrower pages: list beside the categories, showcase and buy column below */
@media (max-width: 1099px) {
  .shop { grid-template-columns: 150px minmax(0, 1fr); }
  .shop-main .shop-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .shop-detail, .shop-buy { grid-column: 1 / -1; }
  .shop-buy #shop-buy-body { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; }
  .sb-name { flex: 1 0 100%; }
  .sb-quick { display: flex; padding: 0; }
  .sb-chev, .sb-sep { display: none; }
  .shop-buy .sd-price { min-width: 120px; }
  .shop-buy .btn-metal { width: auto; min-width: 140px; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  html.mobile .shop { grid-template-columns: 150px minmax(0, 1fr); }
  html.mobile .shop-detail { grid-column: 1 / -1; position: static; max-height: none; overflow: visible; }
}
@media (max-width: 759px) {
  .shop { grid-template-columns: minmax(0, 1fr); }
  #shop-cats { flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px; scrollbar-width: none; }
  #shop-cats::-webkit-scrollbar { display: none; }
  .shop-cat { flex: none; min-width: 130px; }
  .shop-sub { flex: none; align-self: center; white-space: nowrap; padding: 4px 10px; }
  .shop-main .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-main .panel-body { height: 300px; }
  .sd-show { height: 300px; }
  .sd-title b { font-size: 24px; }
}

/* ---- hangar: the same framed look for the inventory / equipment slots, and the showcase plate behind the ship ---- */
.bp-slot:not(.locked):not(.empty) { border-color: #35607f; border-radius: 2px;
  background: radial-gradient(ellipse at 50% 60%, rgba(88, 150, 205, .30), rgba(88, 150, 205, 0) 70%),
    linear-gradient(180deg, #14304a, #0b1a28);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(160, 210, 245, .28); }
.bp-slot:not(.locked):not(.empty) img { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.bp-slot.equipped { border-color: #6aa8d6; }
.bp-slot:hover { border-color: #6cb8ec; }
.bp-slot.active { border-color: #f1dd4d; box-shadow: 0 0 6px rgba(241, 221, 77, .55), inset 0 0 6px rgba(0, 0, 0, .9); }
.showcase-img, .equip-ship-img { border: 2px solid #5d7185; border-radius: 3px; overflow: hidden;
  background: #060b10 url('/assets/oo_shop/hangar_bg.jpg') center 62% / cover no-repeat;
  box-shadow: inset 0 0 0 1px #0a1219, inset 0 0 26px rgba(0, 0, 0, .72), 0 0 0 1px #0a1219; }
.showcase-img::before, .equip-ship-img::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 28%, transparent 76%, rgba(0, 0, 0, .45)); }
.showcase-img > img, .equip-ship-img > img { position: relative; z-index: 1; }
