#blazor-error-ui {
    display: none !important;
}

*, *::before, *::after
{
    box-sizing: border-box;
}

input, textarea, button {
    max-width: 100%;
}

.image-thumb-btn {
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-block;
    cursor: zoom-in;
}

/* Your existing part-image probably already sizes to 160x160.
   If not, uncomment these:
.part-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
*/

.img-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.img-modal {
    position: relative;
    max-width: min(1000px, 95vw);
    max-height: 90vh;
    background: #111;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.img-modal-img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
    border-radius: 10px;
}

.img-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 0;
    background: rgba(255,255,255,0.12);
    color: white;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.img-modal-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

/* this enforces all images to be 160 px in size*/
.part-image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

@media (max-width: 360px) {
    .part-image {
        width: 120px;
        height: 120px;
    }
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 900;
    color: var(--muted);
}

    .qty-value.active {
        color: var(--text);
    }

.qty-input {
    width: 64px;
    text-align: center;
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    background: white;
}

:root {
    --pad: 12px;
    --radius: 14px;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --bg: #8E99FF;
}

html, body {
    background: #F4F4F4; /* light gray */
}

body {
    color: var(--text);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--pad);
    padding-bottom: 84px; /* space for sticky footer when used */
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 10px var(--pad);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.topbar-title {
    font-weight: 700;
}

.btn {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    font-size: 16px;
    line-height: 1;
}

    .btn:disabled {
        opacity: 0.6;
    }

.btn-primary {
    border-color: #F70000;
    font-weight: 650;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: white;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

@media (max-width: 520px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.muted {
    color: var(--muted);
}

.spacer {
    height: 12px;
}

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

    .qty button {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 12px;
    }

.sticky-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px var(--pad);
    background: rgba(255,255,255,0.92);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.sticky-footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.sticky-footer .btn {
    flex: 1;
}
