* {
    box-sizing: border-box;
}

html {
    height: 100%;
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    color: var(--color-ink);
    background: var(--color-soft);
    font-family: "Prompt", Arial, sans-serif;
    line-height: 1.55;
}

main {
    flex: 1 0 auto;
}

body.has-modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.button-outline,
.summary-row a,
.empty-state a,
.checkout-panel a,
.toolbar-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--color-cyan);
    border-radius: var(--radius);
    background: var(--color-cyan);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.button-outline,
.toolbar-actions a {
    background: transparent;
    color: var(--color-cyan);
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-line);
    backdrop-filter: blur(12px);
}

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

.brand img {
    width: 188px;
    height: auto;
}

.site-nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: var(--color-muted);
    font-size: 15px;
}

.site-nav a,
.nav-form button,
.nav-account-trigger {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 4px;
    color: var(--color-muted);
    background: transparent;
    border: 0;
    line-height: 1;
    white-space: nowrap;
}

.nav-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.cart-link [data-cart-count] {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--color-charcoal);
    color: #fff;
    font-size: 13px;
}

.nav-toggle {
    display: none;
    width: 42px;
    padding: 0;
    border-color: rgba(13, 116, 216, 0.28);
    background: #ffffff;
    color: var(--color-navy);
    box-shadow: none;
    font-size: 20px;
}

.catalog-shell {
    padding: 40px 0 56px;
}

.catalog-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--color-cyan);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 14px;
    font-size: 40px;
    line-height: 1.18;
}

h2 {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.35;
}

.lead {
    max-width: 760px;
    color: var(--color-muted);
    font-size: 18px;
}

.checkout-panel,
.product-card,
.page-panel,
.auth-panel,
.detail-media,
.detail-content,
.detail-description-card,
.checkout-summary,
.empty-state,
.placeholder-box {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.checkout-panel {
    padding: 22px;
}

.checkout-panel span {
    display: block;
    color: var(--color-muted);
    font-size: 14px;
}

.checkout-panel strong {
    display: block;
    margin: 8px 0;
    font-size: 28px;
}

.checkout-panel p {
    color: var(--color-muted);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.toolbar span {
    margin-left: 8px;
    color: var(--color-muted);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    display: grid;
    grid-template-rows: 176px 1fr auto;
    overflow: hidden;
}

.product-media,
.detail-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 176px;
    background:
        linear-gradient(135deg, rgba(15, 143, 168, 0.12), rgba(44, 140, 85, 0.12)),
        #f9fbfc;
}

.device-mark {
    display: inline-flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #fff;
    color: var(--color-charcoal);
    font-size: 28px;
    font-weight: 600;
}

.device-mark.large {
    width: 140px;
    height: 140px;
    font-size: 44px;
}

.product-body {
    padding: 18px;
}

.product-body p,
.detail-content p,
.empty-state p,
.placeholder-box p {
    color: var(--color-muted);
}

.product-meta,
.product-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--color-muted);
    font-size: 13px;
}

.product-status {
    align-items: center;
    margin-top: 14px;
}

.status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(44, 140, 85, 0.12);
    color: var(--color-green);
    font-weight: 600;
}

.status.preorder {
    background: rgba(199, 131, 24, 0.14);
    color: var(--color-amber);
}

.status.out_of_stock {
    background: rgba(185, 65, 65, 0.12);
    color: var(--color-red);
}

.status.contact_sales {
    background: rgba(28, 134, 158, 0.12);
    color: var(--color-teal);
}

.status.discontinued {
    background: rgba(99, 112, 132, 0.14);
    color: var(--color-muted);
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 18px;
    border-top: 1px solid var(--color-line);
}

.product-actions strong,
.detail-actions strong {
    font-size: 20px;
}

.product-actions form {
    margin: 0;
}

.page-panel,
.auth-panel {
    margin: 36px auto 56px;
    padding: 24px;
}

.page-section {
    padding: 44px 0 64px;
}

.page-title {
    margin-bottom: 22px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--color-line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

td span {
    display: block;
    color: var(--color-muted);
    font-size: 13px;
}

.orders-table-wrap table {
    min-width: 920px;
}

.orders-table-wrap th,
.orders-table-wrap td {
    text-align: center;
    vertical-align: middle;
}

.orders-table-wrap th:first-child,
.orders-table-wrap td:first-child {
    text-align: left;
}

.orders-table-wrap td {
    font-size: 18px;
    font-weight: 700;
}

.orders-table-wrap td:first-child {
    font-size: 16px;
}

.order-detail-button {
    min-height: 38px;
    white-space: nowrap;
    background: var(--color-ink);
    color: #fff;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-ink);
}

select:disabled,
.address-picker input:read-only {
    background: #f8fafc;
    color: var(--color-muted);
}

textarea {
    resize: vertical;
}

.text-button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    color: var(--color-red);
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 18px;
}

.summary-row strong {
    font-size: 24px;
}
