html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.touch-target {
    min-height: 44px;
    line-height: 1.2;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    background-color: #fff;
    border-color: #d4d4d8;
    color: #18181b;
    max-width: 100%;
    min-width: 0;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    width: 100%;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
    color: #a1a1aa;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgb(24 24 27 / 10%);
    outline: none;
}

input[type="file"] {
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: #18181b;
    border: 0;
    border-radius: 0.375rem;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    margin-right: 0.75rem;
    min-height: 34px;
    padding: 0 0.85rem;
}

input[type="file"]::file-selector-button:hover {
    background: #27272a;
}

.app-alert-stack {
    display: grid;
    gap: 0.75rem;
    max-width: min(28rem, calc(100vw - 2rem));
    position: fixed;
    right: 1rem;
    top: 5rem;
    width: 100%;
    z-index: 70;
}

.app-alert-stack--auth {
    top: 1rem;
}

.app-alert {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-left-width: 4px;
    border-radius: 0.5rem;
    box-shadow: 0 18px 45px rgb(24 24 27 / 14%);
    color: #18181b;
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 0.95rem;
    width: 100%;
}

.app-alert--success {
    border-left-color: #059669;
}

.app-alert--error {
    border-left-color: #dc2626;
}

.app-alert--info {
    border-left-color: #2563eb;
}

.app-alert__mark {
    border-radius: 999px;
    height: 0.65rem;
    margin-top: 0.25rem;
    width: 0.65rem;
}

.app-alert--success .app-alert__mark {
    background: #059669;
}

.app-alert--error .app-alert__mark {
    background: #dc2626;
}

.app-alert--info .app-alert__mark {
    background: #2563eb;
}

.app-alert__title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
}

.app-alert__message {
    color: #52525b;
    font-size: 0.875rem;
    line-height: 1.35;
    margin-top: 0.2rem;
}

.app-alert__close {
    align-items: center;
    border-radius: 0.375rem;
    color: #71717a;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.25rem;
    height: 2rem;
    justify-content: center;
    line-height: 1;
    margin-left: auto;
    width: 2rem;
}

.app-alert__close:hover,
.app-alert__close:focus-visible {
    background: #f4f4f5;
    color: #18181b;
    outline: none;
}

.category-strip {
    scroll-padding-inline: 1rem;
}

.category-pill {
    align-items: center;
    background: #fff;
    border: 1px solid #d4d4d8;
    color: #18181b;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    white-space: nowrap;
}

.category-pill.is-active {
    background: #18181b;
    border-color: #18181b;
    color: #fff;
}

.product-tile {
    align-items: stretch;
    display: flex;
    min-height: 82px;
    width: 100%;
}

.product-tile > div {
    width: 100%;
}

.ui-action {
    min-height: 58px;
}

.icon-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.cart-line {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.cart-line__summary {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.cart-line__name {
    color: #18181b;
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-line__meta {
    color: #71717a;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.1875rem;
}

.cart-line__total {
    display: grid;
    gap: 0.125rem;
    justify-items: end;
    line-height: 1.1;
    text-align: right;
}

.cart-line__total span {
    color: #71717a;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.cart-line__total strong {
    color: #18181b;
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
}

.cart-line__controls {
    align-items: flex-start;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 0.75rem;
}

.cart-line__unit {
    justify-self: end;
}

.cart-stepper {
    align-items: stretch;
    background: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 0.5rem;
    display: grid;
    grid-template-columns: 38px 4.75rem 38px;
    height: 42px;
    overflow: hidden;
    width: max-content;
}

.cart-stepper:focus-within {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgb(24 24 27 / 10%);
}

.cart-qty-button {
    align-items: center;
    color: #3f3f46;
    display: inline-flex;
    font-size: 1.125rem;
    font-weight: 800;
    height: 100%;
    justify-content: center;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease;
    width: 38px;
}

.cart-qty-button:first-child {
    border-right: 1px solid #e4e4e7;
}

.cart-qty-button:last-child {
    border-left: 1px solid #e4e4e7;
}

.cart-qty-button:hover,
.cart-qty-button:focus-visible {
    background: #f4f4f5;
    color: #18181b;
    outline: none;
}

.cart-stepper input.cart-qty-input.cart-qty-input {
    border: 0;
    box-shadow: none;
    color: #18181b;
    font-size: 0.9375rem;
    font-weight: 800;
    height: 100%;
    min-width: 0;
    padding: 0;
    text-align: center;
    width: 4.75rem;
}

.cart-stepper input.cart-qty-input.cart-qty-input:focus {
    border: 0;
    box-shadow: none;
}

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

.cart-stepper input.cart-qty-input.cart-qty-input[type="number"] {
    -moz-appearance: textfield;
}

.cart-unit-static,
.cart-unit-dropdown {
    flex: 0 0 auto;
    min-height: 42px;
}

.cart-unit-static {
    align-items: center;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    color: #52525b;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    min-width: 4.75rem;
}

.cart-unit-dropdown {
    min-width: 4.75rem;
    position: relative;
}

.cart-unit-dropdown__button {
    align-items: center;
    background: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 0.375rem;
    color: #18181b;
    display: flex;
    font-size: 0.875rem;
    font-weight: 800;
    gap: 0.375rem;
    justify-content: space-between;
    line-height: 1;
    min-height: 42px;
    min-width: 4.75rem;
    padding: 0 0.625rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    width: 100%;
}

.cart-unit-dropdown__button:hover,
.cart-unit-dropdown.is-open .cart-unit-dropdown__button {
    border-color: #18181b;
}

.cart-unit-dropdown__button:focus-visible {
    box-shadow: 0 0 0 3px rgb(24 24 27 / 14%);
    outline: none;
}

.cart-unit-dropdown__chevron {
    border-bottom: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    height: 0.45rem;
    margin-top: -0.125rem;
    transform: rotate(45deg);
    transition: transform 160ms ease;
    width: 0.45rem;
}

.cart-unit-dropdown.is-open .cart-unit-dropdown__chevron {
    margin-top: 0.125rem;
    transform: rotate(225deg);
}

.cart-unit-dropdown__menu {
    background: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgb(24 24 27 / 10%);
    display: none;
    gap: 0.125rem;
    margin-top: 0.375rem;
    padding: 0.25rem;
}

.cart-unit-dropdown.is-open .cart-unit-dropdown__menu {
    display: grid;
}

.cart-unit-dropdown__option {
    align-items: center;
    border-radius: 0.375rem;
    color: #3f3f46;
    display: flex;
    font-size: 0.875rem;
    font-weight: 800;
    justify-content: center;
    min-height: 38px;
    padding: 0 0.75rem;
    transition: background-color 160ms ease, color 160ms ease;
}

.cart-unit-dropdown__option:hover,
.cart-unit-dropdown__option:focus-visible {
    background: #f4f4f5;
    color: #18181b;
    outline: none;
}

.cart-unit-dropdown__option.is-selected {
    background: #18181b;
    color: #fff;
}

.customer-display-screen {
    background: #111113;
    color: #fff;
    display: grid;
    gap: clamp(0.875rem, 1.6vw, 1.25rem);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
    padding: clamp(0.875rem, 1.8vw, 1.5rem);
}

.customer-display-header {
    align-items: center;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    box-shadow: 0 18px 36px rgb(0 0 0 / 18%);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: clamp(0.875rem, 1.6vw, 1.25rem);
}

.customer-display-brand {
    align-items: center;
    display: flex;
    gap: 0.875rem;
    min-width: 0;
}

.customer-display-brand img {
    background: #fff;
    border-radius: 0.5rem;
    height: clamp(2.75rem, 5vw, 4rem);
    object-fit: contain;
    padding: 0.25rem;
    width: clamp(2.75rem, 5vw, 4rem);
}

.customer-display-brand p,
.customer-display-clock span {
    color: #d6d3d1;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 800;
}

.customer-display-brand h1 {
    color: #fff;
    font-size: clamp(1.55rem, 3.1vw, 2.9rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-display-clock {
    align-items: flex-end;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    display: grid;
    gap: 0.25rem;
    justify-items: end;
    min-width: 12rem;
    padding: 0.75rem 1rem;
    text-align: right;
}

.customer-display-clock strong {
    color: #fff;
    font-size: clamp(1.7rem, 3.3vw, 3rem);
    font-weight: 900;
    line-height: 1;
}

.customer-display-main {
    display: grid;
    gap: clamp(0.875rem, 1.6vw, 1.25rem);
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 29rem);
    min-height: 0;
}

.customer-display-list,
.customer-display-total {
    background: #f8fafc;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    box-shadow: 0 22px 44px rgb(0 0 0 / 22%);
    color: #18181b;
}

.customer-display-list {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.customer-display-list__head {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: clamp(1rem, 1.8vw, 1.35rem);
}

.customer-display-list__head p {
    color: #78716c;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 800;
}

.customer-display-list__head h2 {
    color: #18181b;
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
}

.customer-display-list__head span {
    background: #18181b;
    border-radius: 999px;
    color: #fff;
    flex: 0 0 auto;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 900;
    padding: 0.5rem 0.8rem;
}

.customer-display-empty {
    align-items: center;
    color: #71717a;
    display: grid;
    gap: 0.4rem;
    justify-items: center;
    min-height: 18rem;
    padding: 2rem;
    text-align: center;
}

.customer-display-empty strong {
    color: #18181b;
    font-size: clamp(1.25rem, 2.6vw, 2rem);
    font-weight: 900;
}

.customer-display-empty span {
    font-size: clamp(0.9rem, 1.7vw, 1.15rem);
    font-weight: 600;
}

.customer-display-empty.is-hidden {
    display: none;
}

.customer-display-items {
    align-content: start;
    display: grid;
    gap: 0.625rem;
    max-height: 100%;
    overflow-y: auto;
    padding: clamp(0.75rem, 1.4vw, 1.1rem);
}

.customer-display-item {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    display: grid;
    gap: 0.875rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: clamp(5.25rem, 8.5vh, 7.25rem);
    padding: clamp(0.85rem, 1.3vw, 1.1rem);
}

.customer-display-item__qty {
    align-items: center;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    color: #78350f;
    display: flex;
    font-size: clamp(0.9rem, 1.35vw, 1.1rem);
    font-weight: 900;
    justify-content: center;
    min-width: clamp(5rem, 8vw, 6.5rem);
    padding: 0.6rem 0.75rem;
    text-align: center;
}

.customer-display-item__body {
    align-items: center;
    display: grid;
    gap: 0.875rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.customer-display-item__name {
    color: #18181b;
    font-size: clamp(1.05rem, 1.85vw, 1.45rem);
    font-weight: 900;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-display-item__meta {
    color: #78716c;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 800;
    margin-top: 0.35rem;
}

.customer-display-item__price {
    display: grid;
    gap: 0.25rem;
    justify-items: end;
    line-height: 1.05;
    text-align: right;
}

.customer-display-item__price span {
    color: #78716c;
    font-size: clamp(0.72rem, 1.05vw, 0.85rem);
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-display-item__price strong {
    color: #18181b;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 900;
    white-space: nowrap;
}

.customer-display-total {
    display: grid;
    gap: clamp(0.9rem, 1.5vw, 1.15rem);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    min-height: 0;
    padding: clamp(1rem, 1.8vw, 1.35rem);
}

.customer-display-total__head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.customer-display-total__head span,
.customer-display-total__details span {
    color: #78716c;
    font-size: clamp(0.75rem, 1.1vw, 0.9rem);
    font-weight: 900;
    text-transform: uppercase;
}

.customer-display-total__head strong {
    background: #fef3c7;
    border-radius: 999px;
    color: #78350f;
    font-size: clamp(0.78rem, 1.1vw, 0.9rem);
    font-weight: 900;
    padding: 0.45rem 0.75rem;
}

.customer-display-total__amount {
    background: #18181b;
    border-radius: 0.5rem;
    color: #fff;
    display: grid;
    gap: 0.55rem;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.customer-display-total__amount p {
    color: #d6d3d1;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    font-weight: 900;
    text-transform: uppercase;
}

.customer-display-total__amount strong {
    color: #fff;
    font-size: clamp(2.3rem, 4.7vw, 4.1rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.95;
    word-break: keep-all;
}

.customer-display-total__details {
    border-bottom: 1px solid #e7e5e4;
    border-top: 1px solid #e7e5e4;
    display: grid;
    gap: 0;
    grid-template-columns: 1fr 1fr;
}

.customer-display-total__details div {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 0;
}

.customer-display-total__details div + div {
    border-left: 1px solid #e7e5e4;
    padding-left: 0.95rem;
}

.customer-display-total__details strong {
    color: #18181b;
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    font-weight: 900;
    line-height: 1.2;
}

.customer-display-total__note {
    align-self: end;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    color: #57534e;
    font-size: clamp(0.9rem, 1.25vw, 1rem);
    font-weight: 800;
    line-height: 1.35;
    padding: 1rem;
}

@media (max-width: 980px) {
    .customer-display-main {
        grid-template-columns: 1fr;
    }

    .customer-display-total {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .customer-display-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-display-clock {
        align-items: start;
        justify-items: start;
        min-width: 0;
        text-align: left;
        width: 100%;
    }

    .customer-display-list__head,
    .customer-display-item,
    .customer-display-item__body,
    .customer-display-total__details {
        grid-template-columns: 1fr;
    }

    .customer-display-list__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-display-item__qty {
        justify-content: flex-start;
    }

    .customer-display-item__price {
        justify-items: start;
        text-align: left;
    }

    .customer-display-total__details div + div {
        border-left: 0;
        border-top: 1px solid #e7e5e4;
        padding-left: 0;
    }
}

.select-enhancer {
    position: relative;
    width: 100%;
}

.select-enhancer__source {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.select-enhancer__button {
    align-items: center;
    background: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 0.375rem;
    color: #18181b;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 44px;
    padding: 0.625rem 0.75rem;
    position: relative;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    width: 100%;
    z-index: 1;
}

.select-enhancer__button:hover,
.select-enhancer.is-open .select-enhancer__button {
    border-color: #18181b;
}

.select-enhancer__button:focus-visible {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgb(24 24 27 / 10%);
    outline: none;
}

.select-enhancer.is-invalid .select-enhancer__button {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgb(220 38 38 / 12%);
}

.select-enhancer__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-enhancer__button.is-placeholder .select-enhancer__value {
    color: #71717a;
}

.select-enhancer__chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: inline-block;
    height: 0.5rem;
    margin-top: -0.25rem;
    transform: rotate(45deg);
    transition: transform 180ms ease;
    width: 0.5rem;
}

.select-enhancer.is-open .select-enhancer__chevron {
    margin-top: 0.25rem;
    transform: rotate(225deg);
}

.select-enhancer__menu {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    box-shadow: 0 18px 45px rgb(24 24 27 / 14%);
    left: 0;
    max-height: min(18rem, 60vh);
    opacity: 0;
    overflow-y: auto;
    padding: 0.35rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    transform: translateY(-0.35rem) scale(0.98);
    transform-origin: top;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 50;
}

.select-enhancer.is-open .select-enhancer__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.select-enhancer__option {
    align-items: center;
    border-radius: 0.375rem;
    color: #3f3f46;
    display: flex;
    justify-content: space-between;
    min-height: 40px;
    padding: 0.55rem 0.65rem;
    text-align: left;
    transition: background-color 140ms ease, color 140ms ease;
    width: 100%;
}

.select-enhancer__option:hover,
.select-enhancer__option:focus-visible {
    background: #f4f4f5;
    color: #18181b;
    outline: none;
}

.select-enhancer__option.is-selected {
    background: #18181b;
    color: #fff;
}

.scrollbar-thin {
    scrollbar-width: thin;
}

.cart-panel {
    max-height: calc(100vh - 9rem);
}

@media (max-width: 1023px) {
    .cart-panel {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .app-alert-stack {
        left: 1rem;
        max-width: none;
        right: 1rem;
        top: 4.5rem;
        width: auto;
    }

    .app-alert-stack--auth {
        top: 1rem;
    }

    .product-tile {
        min-height: 80px;
    }

    .ui-action {
        min-height: 64px;
    }
}
