.shop { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.shop-side { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 16px; }
.shop-extra { display: grid; gap: 16px; }
.shop-main { display: grid; gap: 24px; align-content: start; min-width: 0; }
.shop-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.shop-panel-title { margin: 0 0 12px; font: 900 11px/1 var(--brand); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.shop-panel-title .bi { margin-right: 4px; color: var(--cyan); }

.shop-account { padding: 18px; }
.shop-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-user img { width: 44px; height: 44px; flex: none; border-radius: 10px; image-rendering: pixelated; }
.shop-user div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.shop-user strong { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.shop-balance { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-weight: 700; font-size: 15px; color: var(--gold); }
.shop-account-btns { display: grid; gap: 10px; margin-top: 16px; }
.shop-account-btns .btn, .shop-login { width: 100%; }
.shop-account-btns form { margin: 0; }
.shop-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #2a1500; color: var(--gold-l); font-size: 12px; letter-spacing: 0; }

.shop-cats { padding: 18px 10px 10px; }
.shop-cats .shop-panel-title { padding: 0 10px; }
.shop-cats ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.shop-cats a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: #cfd0d4; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.shop-cats a .bi { width: 18px; color: var(--muted); transition: color 160ms var(--ease-out); }
.shop-cats .sub a { padding-left: 42px; font-weight: 500; font-size: 14px; }
.shop-cats a.active { background: rgba(255, 165, 0, .12); color: var(--accent, #ffa500); }
.shop-cats a.active .bi { color: var(--accent, #ffa500); }
.shop-cats a.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--gold-l), var(--orange)); }

.shop-box { padding: 18px; }
.shop-goal { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.shop-recent { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.shop-recent li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shop-recent img { width: 32px; height: 32px; flex: none; border-radius: 8px; image-rendering: pixelated; }
.shop-recent div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.shop-recent strong { color: #fff; font-size: 14px; }
.shop-recent span, .shop-recent-empty { color: var(--muted); font-size: 12.5px; }

.shop-intro { padding: 24px 28px; }
.shop-intro > :last-child { margin-bottom: 0; }
.shop-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.shop-tiles > div { display: flex; }
.shop-tile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; }
.shop-tile-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 12px; background: linear-gradient(135deg, #ffb733, #ff7b00); color: #2a1500; font-size: 22px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(105, 26, 10, .35); }
.shop-tile-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.shop-tile-text strong { color: #fff; font-size: 17px; }
.shop-tile-text span { color: var(--muted); font-size: 13.5px; }
.shop-tile-go { margin-left: auto; color: var(--muted); }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.pkg-grid > div { display: flex; }
.pkg-card { display: flex; flex-direction: column; width: 100%; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.pkg-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(60% 60% at 50% 55%, rgba(255, 165, 0, .18), transparent 70%), var(--panel-2); border-bottom: 1px solid var(--line); }
.pkg-media img { width: 62%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); }
.pkg-media > .bi { font-size: 64px; line-height: 1; color: var(--gold); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.pkg-body { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 20px; }
.page-content .pkg-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 19px; line-height: 1.25; }
.pkg-tag { padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font: 600 11.5px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.modal-title .pkg-tag, .page-content h1 .pkg-tag { vertical-align: middle; }
.pkg-short { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.pkg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: auto 0 16px; padding-top: 16px; }
.pkg-price .price { font-size: 30px; }
.pkg-price del { font: 900 11px/1 var(--brand); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration-color: var(--danger); text-decoration-thickness: 2px; white-space: nowrap; }
.pkg-body .btn { width: 100%; }
.pkg-body .btn[aria-busy="true"] { opacity: .7; }

.pkg-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.pkg-info { min-width: 0; }
.pkg-visual { display: grid; place-items: center; margin-bottom: 18px; padding: 18px; border-radius: 12px; background: radial-gradient(55% 60% at 50% 55%, rgba(255, 165, 0, .2), transparent 70%), var(--panel-2); border: 1px solid var(--line); }
.pkg-visual img { width: min(220px, 70%); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .55)); }
.pkg-desc ul { padding-left: 1.2em; }
.pkg-desc li::marker { color: var(--gold); }
.pkg-desc > :last-child { margin-bottom: 0; }
.pkg-buy { --edge: .38; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pkg-buy-label { margin: 0; font: 900 11px/1 var(--brand); letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.pkg-old { font: 900 12px/1 var(--brand); letter-spacing: .14em; text-transform: uppercase; color: #8a5a33; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.pkg-now { font-size: 46px; }
.pkg-off { padding: 5px 10px; border-radius: 6px; background: var(--red); font: 900 11px/1 var(--brand); letter-spacing: .14em; color: #ffdca0; }
.pkg-form { display: grid; gap: 12px; width: 100%; margin: 6px 0 0; text-align: left; }
.pkg-form label { margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.pkg-buy .btn { width: 100%; }
.pkg-buy .form-control { background: rgba(255, 250, 235, .65); border-color: rgba(58, 22, 6, .3); color: var(--ink); font-weight: 700; text-align: center; }
.pkg-buy .form-control:focus { background: rgba(255, 250, 235, .85); color: var(--ink); }
.pkg-qty { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
.pkg-qty .form-control { appearance: textfield; }
.pkg-qty .form-control::-webkit-inner-spin-button, .pkg-qty .form-control::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.pkg-step { display: grid; place-items: center; height: 46px; border-radius: 10px; border: 1px solid rgba(58, 22, 6, .3); background: rgba(58, 22, 6, .08); color: var(--ink); transition: background-color 160ms var(--ease-out), opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
.pkg-step:active { transform: scale(.97); }
.pkg-step:disabled { opacity: .4; cursor: not-allowed; }
.pkg-note { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; font-weight: 600; font-size: 14px; color: var(--ink-2); text-align: left; }
.pkg-page { margin-bottom: 28px; }
.pkg-page .pkg-info { padding: 24px; }

.shop-pay { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.shop-pay > div { display: flex; }
.shop-pay-card { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; padding: 24px 20px 22px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.shop-pay-logo { display: grid; place-items: center; width: 100%; height: 84px; padding: 14px; border-radius: 10px; background: #fff; }
.shop-pay-logo img { max-height: 48px; object-fit: contain; }
.shop-pay-visual img { width: 110px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5)); }
.shop-pay-name { font-weight: 700; font-size: 17px; color: #fff; }
.shop-pay-amount .x3d { font-size: 32px; }
.shop-pay-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent, #ffa500); }

.cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cart-main { display: grid; gap: 24px; min-width: 0; }
.cart-main:only-child { grid-column: 1 / -1; }
.cart-items { padding: 6px 22px 20px; }
.cart-list { margin: 0; padding: 0; list-style: none; }
.cart-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 128px 120px 40px; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.cart-thumb img { width: 82%; }
.cart-thumb .bi { font-size: 24px; color: var(--gold); }
.cart-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cart-name strong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: #fff; }
.cart-name > span { color: var(--muted); font-size: 13px; }
.cart-qty { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 4px; }
.cart-qty .form-control { padding: .45rem .2rem; text-align: center; }
.cart-qty .pkg-step { height: 40px; border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #fff; }
.cart-total { font-weight: 700; color: #fff; text-align: right; }
.cart-remove { width: 40px; height: 40px; padding: 0; }
.cart-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.cart-actions form, .cart-applied form { margin: 0; }
.cart-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cart-code { padding: 20px 22px; }
.page-content .cart-code h2 { margin: 0 0 12px; font-size: 16px; }
.cart-code .btn-stone { min-height: 0; padding: 0 14px; font-size: 13px; }
.cart-applied { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.cart-applied li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.cart-applied strong { color: #fff; }
.cart-summary { position: sticky; top: calc(var(--nav-h) + 20px); padding: 22px; }
.cart-sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.cart-sum-row .price { font-size: 30px; }
.cart-payable { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 12px 0 0; color: var(--gold); font-weight: 600; }
.cart-lack { display: grid; gap: 6px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(224, 83, 61, .4); background: rgba(224, 83, 61, .1); font-size: 14px; }
.cart-lack p { margin: 0; }
.cart-lack p:first-child { display: flex; gap: 8px; color: #fff; font-weight: 600; }
.cart-lack .bi { color: #ff7a66; }
.cart-lack-balance { color: var(--muted); }
.cart-pay { display: grid; gap: 12px; margin-top: 18px; }
.cart-pay .btn { width: 100%; }

.shop-table { margin-bottom: 24px; padding: 8px 20px; }
.page-content .shop-table h2 { margin: 18px 0 6px; font-size: 18px; }
.shop-table .table { margin: 0; }
.shop-amount { font-weight: 700; color: var(--gold); }

@media (hover: hover) and (pointer: fine) {
    .shop-cats a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
    .shop-cats a.active:hover { background: rgba(255, 165, 0, .14); color: var(--accent, #ffa500); }
    .shop-tile:hover .shop-tile-go { color: var(--accent, #ffa500); }
    .pkg-step:hover:not(:disabled) { background: rgba(58, 22, 6, .16); }
    .cart-qty .pkg-step:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
}

@media (max-width: 991.98px) {
    .shop { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
    .shop-side { display: contents; }
    .shop-account, .shop-login { order: 1; }
    .shop-cats { order: 2; }
    .shop-main { order: 3; width: 100%; }
    .shop-extra { order: 4; }
    .shop-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
    .shop-account-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
    .shop-account-btns .btn { width: auto; }
    .shop-cats { padding: 14px 10px 10px; }
    .shop-cats ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .shop-cats ul::-webkit-scrollbar { display: none; }
    .shop-cats li { flex: none; }
    .shop-cats a, .shop-cats .sub a { padding: 0 14px; border: 1px solid var(--line); white-space: nowrap; }
    .shop-cats a.active { border-color: rgba(255, 165, 0, .45); }
    .shop-cats a.active::before { display: none; }
    .pkg-detail { grid-template-columns: minmax(0, 1fr); }
    .pkg-buy { width: 100%; max-width: 420px; justify-self: center; }
    .cart { grid-template-columns: minmax(0, 1fr); }
    .cart-main { display: contents; }
    .cart-summary { position: static; }
    .cart-codes { order: 1; }
}

@media (max-width: 767.98px) {
    .cart-codes { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 575.98px) {
    .shop-account-btns { width: 100%; }
    .shop-account-btns > * { flex: 1 1 auto; }
    .shop-account-btns .btn { width: 100%; }
    .shop-intro { padding: 20px; }
    .pkg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pkg-body { padding: 14px; }
    .page-content .pkg-name { font-size: 16px; }
    .pkg-price { flex-wrap: nowrap; gap: 6px; margin-bottom: 12px; padding-top: 12px; }
    .pkg-price .price { font-size: 20px; }
    .pkg-body .btn { padding: 0 8px; font-size: 12px; letter-spacing: .03em; }
    .pkg-now { font-size: 40px; }
    .pkg-buy { --edge: .32; }
    .cart-items { padding: 4px 16px 16px; }
    .cart-row { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "thumb name remove" "thumb qty total"; gap: 10px 12px; }
    .cart-thumb { grid-area: thumb; width: 48px; height: 48px; align-self: start; }
    .cart-name { grid-area: name; }
    .cart-qty { grid-area: qty; width: 128px; }
    .cart-total { grid-area: total; }
    .cart-remove { grid-area: remove; justify-self: end; }
    .cart-actions { display: grid; }
    .cart-actions .btn { width: 100%; }
    .shop-pay { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .shop-pay-card { padding: 18px 14px; }
    .shop-pay-logo { height: 64px; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .pkg-step:active { transform: none; }
}
