:root {
    --font-body: "Bahnschrift", "Segoe UI", sans-serif;
    --font-display: "Impact", "Bahnschrift SemiBold", "Arial Black", sans-serif;
    --bg: #090a0d;
    --panel: #11141a;
    --panel-2: #171b23;
    --ink: #f3f6f8;
    --muted: #9aa5b2;
    --line: #2b313d;
    --line-hot: #ff3d2e;
    --cyan: #44e7ff;
    --green: #a6ff4d;
    --amber: #ffb33d;
    --danger: #ff4d5a;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.45;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(135deg, #090a0d 0%, #101116 44%, #0c1715 100%);
    background-size: 46px 46px, 46px 46px, auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0%, rgba(68, 231, 255, 0.05) 42%, transparent 43%, transparent 56%, rgba(255, 61, 46, 0.06) 57%, transparent 58%);
}

.container {
    width: min(1180px, 94vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 10, 13, 0.92);
    backdrop-filter: blur(14px);
}

.header-top {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: uppercase;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-hot);
    background: #1a0f10;
    color: var(--cyan);
    box-shadow: inset 0 0 0 1px rgba(68, 231, 255, 0.24);
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.main-nav a,
.link-like-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
}

.main-nav a:hover,
.link-like-button:hover {
    border-color: var(--line);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.045);
}

.cart-link span {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(68, 231, 255, 0.42);
    color: var(--cyan);
}

.cta-nav,
.button-primary,
button {
    border: 1px solid #ff5a4d;
    background: linear-gradient(180deg, #ff4b39, #c91f1a);
    color: #fff !important;
}

.cta-nav:hover,
.button-primary:hover,
button:hover {
    background: linear-gradient(180deg, #ff6b4f, #e02b22);
}

.logout-form {
    margin: 0;
}

.account-strip {
    margin-top: -0.65rem;
    padding-bottom: 0.6rem;
}

.welcome-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

main {
    position: relative;
    padding: 1.15rem 0 3rem;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.45rem, 7vw, 5.6rem);
}

h2 {
    font-size: clamp(1.55rem, 3.5vw, 2.35rem);
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0;
    color: var(--muted);
}

a {
    color: var(--cyan);
}

a:hover {
    color: var(--green);
}

.messages {
    list-style: none;
    margin: 0.8rem auto 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.message {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    padding: 0.7rem 0.85rem;
}

.message.success {
    border-color: rgba(166, 255, 77, 0.5);
}

.message.warning {
    border-color: rgba(255, 179, 61, 0.55);
}

.message.error {
    border-color: rgba(255, 77, 90, 0.6);
}

.storefront-stage {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: end;
    gap: 1rem;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(9, 10, 13, 0.96) 0%, rgba(9, 10, 13, 0.74) 54%, rgba(9, 10, 13, 0.22) 100%),
        url("/static/images/products/gaming-desktop.svg") center right / cover no-repeat;
    box-shadow: var(--shadow);
    padding: clamp(1rem, 3vw, 2rem);
}

.storefront-stage-gaming {
    border-color: rgba(255, 61, 46, 0.55);
}

.stage-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    display: grid;
    gap: 0.7rem;
}

.stage-copy p {
    max-width: 600px;
    color: #c5ced8;
    font-size: 1.05rem;
}

.stage-machine {
    position: absolute;
    right: -2%;
    bottom: -8%;
    width: min(48vw, 560px);
    max-height: 360px;
    object-fit: cover;
    opacity: 0.88;
}

.stage-stats {
    position: relative;
    z-index: 1;
    align-self: end;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}

.stage-stats div {
    border-left: 2px solid var(--line-hot);
    background: rgba(17, 20, 26, 0.76);
    padding: 0.65rem;
}

.stage-stats strong {
    display: block;
    color: var(--cyan);
    font-size: 1.35rem;
    line-height: 1;
}

.stage-stats span {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    border-left: 3px solid var(--line-hot);
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    padding-left: 0.55rem;
}

.page-head {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 1rem;
}

.page-head h1 {
    font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.category-rail {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.8rem 0;
    scrollbar-width: thin;
}

.category-rail a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(17, 20, 26, 0.72);
    text-decoration: none;
    padding: 0.55rem 0.75rem;
}

.category-rail a.active,
.category-rail a:hover {
    border-color: rgba(68, 231, 255, 0.5);
    color: var(--ink);
    background: rgba(68, 231, 255, 0.08);
}

.category-rail span {
    color: var(--cyan);
    font-size: 0.8rem;
}

.showcase-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.showcase-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--line);
    background: rgba(17, 20, 26, 0.82);
    color: var(--ink);
    text-decoration: none;
    min-height: 86px;
    padding: 0.55rem;
}

.showcase-item:hover {
    border-color: rgba(255, 61, 46, 0.72);
    background: rgba(31, 20, 20, 0.92);
}

.showcase-item img {
    width: 92px;
    height: 62px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.showcase-item strong,
.showcase-item small,
.showcase-item b {
    display: block;
}

.showcase-item small {
    overflow: hidden;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.showcase-item b {
    color: var(--green);
}

.catalog-toolbar {
    margin: 0 0 1rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(9, 10, 13, 0.76);
    padding: 0.8rem 0;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(105px, 0.8fr)) auto auto;
    gap: 0.55rem;
    align-items: end;
}

label {
    display: grid;
    gap: 0.28rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #0d1015;
    color: var(--ink);
    font: inherit;
    padding: 0.55rem 0.65rem;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    outline: none;
}

.stock-toggle {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--line);
    background: #0d1015;
    padding: 0 0.65rem;
}

.stock-toggle input {
    width: 16px;
    min-height: 16px;
}

.filter-actions,
.cart-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

button,
.button-primary,
.button-secondary,
.button-danger {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.main-nav .link-like-button {
    width: auto;
    min-height: 38px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted) !important;
    font-weight: 700;
    text-transform: none;
    padding: 0.45rem 0.7rem;
}

.main-nav .link-like-button:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink) !important;
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.button-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(68, 231, 255, 0.08);
}

.button-danger {
    border: 1px solid var(--danger);
    background: rgba(255, 77, 90, 0.14);
    color: #ffd8dc;
}

.button-danger:hover {
    background: rgba(255, 77, 90, 0.25);
}

.compact {
    min-height: 34px;
    padding: 0.35rem 0.6rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 0.85rem;
}

.product-card,
.related-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(23, 27, 35, 0.98), rgba(13, 16, 21, 0.98));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    padding: 0.72rem;
}

.product-card-gaming,
.related-card-gaming {
    border-color: rgba(255, 61, 46, 0.55);
    background:
        linear-gradient(135deg, rgba(255, 61, 46, 0.13) 0%, transparent 34%),
        linear-gradient(180deg, rgba(23, 27, 35, 1), rgba(11, 13, 18, 1));
}

.product-image-wrap,
.detail-media,
.related-image-wrap {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0a0d12;
}

.product-image-wrap {
    aspect-ratio: 16 / 10;
    margin-bottom: 0.7rem;
}

.product-image,
.related-image,
.detail-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.22s ease;
}

.product-card:hover {
    border-color: rgba(68, 231, 255, 0.62);
}

.product-card:hover .product-image,
.related-card:hover .related-image {
    transform: scale(1.035);
}

.product-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 28px;
    margin-bottom: 0.55rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    color: var(--muted);
    background: #0d1015;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.22rem 0.45rem;
}

.badge-accent {
    border-color: rgba(166, 255, 77, 0.5);
    color: var(--green);
}

.badge-gaming {
    border-color: rgba(255, 61, 46, 0.65);
    color: #ff8a7f;
}

.product-card h2 {
    min-height: 2.2em;
    font-size: 1.35rem;
}

.product-card h2 a,
.related-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.product-card h2 a:hover,
.related-card h3 a:hover {
    color: var(--cyan);
}

.product-brand {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0.75rem 0;
    background: var(--line);
}

.spec-grid span {
    min-height: 42px;
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
    background: #0d1015;
    color: #c5ced8;
    font-size: 0.86rem;
    padding: 0.48rem;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.price,
.buy-price {
    color: var(--green);
    font-size: 1.45rem;
    font-weight: 900;
}

.rating {
    color: var(--amber);
    font-weight: 900;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.7rem;
}

.inline-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.inline-form input {
    width: 68px;
}

.stock-empty {
    color: var(--danger);
    font-weight: 900;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 290px;
    gap: 1rem;
    align-items: start;
}

.back-link {
    grid-column: 1 / -1;
    width: fit-content;
    color: var(--muted);
    text-decoration: none;
}

.back-link:hover {
    color: var(--cyan);
}

.detail-media {
    aspect-ratio: 16 / 11;
    min-height: 330px;
    box-shadow: var(--shadow);
}

.detail-copy {
    display: grid;
    gap: 0.75rem;
}

.detail-copy h1 {
    font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.detail-description {
    color: #c5ced8;
}

.detail-spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 0.35rem;
    background: var(--line);
}

.detail-spec-grid div {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 0.25rem;
    background: #0d1015;
    padding: 0.65rem;
}

.detail-spec-grid strong {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.detail-spec-grid span {
    overflow-wrap: anywhere;
    color: var(--ink);
}

.detail-buy-box,
.checkout-summary,
.checkout-panel,
.auth-card,
.empty-state,
.cart-summary,
.order-meta-grid > div {
    border: 1px solid var(--line);
    background: rgba(17, 20, 26, 0.92);
    padding: 1rem;
}

.detail-buy-box {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 0.8rem;
}

.stock-pill {
    width: fit-content;
    border: 1px solid rgba(166, 255, 77, 0.45);
    color: var(--green);
    background: rgba(166, 255, 77, 0.08);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.25rem 0.45rem;
}

.checkout-form {
    display: grid;
    gap: 0.7rem;
}

.checkout-form label span {
    color: var(--muted);
}

.related-section {
    margin-top: 1.25rem;
}

.related-section h2 {
    margin-bottom: 0.8rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.85rem;
}

.related-image-wrap {
    aspect-ratio: 16 / 10;
    margin-bottom: 0.65rem;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: rgba(17, 20, 26, 0.92);
    margin-bottom: 0.85rem;
}

.cart-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    padding: 0.72rem;
}

.cart-table th {
    color: var(--muted);
    background: #0d1015;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.cart-table tr:last-child td {
    border-bottom: 0;
}

.table-product {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.table-thumb {
    width: 82px;
    height: 52px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    object-fit: cover;
}

.small-text {
    color: var(--muted);
    font-size: 0.82rem;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.cart-summary strong,
.summary-total {
    color: var(--green);
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.checkout-summary {
    position: sticky;
    top: 92px;
}

.checkout-summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.checkout-summary li {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.55rem;
}

.field-error {
    color: #ff9ba2;
    font-size: 0.8rem;
}

.status {
    display: inline-flex;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 0.22rem 0.45rem;
    font-weight: 900;
    text-transform: uppercase;
}

.status-pending {
    border-color: rgba(255, 179, 61, 0.55);
    color: var(--amber);
}

.status-processing,
.status-shipped {
    border-color: rgba(68, 231, 255, 0.48);
    color: var(--cyan);
}

.status-completed {
    border-color: rgba(166, 255, 77, 0.48);
    color: var(--green);
}

.status-canceled {
    border-color: rgba(255, 77, 90, 0.6);
    color: var(--danger);
}

.order-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.auth-card,
.empty-state {
    max-width: 540px;
    margin: 0 auto;
    display: grid;
    gap: 0.75rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #07080a;
}

.site-footer p {
    padding: 1rem 0;
    color: var(--muted);
    font-size: 0.88rem;
}

@media (max-width: 1050px) {
    .filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .search-field {
        grid-column: 1 / -1;
    }

    .showcase-strip,
    .product-detail,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .detail-buy-box,
    .checkout-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-top {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.9rem 0;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav a,
    .link-like-button {
        min-height: 34px;
        padding: 0.35rem 0.55rem;
    }

    .storefront-stage {
        min-height: 430px;
        grid-template-columns: 1fr;
        align-items: end;
        background-position: center bottom;
    }

    .stage-machine {
        width: 100%;
        right: -22%;
        opacity: 0.38;
    }

    .stage-stats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .showcase-strip,
    .filter-form,
    .order-meta-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .cart-summary,
    .cart-actions,
    .product-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-form,
    .filter-actions {
        width: 100%;
    }

    .inline-form input {
        flex: 1;
        width: auto;
    }

    button,
    .button-primary,
    .button-secondary,
    .button-danger {
        width: 100%;
    }

    .main-nav .link-like-button {
        width: auto;
        min-height: 34px;
        padding: 0.35rem 0.55rem;
    }
}
