/* Basket and sale controls extend the established paper/lime storefront. */
.ps-header-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--ps-soft);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex: none;
}
.ps-header-cart [data-cart-count] { font-variant-numeric: tabular-nums; }
.ps-cart-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-block: 14px;
    padding: 16px 20px;
    background: var(--ps-soft);
    color: var(--ps-ink);
    font-size: 15px;
}
.ps-cart-feedback:empty { display: none; }
.ps-cart-feedback a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; flex: none; }
[data-cart-add][aria-busy="true"] { opacity: .65; cursor: wait; }
.ps-game-card .ps-game-bottom { display: block; }
.ps-game-price { display: block; font-variant-numeric: tabular-nums; }
.ps-game-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ps-game-actions > a { min-width: 0; width: 100%; min-height: 44px; height: auto; padding: 10px 8px; border-radius: 6px; font-size: 13px; line-height: 1.35; text-align: center; }
.ps-game-actions .ps-game-buy { min-width: 0; width: 100%; padding: 10px 8px; justify-content: center; font-size: 13px; }
.ps-game-actions .ps-game-cart { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--ps-soft); font-weight: 700; }
.ps-game-actions .ps-game-cart svg { width: 18px; height: 18px; }
.ps-game-actions > a:only-child { grid-column: 1 / -1; }
.ps-product-purchase-actions { display: grid; gap: 10px; margin-bottom: 16px; }
.ps-product-purchase-actions .ps-button { width: 100%; border-radius: 6px; }
.ps-product-purchase-actions .ps-button-secondary { background: var(--ps-soft); }
.ps-game-cover .ps-sale-badge,
.ps-product-cover .ps-sale-badge {
    position: absolute;
    inset: 12px auto auto 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--ps-lime);
    color: var(--ps-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    max-width: calc(100% - 24px);
}
.ps-product-cover { position: relative; }
.ps-product-cover .ps-sale-badge { min-height: 48px; font-size: 24px; inset-block-start: 16px; inset-inline-start: 16px; }
.ps-sale-clock { color: var(--ps-ink); font-variant-numeric: tabular-nums; }
.ps-sale-clock [data-sale-remaining] { display: block; margin-top: 3px; font-weight: 700; }
.ps-sale-card .ps-sale-clock { font-size: 13px; line-height: 1.5; }
.ps-sale-detail .ps-sale-clock { display: block; margin-top: 14px; font-size: 16px; }
.ps-sale-detail .ps-sale-clock [data-sale-remaining] { font-size: 24px; }
.ps-sale-state:not(:empty) { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ps-muted); }
.ps-related-games { margin-top: 80px; }
.ps-related-games .ps-section-heading { margin-bottom: 28px; }
.ps-related-games .ps-game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ps-cart-page { padding-bottom: 80px; }
.ps-cart-heading { margin: 28px 0 36px; }
.ps-cart-heading h1 { font-size: clamp(36px, 4.5vw, 54px); }
.ps-cart-heading > p { margin-top: 16px; max-width: 62ch; color: var(--ps-muted); }
.ps-cart-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.ps-cart-layout > *,
.ps-cart-item > * { min-width: 0; }
.ps-cart-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ps-cart-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px 20px; align-items: start; padding: 24px; background: var(--ps-surface); border-radius: 12px; }
.ps-cart-cover { display: block; width: 88px; aspect-ratio: 1; background: var(--ps-soft); overflow: hidden; border-radius: 4px; }
.ps-cart-cover img { width: 100%; height: 100%; object-fit: contain; }
.ps-cart-copy h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.02em; text-wrap: initial; overflow-wrap: anywhere; }
.ps-cart-copy p { margin-top: 6px; font-size: 14px; color: var(--ps-muted); line-height: 1.5; overflow-wrap: anywhere; }
.ps-cart-item-price { font-size: 20px; font-weight: 750; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-cart-item form { grid-column: 2 / -1; margin-top: -8px; }
.ps-cart-remove { border: 0; padding: 8px 0; min-height: 44px; color: var(--ps-ink); background: transparent; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.ps-cart-summary { position: sticky; top: 28px; background: var(--ps-soft); padding: 28px; border-radius: 12px; }
.ps-cart-summary h2 { font-size: 25px; line-height: 1.2; margin-bottom: 20px; }
.ps-cart-summary > p { font-size: 14px; line-height: 1.6; }
.ps-cart-total { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-block: 24px; }
.ps-cart-total strong { font-size: 30px; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-cart-summary .ps-button,
.ps-cart-confirm { width: 100%; min-height: 52px; border-radius: 6px; }
.ps-cart-summary .ps-button { margin-top: 12px; }
.ps-cart-summary .ps-text-link { margin-top: 12px; font-size: 14px; }
.ps-cart-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.ps-cart-actions .ps-button { border-radius: 6px; }
.ps-cart-actions form { margin: 0; }
.ps-cart-common-account { margin: 20px 0 28px; padding: 18px 20px; background: var(--ps-soft); color: var(--ps-ink); font-size: 15px; line-height: 1.6; }
.ps-cart-notice { margin-block: 20px; padding: 20px 24px; background: var(--ps-soft); color: var(--ps-ink); border-radius: 8px; overflow-wrap: anywhere; }
.ps-cart-notice h2 { margin-bottom: 10px; font-size: 23px; line-height: 1.25; }
.ps-cart-notice p + p { margin-top: 10px; }
.ps-cart-notice a { text-decoration: underline; text-underline-offset: 4px; }
.ps-cart-notice.is-error { background: #f8e7e3; color: #79251f; }
.ps-cart-notice.is-changed { background: var(--ps-lime); }
.ps-cart-notice ul { padding-inline-start: 20px; margin: 12px 0; }
.ps-cart-badge { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.45; }
.ps-cart-badge.is-unavailable { color: #79251f; }
.ps-cart-empty { max-width: 760px; padding: 72px 0 48px; min-height: 50vh; }
.ps-cart-empty h1 { font-size: clamp(36px, 4.5vw, 52px); }
.ps-cart-empty > p { max-width: 50ch; margin-top: 20px; font-size: 18px; color: var(--ps-muted); }
.ps-cart-empty .ps-cart-actions { margin-top: 28px; }
.ps-cart-checkout-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.ps-cart-checkout-items li { min-width: 0; }
.ps-cart-checkout-items h3 { font-size: 17px; line-height: 1.4; margin-bottom: 6px; text-wrap: initial; }
.ps-cart-checkout-items p { font-size: 14px; color: var(--ps-muted); }
.ps-cart-checkout-items strong { display: block; margin-top: 8px; font-size: 18px; font-variant-numeric: tabular-nums; }
.ps-commerce-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .3fr); gap: 20px; align-items: end; margin-bottom: 28px; }
.ps-commerce-search .ps-search { margin: 0; border-radius: 6px; }
.ps-commerce-search .ps-search input { min-width: 0; font-size: 16px; }
.ps-commerce-search .ps-button { border-radius: 6px; }
.ps-commerce-search > label { display: grid; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.ps-commerce-search select { width: 100%; min-width: 0; min-height: 60px; padding: 12px; border: 1px solid #7d876c; border-radius: 6px; background: var(--ps-surface); color: var(--ps-ink); font-size: 16px; }
.ps-search-page .ps-catalog-count { margin-bottom: 24px; }
.ps-order-lines { width: 100%; list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 24px; }
.ps-order-lines > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 24px; min-width: 0; }
.ps-order-lines > li > div { min-width: 0; overflow-wrap: anywhere; }
.ps-order-lines > li > div > strong { display: block; font-size: 16px; line-height: 1.5; font-weight: 700; white-space: normal; }
.ps-order-lines p { margin: 6px 0; font-size: 14px; line-height: 1.5; }
.ps-order-lines span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; }
.ps-order-lines > li > strong { font-size: 18px; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 480px) { .ps-order-lines > li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
@media (hover: hover) and (pointer: fine) {
    .ps-header-cart:hover,
    .ps-game-cart:hover { background: var(--ps-lime); }
    .ps-cart-copy h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 1100px) {
    .ps-header-inner { gap: 16px; }
    .ps-cart-layout { grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: 20px; }
    .ps-cart-item { padding: 20px; gap: 14px; grid-template-columns: 72px minmax(0, 1fr); }
    .ps-cart-cover { width: 72px; }
    .ps-cart-item-price { grid-column: 2; }
    .ps-cart-item form { grid-column: 2; }
}
@media (max-width: 1000px) {
    .ps-header-cart { margin-inline-start: auto; }
    .ps-related-games .ps-game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .ps-commerce-search { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ps-commerce-search .ps-search { gap: 8px; padding-inline-start: 12px; }
    .ps-commerce-search .ps-search .ps-button { padding-inline: 14px; }
    .ps-commerce-search select { min-height: 52px; }
    .ps-game-actions { grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }
    .ps-game-actions > a,
    .ps-game-actions .ps-game-buy { min-height: 44px; font-size: 13px; }
    .ps-game-cover .ps-sale-badge { inset: 8px auto auto 8px; min-height: 34px; min-width: 50px; padding: 6px 8px; font-size: 17px; }
    .ps-related-games { margin-top: 52px; }
    .ps-related-games .ps-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ps-cart-page { padding-bottom: 56px; }
    .ps-cart-heading { margin: 20px 0 28px; }
    .ps-cart-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .ps-cart-summary { position: static; padding: 24px; }
    .ps-cart-item { grid-template-columns: 76px minmax(0, 1fr); padding: 18px; gap: 12px 16px; }
    .ps-cart-cover { width: 76px; grid-row: span 2; }
    .ps-cart-copy h2 { font-size: 18px; }
    .ps-cart-item-price { grid-column: 2; font-size: 20px; }
    .ps-cart-item form { margin-top: -4px; }
    .ps-cart-common-account { font-size: 14px; margin-block: 18px 24px; }
    .ps-cart-notice { padding: 18px; }
    .ps-cart-feedback { flex-wrap: wrap; padding: 14px 16px; }
    .ps-cart-feedback a { min-height: 36px; }
    .ps-cart-empty { padding-block: 48px 32px; }
    .ps-cart-empty > p { font-size: 16px; }
}
@media (max-width: 480px) {
    .ps-header-inner { gap: 10px; }
    .ps-header-cart { padding: 8px 10px; gap: 5px; }
    .ps-header-cart .ps-header-cart-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ps-header-cart svg { width: 20px; height: 20px; }
    .ps-cart-item { grid-template-columns: 60px minmax(0, 1fr); padding: 16px; gap: 10px 12px; }
    .ps-cart-cover { width: 60px; }
    .ps-cart-copy h2 { font-size: 16px; }
    .ps-cart-copy p { font-size: 13px; }
    .ps-cart-total strong { font-size: 28px; }
    .ps-cart-empty .ps-cart-actions { align-items: stretch; flex-direction: column; gap: 12px; }
    .ps-cart-empty .ps-cart-actions a { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .ps-product-purchase-actions .ps-button,
    .ps-game-actions > a { transition: none; transform: none; }
}
