@font-face {
    font-family: 'Favorit Pro';
    src: url('/Entrance Handles/assets/Fonts/FavoritPro-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'config-variable', 'Favorit Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e0e0e0;
    color: #1a1a1a;
    overflow: hidden;
}

.bg-wash {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 800px 600px at 25% 50%,
        #ffffff 0%,
        #ffffff 25%,
        #f3f3f3 50%,
        #dddddd 75%,
        #d4d4d4 100%);
    pointer-events: none;
    z-index: 0;
}

.hub-bar {
    position: relative;
    z-index: 20;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 20px;
    background: #111;
    color: #fff;
    border-bottom: none;
}

.hub-bar-left,
.hub-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hub-logo {
    height: 22px;
    width: auto;
    display: block;
}

.hub-logo-fallback {
    font-size: 13px;
    letter-spacing: 0.18em;
    font-weight: 500;
    color: #fff;
}

.hub-current {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-current.is-home {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

[hidden] {
    display: none !important;
}

.hub-bar .hub-btn {
    color: #fff;
}

.hub-bar .hub-btn-solid {
    background: #fff;
    color: #111;
}

.hub-bar .hub-btn-solid:hover {
    background: #e8e8e8;
    opacity: 1;
}

.hub-bar .cart-count {
    background: #fff;
    color: #111;
}

.hub-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
}

.hub-btn:hover {
    opacity: 0.65;
}

.hub-btn-solid {
    background: #111;
    color: #fff;
    padding: 0 16px;
}

.hub-btn-solid:hover {
    background: #333;
    opacity: 1;
}

.cart-btn {
    position: relative;
}

.cart-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #111;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.cart-btn.has-items .cart-count {
    display: inline-block;
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

.stage {
    position: relative;
    z-index: 1;
    height: calc(100vh - 56px);
}

#config-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    display: none;
}

.stage.has-frame #config-frame {
    display: block;
}

body.cat-open .stage.has-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 8;
    background: rgba(17, 17, 17, 0.18);
}

#hub-loading-name {
    position: absolute;
    left: 50%;
    top: calc(50% + 16px);
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 6;
    pointer-events: none;
    transition: opacity 1.5s ease-out;
}

#hub-loading-name[hidden] {
    display: none !important;
}

#hub-loading-name.is-out {
    opacity: 0;
}

.cat-trigger {
    padding-left: 4px;
    padding-right: 8px;
}

.cat-caret {
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

body.cat-open .cat-caret {
    transform: rotate(180deg);
}

.cat-dropdown {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 18;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.cat-dropdown[hidden] {
    display: none !important;
}

.category-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-card {
    appearance: none;
    border: none;
    background: transparent;
    text-align: center;
    padding: 0;
    width: 128px;
    flex: 0 0 128px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    color: inherit;
    overflow: hidden;
    outline: none;
    transition: transform 0.18s ease;
}

.category-card:hover {
    transform: translateY(-1px);
}

.category-card.is-active {
    outline: none;
}

.category-thumb-wrap {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a1a1a;
}

.category-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1);
    transition: filter 0.2s ease;
}

.category-card.is-active .category-thumb {
    filter: none;
}

.category-name {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.25;
    padding: 6px 4px 0;
    background: transparent;
    color: #1a1a1a;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(12px);
    background: #111;
    color: #fff;
    padding: 12px 18px;
    font-size: 13px;
    letter-spacing: 0.02em;
    opacity: 0;
    pointer-events: none;
    z-index: 60;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-on {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cart-overlay {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.cart-overlay[open] {
    display: flex;
    justify-content: flex-end;
}

.cart-overlay::backdrop {
    background: rgba(0, 0, 0, 0.28);
}

.cart-drawer {
    width: min(440px, 100vw);
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.12);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 22px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-header h2 {
    font-size: 22px;
    font-weight: 500;
}

.cart-body {
    flex: 1;
    overflow: auto;
    padding: 8px 8px 24px;
}

.cart-empty {
    padding: 40px 22px;
    color: #777;
    font-size: 14px;
    line-height: 1.5;
}

.cart-group {
    padding: 16px 14px 8px;
}

.cart-group-title {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a8a;
    margin-bottom: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #f4f4f4;
}

.cart-thumb-fallback {
    width: 64px;
    height: 64px;
    background: #f4f4f4;
}

.cart-sku {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6a6a6a;
}

.cart-name {
    font-size: 15px;
    font-weight: 500;
    margin: 2px 0 2px;
}

.cart-finish {
    font-size: 12px;
    color: #777;
}

.cart-spec {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.cart-spec.is-ready {
    color: #1a1a1a;
}

.cart-spec.is-error {
    color: #a33;
}

.cart-spec-retry {
    border: none;
    background: none;
    padding: 0;
    margin-left: 6px;
    color: #111;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
}

.qty-stepper button {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
}

.qty-stepper span {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
}

.cart-remove {
    border: none;
    background: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 4px;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.contact-form input {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
}

.cart-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 16px 22px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #e0d6cc;
}

.cart-footer .hub-btn-solid {
    width: 100%;
    height: 48px;
    justify-content: center;
}

.cart-footer #clear-cart {
    height: 36px;
    justify-content: center;
    width: 100%;
}

.hub-btn-ghost {
    border: 1px solid #111;
}

.enquire-panel {
    display: none;
    padding: 0 22px 8px;
}

.enquire-panel.is-open {
    display: block;
}

.enquire-panel p {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

.enquire-panel textarea {
    width: 100%;
    min-height: 140px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    border: 1px solid #ddd;
    resize: vertical;
}

.frame-error {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 6;
    padding: 48px;
    background: rgba(255, 255, 255, 0.9);
}

.frame-error.is-on {
    display: block;
}

.frame-error h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.frame-error p {
    max-width: 560px;
    color: #555;
    line-height: 1.5;
}

.wait-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    border: none;
    padding: 40px 28px 28px;
    max-width: 360px;
    width: calc(100vw - 40px);
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.wait-dialog::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.wait-dialog p {
    font-size: 16px;
    line-height: 1.45;
    margin: 0;
}

.wait-dialog .wait-actions {
    margin-top: 20px;
}

.dialog-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: #111;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.wait-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.wait-dialog.is-busy .wait-actions {
    display: none;
}

@media (max-width: 900px) {
    .hub-current {
        font-size: 13px;
    }
}
