:root {
    --wh-radius-sm: 0.375rem;
    --wh-radius: 0.5rem;
    --wh-radius-lg: 0.75rem;
    --wh-radius-full: 9999px;
    --wh-border: #e5e5e5;
    --wh-border-strong: #d4d4d4;
    --wh-bg: #fafafa;
    --wh-surface: #ffffff;
    --wh-text: #171717;
    --wh-text-secondary: #525252;
    --wh-text-muted: #737373;
    --wh-text-faint: #a3a3a3;
    --wh-accent: #171717;
    --wh-accent-hover: #262626;
    --wh-success: #16a34a;
    --wh-success-hover: #15803d;
    --wh-danger: #dc2626;
    --wh-danger-bg: #fef2f2;
    --wh-danger-border: #fecaca;
    --wh-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --wh-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --wh-shadow-drawer: -8px 0 32px rgba(0, 0, 0, 0.12);
    --wh-transition: 0.15s ease;
    --wh-header-height: 4rem;
    --wh-shop-gutter: 1rem;
    --wh-shop-rail-width: 11.5rem;
    --wh-shop-rail-gap: 1.5rem;
    --wh-font-xs: 0.6875rem;
    --wh-font-sm: 0.75rem;
    --wh-font-base: 0.875rem;
    --wh-font-md: 0.9375rem;
    --wh-font-lg: 1rem;
    --wh-font-xl: 1.125rem;
    --wh-font-2xl: 1.5rem;
    --wh-font-hero: 1.75rem;
    --wh-leading-tight: 1.25;
    --wh-leading-snug: 1.35;
    --wh-leading-normal: 1.5;
    --wh-leading-relaxed: 1.55;
    --wh-tracking-tight: -0.02em;
    --wh-tracking-snug: -0.01em;
    --wh-tracking-wide: 0.04em;
    --wh-tracking-wider: 0.08em;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--wh-bg);
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text);
}

/* Shared layout & typography */
.wh-page-header {
    margin-bottom: 1.5rem;
}

.wh-section-heading,
.wh-page-title {
    margin: 0;
    font-size: var(--wh-font-2xl);
    font-weight: 700;
    color: var(--wh-text);
    letter-spacing: var(--wh-tracking-tight);
    line-height: var(--wh-leading-tight);
}

.wh-section-desc,
.wh-page-desc {
    margin: 0.375rem 0 0;
    font-size: var(--wh-font-base);
    color: var(--wh-text-muted);
    line-height: var(--wh-leading-normal);
}

.wh-panel-title {
    margin: 0;
    font-size: var(--wh-font-xl);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-snug);
    line-height: var(--wh-leading-tight);
    color: var(--wh-text);
}

.wh-body-text {
    margin: 0;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-meta-text {
    margin: 0;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-caption {
    font-size: var(--wh-font-xs);
    font-weight: 600;
    letter-spacing: var(--wh-tracking-wider);
    text-transform: uppercase;
    color: var(--wh-text-muted);
}

/* Cards & surfaces */
.wh-card {
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    box-shadow: var(--wh-shadow-sm);
}

.wh-card-padded {
    padding: 1.5rem;
}

.wh-card-padded-lg {
    padding: 2rem;
}

.wh-toolbar {
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    box-shadow: var(--wh-shadow-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Shop layout — left rail */
.wh-shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem 1rem 2rem;
}

.wh-shop-rail {
    flex: 0 0 var(--wh-shop-rail-width);
    width: var(--wh-shop-rail-width);
    align-self: flex-start;
}

#view-shop,
#view-orders,
#view-account {
    padding-top: var(--wh-header-height);
}

@media (min-width: 769px) {
    .wh-shop-layout {
        position: relative;
    }

    .wh-shop-rail {
        position: fixed;
        top: calc(var(--wh-header-height) + 1.5rem);
        left: var(--wh-shop-gutter);
        z-index: 20;
        max-height: calc(100vh - var(--wh-header-height) - 2.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .wh-shop-main {
        margin-left: calc(var(--wh-shop-rail-width) + var(--wh-shop-rail-gap));
    }
}

.wh-shop-rail-section + .wh-shop-rail-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wh-border);
}

.wh-rail-label {
    display: block;
    margin: 0 0 0.5rem;
    font-size: var(--wh-font-sm);
    font-weight: 600;
    letter-spacing: var(--wh-tracking-snug);
    color: var(--wh-text-muted);
}

.wh-collection-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wh-collection-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 0;
    border-radius: var(--wh-radius);
    background: transparent;
    color: var(--wh-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    line-height: 1.35;
    cursor: pointer;
    transition: background var(--wh-transition), color var(--wh-transition);
}

.wh-collection-item:hover {
    background: var(--wh-bg);
    color: var(--wh-text);
}

.wh-collection-item.is-active {
    background: var(--wh-accent);
    color: #fff;
}

.wh-collection-item.is-active:hover {
    background: var(--wh-accent-hover);
    color: #fff;
}

.wh-collection-empty {
    font-size: 0.8125rem;
    color: var(--wh-text-muted);
}

.wh-shop-main {
    flex: 1;
    min-width: 0;
}

.wh-catalog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.wh-catalog-head-text {
    min-width: 0;
}

.wh-grid-controls {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 0.625rem;
    padding-top: 0.125rem;
}

.wh-grid-controls-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wh-text-muted);
    white-space: nowrap;
}

.wh-grid-slider {
    width: 6rem;
    height: 0.25rem;
    accent-color: var(--wh-accent);
    cursor: pointer;
}

.wh-grid-controls-value {
    min-width: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--wh-text-secondary);
    text-align: center;
}

@media (min-width: 641px) {
    .wh-grid-controls {
        display: flex;
    }
}

@media (max-width: 768px) {
    .wh-shop-layout {
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
    }

    .wh-shop-rail {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--wh-border);
    }

    .wh-shop-rail-section + .wh-shop-rail-section {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .wh-collection-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .wh-collection-item {
        width: auto;
        padding: 0.4375rem 0.75rem;
        border: 1px solid var(--wh-border);
        background: var(--wh-surface);
    }

    .wh-collection-item.is-active {
        border-color: var(--wh-accent);
    }
}

.wh-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    box-shadow: var(--wh-shadow-sm);
}

.wh-empty-state--compact {
    padding: 2.5rem 1rem 1.5rem;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.wh-empty-state__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: var(--wh-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--wh-bg);
    color: var(--wh-text-muted);
    border: 1px solid var(--wh-border);
}

.wh-empty-state__title {
    margin: 0;
    font-size: var(--wh-font-lg);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-snug);
    line-height: var(--wh-leading-tight);
    color: var(--wh-text);
}

.wh-empty-state__desc {
    margin: 0.375rem 0 0;
    max-width: 20rem;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-empty-state .wh-btn {
    margin-top: 1.25rem;
}

.wh-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-loading-state__spinner {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.75rem;
    animation: wh-spin 0.8s linear infinite;
}

@keyframes wh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form controls */
.wh-label {
    display: block;
    font-size: var(--wh-font-sm);
    font-weight: 600;
    color: var(--wh-text-muted);
    margin-bottom: 0.25rem;
}

.wh-label-lg {
    font-size: var(--wh-font-base);
    color: var(--wh-text-secondary);
    font-weight: 600;
}

.wh-label-optional {
    font-weight: 500;
    text-transform: none;
    color: var(--wh-text-subtle, #9ca3af);
}

.wh-field {
    display: flex;
    flex-direction: column;
}

.wh-field + .wh-field,
.wh-field + .grid,
.grid + .wh-field {
    margin-top: 0.75rem;
}

.wh-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wh-form-stack > .wh-field + .wh-field,
.wh-form-stack > .wh-field + .grid,
.wh-form-stack > .grid + .wh-field,
.wh-form-stack > .grid + .grid,
.wh-form-stack > .wh-form-row + .wh-field,
.wh-form-stack > .wh-field + .wh-form-row,
.wh-form-stack > .wh-form-row + .wh-form-row {
    margin-top: 0;
}

.grid > .wh-field + .wh-field,
.wh-form-row > .wh-field + .wh-field {
    margin-top: 0;
}

.wh-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
}

@media (min-width: 640px) {
    .wh-form-row--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 0.75rem;
        row-gap: 0;
    }
}

.wh-notice {
    padding: 0.75rem 1rem;
    border-radius: var(--wh-radius);
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
}

.wh-auth-bootstrap {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--wh-bg);
    color: var(--wh-text-muted);
}

.wh-auth-bootstrap.hidden {
    display: none;
}

.wh-auth-bootstrap-text {
    margin: 0;
    font-size: var(--wh-font-base);
}

.wh-empty-state--error .wh-empty-state__icon {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.line-sheet-stock-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0.375rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.line-sheet-stock-badge--oos {
    background: #fef2f2;
    color: #b91c1c;
}

.line-sheet-stock-badge--partial {
    background: #fffbeb;
    color: #b45309;
}

.line-sheet-qty-input--oos {
    opacity: 0.45;
    cursor: not-allowed;
}

.line-sheet-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wh-input,
.wh-select,
.wh-textarea {
    width: 100%;
    border: 1px solid var(--wh-border-strong);
    border-radius: var(--wh-radius);
    background: var(--wh-surface);
    color: var(--wh-text);
    transition: border-color var(--wh-transition), box-shadow var(--wh-transition);
}

.wh-input,
.wh-select {
    padding: 0.625rem 0.75rem;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-snug);
}

.wh-input-lg {
    padding: 0.75rem 1rem;
}

.wh-textarea {
    padding: 0.625rem 0.75rem;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    resize: vertical;
}

.wh-input:focus,
.wh-select:focus,
.wh-textarea:focus {
    outline: none;
    border-color: var(--wh-accent);
    box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.wh-field-hint {
    margin-top: 0.25rem;
    font-size: var(--wh-font-sm);
    color: var(--wh-text-muted);
    line-height: var(--wh-leading-snug);
}

.wh-error {
    padding: 0.75rem;
    border-radius: var(--wh-radius);
    background: var(--wh-danger-bg);
    border: 1px solid var(--wh-danger-border);
    color: var(--wh-danger);
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
}

/* Buttons */
.wh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border-radius: var(--wh-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--wh-transition), color var(--wh-transition),
        border-color var(--wh-transition), opacity var(--wh-transition);
    border: 1px solid transparent;
}

.wh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wh-btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wh-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.wh-btn-primary {
    background: var(--wh-accent);
    color: #fff;
    border-color: var(--wh-accent);
}

.wh-btn-primary:hover:not(:disabled) {
    background: var(--wh-accent-hover);
    border-color: var(--wh-accent-hover);
}

.wh-btn-success {
    background: var(--wh-success);
    color: #fff;
    border-color: var(--wh-success);
}

.wh-btn-success:hover:not(:disabled) {
    background: var(--wh-success-hover);
    border-color: var(--wh-success-hover);
}

.wh-btn-outline {
    background: var(--wh-surface);
    color: var(--wh-accent);
    border-color: var(--wh-accent);
}

.wh-btn-outline:hover:not(:disabled) {
    background: var(--wh-accent);
    color: #fff;
}

.wh-btn-danger {
    background: var(--wh-danger);
    color: #fff;
    border-color: var(--wh-danger);
}

.wh-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.wh-btn-ghost {
    background: transparent;
    color: var(--wh-text-muted);
    border-color: transparent;
}

.wh-btn-ghost:hover:not(:disabled) {
    color: var(--wh-text);
}

.wh-btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

.wh-btn-md {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
}

.wh-btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.wh-btn-block {
    width: 100%;
}

.wh-link {
    color: var(--wh-text);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wh-link:hover {
    color: var(--wh-accent-hover);
}

/* App header */
.wh-app-header {
    background: var(--wh-accent);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    box-shadow: var(--wh-shadow-md);
}

.wh-app-header-inner {
    width: 100%;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wh-app-header-start {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.wh-app-header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wh-nav-link {
    display: inline-block;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: var(--wh-radius);
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--wh-transition), background var(--wh-transition);
}

.wh-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.wh-nav-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.wh-icon-btn {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--wh-radius);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--wh-transition);
}

.wh-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.wh-account-menu {
    position: relative;
}

.wh-avatar-btn {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--wh-radius-full);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background var(--wh-transition);
}

.wh-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wh-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--wh-radius-full);
    background: #fff;
    color: var(--wh-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.wh-account-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 16rem;
    max-width: min(20rem, calc(100vw - 2rem));
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    box-shadow: var(--wh-shadow-md);
    overflow: hidden;
    z-index: 40;
}

.wh-account-dropdown-head {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--wh-border);
    min-width: 0;
}

.wh-account-dropdown-name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wh-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wh-account-dropdown-email,
.wh-account-dropdown-contact {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: var(--wh-text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wh-account-dropdown-meta {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: var(--wh-text-muted);
    line-height: 1.4;
}

.wh-account-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 0;
    background: transparent;
    color: var(--wh-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--wh-transition);
}

.wh-account-dropdown-item:hover {
    background: var(--wh-bg);
}

.wh-account-dropdown-item + .wh-account-dropdown-item {
    border-top: 1px solid var(--wh-border);
}

.saved-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.saved-address-card {
    padding: 0.875rem 1rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    background: var(--wh-surface);
}

.saved-address-card.is-default {
    border-color: var(--wh-accent);
    box-shadow: 0 0 0 1px var(--wh-accent);
}

.saved-address-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.375rem;
}

.saved-address-card-title {
    margin: 0;
    font-size: var(--wh-font-base);
    font-weight: 600;
    color: var(--wh-text);
}

.saved-address-card-badge {
    flex-shrink: 0;
    padding: 0.125rem 0.5rem;
    border-radius: var(--wh-radius-full);
    background: var(--wh-bg);
    font-size: var(--wh-font-xs);
    font-weight: 600;
    color: var(--wh-text-muted);
}

.saved-address-card-lines {
    margin: 0;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-secondary);
}

.saved-address-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.wh-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--wh-font-base);
    color: var(--wh-text-secondary);
    cursor: pointer;
}

.wh-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--wh-accent);
}

.wh-page-shell {
    width: 100%;
    padding: 1.5rem 1rem 2rem;
}

.wh-page-shell--narrow {
    max-width: 62rem;
    margin-inline: auto;
}

.wh-app-header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.wh-app-header-logo {
    height: 2rem;
    width: auto;
    flex-shrink: 0;
}

.wh-app-header-title {
    margin: 0;
    font-weight: 700;
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wh-app-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.wh-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: var(--wh-radius-full);
    background: var(--wh-success);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wh-badge.hidden {
    display: none;
}

@media (max-width: 640px) {
    .wh-app-header-start {
        gap: 0.75rem;
    }

    .wh-app-header-nav {
        gap: 0.125rem;
    }

    .wh-nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
}

.hidden {
    display: none !important;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.min-w-0 {
    min-width: 0;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.uppercase {
    text-transform: uppercase;
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.5rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.font-semibold {
    font-weight: 600;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-x-3 {
    column-gap: 0.75rem;
}

.gap-y-0\.5 {
    row-gap: 0.125rem;
}

.mt-1\.5 {
    margin-top: 0.375rem;
}

.wh-shipping-label {
    margin-bottom: 0;
}

.wh-empty-icon {
    color: var(--wh-text-muted);
}

/* Line sheet grid */
.line-sheet-products {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 3), minmax(0, 1fr));
    gap: 1.25rem;
}

.line-sheet-card {
    display: flex;
    flex-direction: column;
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    overflow: hidden;
    box-shadow: var(--wh-shadow-sm);
    transition: box-shadow var(--wh-transition);
}

.line-sheet-card:hover {
    box-shadow: var(--wh-shadow-md);
}

.line-sheet-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    padding: 0;
    border: 0;
    background: var(--wh-bg);
    overflow: hidden;
    cursor: zoom-in;
}

.line-sheet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.line-sheet-card-image:hover img {
    transform: scale(1.02);
}

.line-sheet-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wh-border-strong);
    font-size: 2rem;
    cursor: default;
}

.line-sheet-card-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.875rem 1rem 0;
}

.line-sheet-card-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--wh-text);
}

.line-sheet-card-code {
    margin: 0;
    font-size: 0.6875rem;
    color: var(--wh-text-muted);
}

.line-sheet-card-code--empty {
    visibility: hidden;
    min-height: 0.875rem;
}

.line-sheet-card-prices {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.35;
    color: var(--wh-text-secondary);
    text-align: left;
    white-space: normal;
    font-variant-numeric: tabular-nums;
}

.line-sheet-card-header .line-sheet-stock-badge {
    margin-top: 0.125rem;
    align-self: flex-start;
}

.line-sheet-card-divider {
    height: 1px;
    margin: 0.75rem 1rem 0;
    background: var(--wh-border);
}

.line-sheet-size-matrix {
    padding: 0.75rem 1rem;
    overflow-x: auto;
}

.line-sheet-size-labels,
.line-sheet-size-inputs {
    display: grid;
    grid-template-columns: repeat(var(--size-cols), minmax(1.75rem, 1fr)) 2.25rem;
    gap: 0.375rem 0.5rem;
    align-items: end;
    min-width: min-content;
}

.line-sheet-size-labels span {
    font-size: 0.625rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    color: var(--wh-text-muted);
}

.line-sheet-size-total-label {
    text-align: right !important;
}

.line-sheet-qty-input {
    width: 100%;
    padding: 0.125rem 0;
    border: 0;
    border-bottom: 1px solid var(--wh-text-faint);
    border-radius: 0;
    background: transparent;
    text-align: center;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.line-sheet-qty-input::-webkit-outer-spin-button,
.line-sheet-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.line-sheet-qty-input:focus {
    outline: none;
    border-bottom-color: var(--wh-accent);
}

.line-sheet-card-total {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.line-sheet-add-btn {
    margin: 0 1rem 1rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--wh-accent);
    border-radius: var(--wh-radius);
    background: var(--wh-surface);
    color: var(--wh-accent);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--wh-transition), color var(--wh-transition);
}

.line-sheet-add-btn:hover {
    background: var(--wh-accent);
    color: #fff;
}

@media (max-width: 640px) {
    .line-sheet-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .line-sheet-card-header {
        padding: 0.625rem 0.625rem 0;
    }

    .line-sheet-card-title {
        font-size: 0.6875rem;
    }

    .line-sheet-card-code {
        font-size: 0.625rem;
    }

    .line-sheet-card-prices {
        font-size: 0.625rem;
    }

    .line-sheet-card-divider {
        margin: 0.5rem 0.625rem 0;
    }

    .line-sheet-size-matrix {
        padding: 0.5rem 0.625rem;
    }

    .line-sheet-add-btn {
        margin: 0 0.625rem 0.625rem;
        padding: 0.5rem;
        font-size: 0.625rem;
    }
}

/* Pricing */
.price-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wh-text-faint);
    margin-right: 0.25rem;
}

.price-wsp {
    font-weight: 600;
    color: var(--wh-text);
}

.price-srp {
    color: var(--wh-text-secondary);
}

.cart-line-prices {
    color: var(--wh-text-muted);
}

/* Quantity controls */
.qty-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--wh-border-strong);
    border-radius: var(--wh-radius-sm);
    overflow: hidden;
    background: var(--wh-surface);
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: var(--wh-surface);
    font-size: 1rem;
    line-height: 1;
    color: var(--wh-text-secondary);
    cursor: pointer;
    transition: background var(--wh-transition);
}

.qty-btn:hover {
    background: var(--wh-bg);
    color: var(--wh-text);
}

.qty-input {
    width: 2.75rem;
    text-align: center;
    border: 0;
    border-left: 1px solid var(--wh-border);
    border-right: 1px solid var(--wh-border);
    border-radius: 0;
    height: 2rem;
    font-size: 0.875rem;
    background: var(--wh-surface);
    font-variant-numeric: tabular-nums;
}

.qty-input:focus {
    outline: none;
    background: var(--wh-bg);
}

/* Cart drawer */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    visibility: hidden;
    pointer-events: none;
}

.cart-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cart-drawer.is-open .cart-overlay {
    opacity: 1;
}

.cart-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 28rem;
    background: var(--wh-surface);
    display: flex;
    flex-direction: column;
    box-shadow: var(--wh-shadow-drawer);
    border-left: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg) 0 0 var(--wh-radius-lg);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.cart-drawer.is-open .cart-panel {
    transform: translateX(0);
}

.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--wh-border);
    flex-shrink: 0;
}

.cart-panel-title,
.wh-panel-title {
    margin: 0;
    font-size: var(--wh-font-xl);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-snug);
    line-height: var(--wh-leading-tight);
    color: var(--wh-text);
}

.cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
}

.cart-back-btn,
.cart-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--wh-radius);
    background: transparent;
    color: var(--wh-text-muted);
    flex-shrink: 0;
    cursor: pointer;
    transition: background var(--wh-transition), color var(--wh-transition);
}

.cart-back-btn:hover,
.cart-close-btn:hover {
    background: var(--wh-bg);
    color: var(--wh-text);
}

.cart-item {
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    background: var(--wh-bg);
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.cart-item-thumb {
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
    border-radius: var(--wh-radius);
    object-fit: cover;
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
}

.cart-item-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wh-text-faint);
}

.cart-item-content {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wh-text);
    line-height: 1.35;
}

.cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.cart-remove-btn {
    color: var(--wh-text-faint);
    padding: 0.25rem;
    font-size: 0.875rem;
    border: 0;
    background: transparent;
    border-radius: var(--wh-radius-sm);
    cursor: pointer;
    transition: color var(--wh-transition), background var(--wh-transition);
}

.cart-remove-btn:hover {
    color: var(--wh-danger);
    background: var(--wh-danger-bg);
}

.cart-totals {
    border-top: 1px solid var(--wh-border);
    padding-top: 0.875rem;
    margin-top: 0.5rem;
}

.cart-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--wh-text-secondary);
    padding: 0.125rem 0;
}

.cart-totals-row--success {
    color: var(--wh-success);
}

.cart-totals-row--total {
    font-weight: 700;
    font-size: var(--wh-font-lg);
    color: var(--wh-text);
    border-top: 1px solid var(--wh-border);
    margin-top: 0.5rem;
    padding-top: 0.625rem;
}

.cart-moq-notice {
    margin-top: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--wh-radius);
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
}

.cart-empty-msg {
    display: none;
}

@media (max-width: 640px) {
    .cart-panel {
        border-radius: var(--wh-radius-lg) var(--wh-radius-lg) 0 0;
        max-width: 100%;
        height: min(100%, 100dvh);
    }
}

/* App dialog */
.wh-dialog {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    visibility: hidden;
    pointer-events: none;
}

.wh-dialog.is-open {
    visibility: visible;
    pointer-events: auto;
}

.wh-dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wh-dialog.is-open .wh-dialog-overlay {
    opacity: 1;
}

.wh-dialog-panel {
    position: relative;
    width: min(100%, 24rem);
    padding: 1.5rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    background: var(--wh-surface);
    box-shadow: var(--wh-shadow-md);
    transform: translateY(0.5rem) scale(0.98);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.wh-dialog.is-open .wh-dialog-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.wh-dialog-title {
    margin: 0;
    font-size: var(--wh-font-xl);
    font-weight: 700;
    color: var(--wh-text);
    letter-spacing: var(--wh-tracking-snug);
    line-height: var(--wh-leading-snug);
}

.wh-dialog-message {
    margin: 0.625rem 0 0;
    font-size: var(--wh-font-base);
    color: var(--wh-text-secondary);
    line-height: var(--wh-leading-normal);
}

.wh-dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* Image lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    visibility: hidden;
    pointer-events: none;
}

.image-lightbox.is-open {
    visibility: visible;
    pointer-events: auto;
}

.image-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-lightbox.is-open .image-lightbox-overlay {
    opacity: 1;
}

.image-lightbox-dialog {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 1.5rem;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.image-lightbox.is-open .image-lightbox-dialog {
    opacity: 1;
    transform: scale(1);
}

.image-lightbox-close,
.image-lightbox-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--wh-radius-full);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
    pointer-events: auto;
    transition: background var(--wh-transition);
}

.image-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
}

.image-lightbox-close:hover,
.image-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.image-lightbox-title {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 1rem;
    max-width: 32rem;
    pointer-events: none;
}

.image-lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(90vw, 760px);
    max-width: 100%;
}

.image-lightbox-viewport {
    overflow: hidden;
    width: min(90vw, 720px);
    max-width: 100%;
    border-radius: var(--wh-radius);
}

.image-lightbox-track {
    display: flex;
    width: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform 0.28s ease;
    will-change: transform;
}

.image-lightbox-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.image-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    z-index: 1;
}

.image-lightbox-nav-prev {
    left: -0.25rem;
}

.image-lightbox-nav-next {
    right: -0.25rem;
}

.image-lightbox-img {
    width: 100%;
    max-height: calc(100vh - 10rem);
    object-fit: contain;
    border-radius: var(--wh-radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    user-select: none;
}

.image-lightbox-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    pointer-events: auto;
}

.image-lightbox-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--wh-radius-full);
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform var(--wh-transition), background var(--wh-transition);
}

.image-lightbox-dot.is-active {
    background: #fff;
    transform: scale(1.15);
}

.image-lightbox-counter {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    pointer-events: none;
}

@media (max-width: 640px) {
    .image-lightbox-nav-prev {
        left: 0.25rem;
    }

    .image-lightbox-nav-next {
        right: 0.25rem;
    }

    .image-lightbox-stage,
    .image-lightbox-viewport {
        width: 100%;
    }
}

/* Order history */
.order-history-list {
    display: block;
}

.wh-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: var(--wh-radius-full);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
}

.wh-chip--paid {
    background: #dcfce7;
    color: #166534;
}

.wh-chip--unpaid {
    background: #fef3c7;
    color: #92400e;
}

.wh-chip--cancelled {
    background: #f5f5f5;
    color: #737373;
}

.wh-chip--neutral {
    background: #eef2ff;
    color: #3730a3;
}

.order-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    background: var(--wh-surface);
    box-shadow: var(--wh-shadow-sm);
    overflow: hidden;
    table-layout: auto;
}

.order-history-table th,
.order-history-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-top: 1px solid var(--wh-border);
}

.order-history-table thead th {
    border-top: 0;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    background: var(--wh-bg);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wh-text-muted);
    white-space: nowrap;
}

.order-history-table tbody tr:hover {
    background: #fafafa;
}

.order-history-table tbody tr.is-selected {
    background: #f5f5f5;
    box-shadow: inset 3px 0 0 var(--wh-accent);
}

.order-history-cell {
    min-width: 0;
}

.order-history-cell--order {
    white-space: nowrap;
}

.order-history-cell--total,
.order-history-cell--items {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-history-cell--date {
    white-space: nowrap;
}

.order-history-cell--status {
    white-space: nowrap;
}

.order-history-cell--actions {
    white-space: nowrap;
}

.order-history-mobile-detail {
    display: none;
}

.order-history-detail-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.5rem;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.order-history-date,
.order-history-stat {
    font-size: var(--wh-font-sm);
    color: var(--wh-text-secondary);
}

.order-history-total {
    font-size: var(--wh-font-sm);
    font-weight: 600;
    color: var(--wh-text);
    font-variant-numeric: tabular-nums;
}

.order-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.5rem;
    margin: 0.5rem 0 0;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.order-meta-sep {
    color: var(--wh-text-faint);
}

.order-meta-total {
    font-weight: 600;
    color: var(--wh-text-secondary);
    font-variant-numeric: tabular-nums;
}

.order-history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.375rem;
}

.order-history-pay,
.order-history-reorder,
.order-history-cancel {
    flex-shrink: 0;
    padding: 0.375rem 0.625rem;
    border-radius: var(--wh-radius);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background var(--wh-transition), color var(--wh-transition),
        border-color var(--wh-transition);
    text-decoration: none;
}

.order-history-pay {
    border: 0;
    background: var(--wh-success);
    color: #fff;
}

.order-history-pay:hover {
    background: var(--wh-success-hover);
    color: #fff;
}

.order-history-reorder {
    border: 0;
    background: var(--wh-accent);
    color: #fff;
}

.order-history-reorder:hover {
    background: var(--wh-accent-hover);
}

.order-history-cancel {
    border: 1px solid var(--wh-border-strong);
    background: var(--wh-surface);
    color: var(--wh-text-secondary);
}

.order-history-cancel:hover {
    background: var(--wh-danger-bg);
    border-color: var(--wh-danger-border);
    color: var(--wh-danger);
}

.order-history-ref {
    display: inline-block;
    margin: 0;
    font-size: var(--wh-font-base);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-snug);
    color: var(--wh-text);
    text-decoration: none;
}

.order-history-ref:hover {
    color: var(--wh-accent);
    text-decoration: underline;
}

@media (max-width: 720px) {
    .order-history-table thead {
        display: none;
    }

    .order-history-table tbody tr {
        display: block;
        padding: 0.875rem 1rem;
    }

    .order-history-table tbody td {
        display: block;
        padding: 0;
        border: 0;
    }

    .order-history-table tbody td + td {
        margin-top: 0.625rem;
    }

    .order-history-table tbody td.order-history-cell--date,
    .order-history-table tbody td.order-history-cell--items,
    .order-history-table tbody td.order-history-cell--total,
    .order-history-table tbody td.order-history-cell--status {
        display: none;
    }

    .order-history-mobile-detail {
        display: block;
        margin-top: 0.625rem;
    }

    .order-history-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.order-detail {
    margin-bottom: 1rem;
}

.order-detail-back {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: var(--wh-font-base);
    font-weight: 600;
    color: var(--wh-text-secondary);
    text-decoration: none;
}

.order-detail-back:hover {
    color: var(--wh-accent);
    text-decoration: underline;
}

.order-detail-card {
    padding: 1.25rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    background: var(--wh-surface);
    box-shadow: var(--wh-shadow-sm);
}

.order-detail-card--missing {
    border-color: var(--wh-border-strong);
}

.order-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-detail-label {
    margin: 0 0 0.25rem;
    font-size: var(--wh-font-xs);
    font-weight: 600;
    letter-spacing: var(--wh-tracking-wide);
    text-transform: uppercase;
    color: var(--wh-text-muted);
}

.order-detail-title {
    margin: 0;
    font-size: var(--wh-font-xl);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-snug);
    line-height: var(--wh-leading-tight);
    color: var(--wh-text);
}

.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wh-border);
}

.order-detail-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wh-border);
}

.order-detail-grid .order-detail-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.order-detail-section-title {
    margin: 0 0 0.75rem;
    font-size: var(--wh-font-sm);
    font-weight: 600;
    letter-spacing: var(--wh-tracking-snug);
    color: var(--wh-text-secondary);
}

.order-detail-fields {
    margin: 0;
}

.order-detail-field {
    margin: 0 0 0.625rem;
}

.order-detail-field:last-child {
    margin-bottom: 0;
}

.order-detail-field-label {
    margin: 0 0 0.125rem;
    font-size: var(--wh-font-xs);
    font-weight: 600;
    letter-spacing: var(--wh-tracking-wide);
    text-transform: uppercase;
    color: var(--wh-text-muted);
}

.order-detail-field-value {
    margin: 0;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text);
}

.order-detail-fields--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.order-detail-fields--grid .order-detail-field {
    margin: 0;
}

.order-detail-address {
    margin: 0;
    font-style: normal;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text);
}

.order-detail-muted {
    margin: 0;
    font-size: var(--wh-font-base);
    color: var(--wh-text-muted);
}

.order-detail-notes {
    margin: 0;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text);
    white-space: pre-wrap;
}

.order-detail-totals-list {
    margin: 0;
}

.order-detail-totals-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.375rem 0;
    font-size: var(--wh-font-base);
    color: var(--wh-text-secondary);
}

.order-detail-totals-row dt {
    margin: 0;
    font-weight: 500;
}

.order-detail-totals-row dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.order-detail-totals-row--success {
    color: var(--wh-success);
}

.order-detail-totals-row--total {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--wh-border);
    font-weight: 700;
    font-size: var(--wh-font-lg);
    color: var(--wh-text);
}

@media (max-width: 640px) {
    .order-detail-grid,
    .order-detail-fields--grid {
        grid-template-columns: 1fr;
    }
}

.order-detail-items {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    overflow: hidden;
}

.order-detail-items li,
.order-detail-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wh-border);
}

.order-detail-item:last-child {
    border-bottom: 0;
}

.order-detail-item-thumb {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: var(--wh-radius);
    object-fit: cover;
    background: var(--wh-bg);
    border: 1px solid var(--wh-border);
}

.order-detail-item-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wh-text-faint);
    font-size: 1.125rem;
}

.order-detail-item-body {
    display: flex;
    flex: 1;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.order-detail-item-title {
    color: var(--wh-text);
    font-size: var(--wh-font-base);
    font-weight: 600;
    line-height: var(--wh-leading-snug);
}

.order-detail-item-qty {
    flex-shrink: 0;
    font-size: var(--wh-font-base);
    color: var(--wh-text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Auth / onboarding split layout */
.wh-auth-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--wh-surface);
}

.wh-auth-hero {
    position: relative;
    flex: 0 0 42%;
    max-width: 36rem;
    background-color: #141414;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.82) 100%),
        url('https://cdn.shopify.com/s/files/1/1607/2417/files/BA455261-B4F3-42D5-B2F3-770224772228.jpg?v=1769096006');
    background-size: cover;
    background-position: center;
    color: #fff;
}

.wh-auth-hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 100%;
    padding: 2rem;
}

.wh-auth-hero-logo {
    display: block;
    height: 1.5rem;
    width: auto;
    max-width: 11rem;
    object-fit: contain;
    object-position: left center;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.wh-auth-hero-copy {
    max-width: 20rem;
}

.wh-auth-hero-title {
    margin: 0 0 0.75rem;
    font-size: var(--wh-font-hero);
    font-weight: 700;
    line-height: var(--wh-leading-tight);
    letter-spacing: var(--wh-tracking-tight);
}

.wh-auth-hero-text {
    margin: 0;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-relaxed);
    color: rgba(255, 255, 255, 0.78);
}

.wh-auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--wh-surface);
}

.wh-auth-panel-inner {
    width: 100%;
    max-width: 24rem;
}

.wh-auth-panel-inner--scroll {
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.wh-auth-panel-inner--center {
    max-width: 26rem;
}

.wh-auth-panel-head {
    margin-bottom: 1.75rem;
}

.wh-auth-panel-title {
    margin: 0;
    font-size: var(--wh-font-2xl);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-tight);
    line-height: var(--wh-leading-tight);
    color: var(--wh-text);
}

.wh-auth-panel-desc {
    margin: 0.375rem 0 0;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-form-footer {
    text-align: center;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
    margin-top: 0.25rem;
}

.wh-auth-legal {
    margin: 1.5rem 0 0;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
    text-align: center;
    color: var(--wh-text-faint);
}

.wh-auth-reference {
    margin: 0 0 1.5rem;
    font-size: var(--wh-font-base);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-status-screen {
    text-align: center;
}

.wh-status-icon-wrap {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.25rem;
    border-radius: var(--wh-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.wh-status-icon-wrap--pending {
    background: #fef3c7;
    color: #d97706;
}

.wh-status-icon-wrap--error {
    background: var(--wh-danger-bg);
    color: var(--wh-danger);
}

.wh-status-icon-wrap--success {
    background: #dcfce7;
    color: var(--wh-success);
}

.wh-status-text {
    margin-bottom: 1.5rem;
}

.wh-input::placeholder,
.wh-textarea::placeholder {
    color: #a3a3a3;
}

@media (max-width: 900px) {
    /* 16px prevents iOS Safari from zooming on input focus */
    .wh-input,
    .wh-select,
    .wh-textarea,
    .line-sheet-qty-input,
    .qty-input {
        font-size: 16px;
    }

    .wh-auth-layout {
        flex-direction: column;
    }

    .wh-auth-hero {
        flex: 0 0 auto;
        max-width: none;
        min-height: 14rem;
    }

    .wh-auth-hero-inner {
        min-height: 14rem;
        padding: 1.5rem;
    }

    .wh-auth-hero-title {
        font-size: 1.375rem;
    }

    .wh-auth-hero-text {
        font-size: 0.875rem;
    }

    .wh-auth-panel {
        padding: 2rem 1.25rem 2.5rem;
        align-items: flex-start;
    }

    .wh-auth-panel-inner--scroll {
        max-height: none;
    }
}

@media (min-width: 901px) {
    .wh-auth-hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

.wh-label-required {
    color: var(--wh-danger);
}

.wh-account-banner {
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    border-radius: var(--wh-radius-lg);
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
}

.wh-account-banner--complete {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.wh-account-banner--incomplete {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.wh-account-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.wh-account-section {
    padding: 1.25rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
    background: var(--wh-surface);
    box-shadow: var(--wh-shadow-sm);
}

.wh-account-section-title {
    margin: 0 0 0.75rem;
    font-size: var(--wh-font-base);
    font-weight: 700;
    letter-spacing: var(--wh-tracking-snug);
    color: var(--wh-text);
}

.wh-account-section-desc {
    margin: -0.5rem 0 1rem;
    font-size: var(--wh-font-sm);
    line-height: var(--wh-leading-normal);
    color: var(--wh-text-muted);
}

.wh-account-form-actions {
    display: flex;
    justify-content: flex-start;
}

.wh-file-upload {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.wh-file-input {
    display: block;
    width: 100%;
    font-size: var(--wh-font-sm);
    color: var(--wh-text-secondary);
}

.wh-file-upload-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    background: var(--wh-bg);
    font-size: var(--wh-font-sm);
    color: var(--wh-text-secondary);
}

.wh-file-upload-status a {
    color: var(--wh-accent);
    font-weight: 600;
    text-decoration: none;
}

.wh-file-upload-status a:hover {
    text-decoration: underline;
}

.wh-doc-list {
    margin: 0.625rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wh-doc-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    background: var(--wh-bg);
    font-size: var(--wh-font-sm);
}

.wh-doc-list-item a {
    color: var(--wh-accent);
    font-weight: 600;
    text-decoration: none;
}

.wh-doc-list-item a:hover {
    text-decoration: underline;
}

.wh-doc-list-remove {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    border: 0;
    background: transparent;
    color: var(--wh-text-muted);
    font-size: var(--wh-font-xs);
    font-weight: 600;
    cursor: pointer;
}

.wh-doc-list-remove:hover {
    color: var(--wh-danger);
}

.wh-status-screen .wh-btn + .wh-btn {
    margin-top: 0.75rem;
}
