/* Global Search UI Styles */
.search {
    position: relative;
    display: flex !important;
    align-items: center;
    flex: 1 1 0% !important;
    margin: 0;
    width: 100% !important;
    transition: all 0.3s ease;
}

.acme-global-search-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

#searchForm {
    position: relative;
    display: flex !important;
    align-items: center;
    flex: 1 1 0% !important;
    width: 100% !important;
}

.acme-global-search-modal .modal-dialog {
    max-width: 720px;
    margin: clamp(56px, 10vh, 108px) auto 1.5rem;
}

.acme-global-search-modal.is-image-search-mode .modal-dialog {
    max-width: min(1040px, calc(100vw - 32px));
}

.acme-global-search-modal .modal-content {
    position: relative;
    overflow: visible;
    border: 1px solid rgba(65, 181, 132, 0.34);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(246, 251, 250, 0.96)),
        linear-gradient(135deg, rgba(65, 181, 132, 0.2), rgba(72, 111, 255, 0.12));
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.acme-global-search-modal .modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 0%, rgba(65, 181, 132, 0.18), transparent 34%),
        radial-gradient(circle at 84% 0%, rgba(78, 118, 255, 0.14), transparent 30%);
}

.acme-global-search-modal .modal-body {
    position: relative;
    padding: 18px;
}

.acme-global-search-modal-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.acme-global-search-modal-box {
    width: 100% !important;
}

.acme-global-search-modal-panel-host {
    min-height: 0;
}

.acme-global-search-modal #searchForm {
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
}

/* Icon inside the search field */
.search-icon-prefix {
    position: absolute;
    left: 14px;
    z-index: 2;
    pointer-events: none;
    color: #94a3b8; /* Match placeholder color */
    font-size: 14px;
    transition: all 0.22s ease;
}

.acme-global-search-image-btn {
    position: absolute;
    left: 34px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: #64748b;
    background: transparent;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.acme-global-search-image-btn::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(65, 181, 132, 0.26);
    border-radius: 7px;
    opacity: 0;
    transform: scale(0.72);
    pointer-events: none;
}

.acme-global-search-image-btn:hover,
.acme-global-search-image-btn:focus {
    color: #208f67;
    background: rgba(65, 181, 132, 0.09);
    box-shadow: none;
}

.acme-global-search-image-btn.is-loading i {
    animation: global-search-upload-float 0.9s ease-in-out infinite;
}

.acme-global-search-image-btn.is-loading::after {
    animation: global-search-upload-pulse 0.9s ease-out infinite;
}

/* Search Input Styling */
#search-field {
    width: 100% !important;
    max-width: 100% !important;
    height: 42px;
    padding-left: 76px;
    border-radius: 12px;
    color: var(--gs-spu-text, #1f2937);
    font-size: 13px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

#search-field::placeholder {
    color: #94a3b8;
}

#search-field:focus {
    background: #fff !important;
    border-color: rgba(65, 181, 132, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 0 0 3px rgba(65, 181, 132, 0.12) !important;
    outline: none;
}

#searchForm:focus-within .search-icon-prefix {
    color: rgba(65, 181, 132, 1);
}

#searchForm.global-search-image-dragging #search-field {
    background: #fff !important;
    border-color: rgba(65, 181, 132, 0.58) !important;
    box-shadow: 0 0 0 3px rgba(65, 181, 132, 0.12) !important;
}

#searchForm.global-search-image-dragging .acme-global-search-image-btn {
    color: #208f67;
    background: rgba(65, 181, 132, 0.12);
}

#search-field.global-search-loading {
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.02), rgba(65, 181, 132, 0.1), rgba(0, 0, 0, 0.02));
    background-size: 200% 100%;
    animation: global-search-loading 1s linear infinite;
}

.acme-global-search-modal #search-field {
    height: 50px;
    padding-right: 46px;
    border-color: rgba(148, 163, 184, 0.34);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
}

.acme-global-search-close {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    color: #64748b;
    background: transparent;
    z-index: 3;
}

.acme-global-search-close:hover {
    color: #208f67;
    background: rgba(65, 181, 132, 0.09);
}

.acme-global-search-modal .global-search-panel {
    width: 100%;
    max-height: min(420px, calc(100vh - 220px));
    background: rgba(255, 255, 255, 0.94);
    z-index: 2060;
}

.acme-global-search-modal.is-image-search-mode .global-search-panel {
    max-height: min(650px, calc(100vh - 190px));
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .acme-global-search-modal .modal-dialog {
        max-width: none;
        margin: 0.75rem;
    }

    .acme-global-search-modal .modal-body {
        padding: 14px;
    }

    .acme-global-search-modal #search-field {
        height: 46px;
        font-size: 13px;
    }
}

.gs-spu-barcode-color-gallery {
    align-items: center;
}

.gs-spu-filter-chips--color {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
}

.gs-spu-filter-chip-set {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.gs-spu-filter-chip-set--normal {
    min-width: 0;
    flex: 0 1 auto;
}

.gs-spu-filter-chip-set--discarded {
    justify-content: flex-end;
    max-width: min(520px, 48vw);
    padding-left: 12px;
    margin-left: 0;
}

.gs-spu-filter-chip-set-label {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--gs-spu-danger);
    font-size: 12px;
    font-weight: 700;
}

.gs-spu-color-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.gs-spu-filter-chip--color {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-right: 14px;
}

.gs-spu-color-chip-text {
    display: inline-flex;
    align-items: center;
}

.gs-spu-color-chip-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--gs-spu-text-soft);
    text-decoration: none;
    transition: color 0.16s ease, transform 0.16s ease;
    cursor: pointer;
    flex: 0 0 auto;
}

.gs-spu-color-chip-preview:hover {
    color: var(--gs-spu-brand-deep);
    text-decoration: none;
    transform: translateY(-1px);
}

.gs-spu-color-chip-preview-image {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    background: #f5f7fb;
    flex-shrink: 0;
}

.gs-spu-color-chip-shared-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 24px;
    padding: 0;
    margin-left: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--gs-spu-text-soft);
    opacity: 0;
    pointer-events: none;
    transition: width 0.16s ease, margin-left 0.16s ease, opacity 0.16s ease, color 0.16s ease;
    cursor: pointer;
    flex: 0 0 auto;
}

.gs-spu-filter-chip--color:hover .gs-spu-color-chip-shared-trigger {
    width: 24px;
    margin-left: 2px;
    opacity: 1;
    pointer-events: auto;
}

.gs-spu-color-chip-shared-trigger:hover {
    color: var(--gs-spu-brand-deep);
}

.gs-spu-color-chip-shared-trigger.is-loading {
    opacity: 1;
    width: 24px;
    margin-left: 2px;
    pointer-events: none;
}

.gs-spu-color-chip-shared-trigger.is-loading i {
    animation: global-search-loading 1s linear infinite;
}

.gs-spu-image-modal {
    position: fixed;
    inset: 0;
    z-index: 14010;
    display: none;
}

.gs-spu-image-modal.show {
    display: block;
}

.gs-spu-image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
}

.gs-spu-image-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(92vw, 1180px);
    max-height: 92vh;
    margin: 4vh auto;
    padding: 18px 18px 20px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.gs-spu-image-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--gs-spu-text);
}

.gs-spu-image-modal-title {
    padding-right: 42px;
    color: var(--gs-spu-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.gs-spu-image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    overflow: auto;
}

.gs-spu-image-modal-img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 90px);
    object-fit: contain;
    border-radius: 10px;
    background: #f8fafc;
}

@keyframes global-search-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes global-search-upload-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes global-search-upload-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes global-search-upload-pulse {
    0% {
        opacity: 0.55;
        transform: scale(0.72);
    }
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

/* Dropdown Panel */
.global-search-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.85); /* transculent background */
    backdrop-filter: blur(12px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(216, 221, 227, 0.6);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(20, 24, 28, 0.12);
    z-index: 2040;
    transition: opacity 0.2s ease, transform 0.2s ease;
    /* initial state for entry animation */
    /* opacity: 0; */
    /* transform: translateY(-4px); */
}

.global-search-panel .global-search-instruction-state {
    padding: 14px 16px;
    text-align: left;
}

.global-search-instruction-title {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.global-search-instruction-body {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.global-search-instruction-list {
    margin: 6px 0 0;
    padding-left: 20px;
}

.global-search-instruction-list li + li {
    margin-top: 4px;
}

/* Base Option Item */
.global-search-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #1f2933;
    text-align: left;
    transition: background 0.15s ease;
    cursor: pointer;
}

.global-search-option:last-child {
    margin-bottom: 0;
}

.global-search-option:hover,
.global-search-option.is-active,
.global-search-option[aria-selected="true"] {
    background: rgba(65, 181, 132, 0.08); /* Theme primary with low opacity */
    outline: none;
}

/* Empty or Error State */
.global-search-option-state {
    cursor: default;
    color: #6b7280;
    padding: 12px;
    text-align: center;
}

.global-search-option-title,
.global-search-option-summary {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-option-title {
    font-weight: 600;
    font-size: 14px;
}

.global-search-option-summary {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

.global-search-image-result {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 8px 10px;
}

.global-search-image-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.global-search-image-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.global-search-image-code {
    flex: 0 0 auto;
    color: #0f5138;
    font-size: 14px;
    font-weight: 700;
}

.global-search-image-title {
    min-width: 0;
    overflow: hidden;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-image-copy-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
}

.global-search-image-copy-code:hover,
.global-search-image-copy-code:focus {
    background: rgba(65, 181, 132, 0.1);
    color: #208f67;
    outline: none;
}

.global-search-image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.global-search-image-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f8fafc;
}

.global-search-image-meta .global-search-image-confidence {
    background: #eef7f4;
    color: #208f67;
    font-weight: 600;
}

.global-search-image-thumbs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.global-search-image-thumb,
.global-search-image-thumb-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 56px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

.global-search-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.global-search-image-thumb-more {
    width: 32px;
}

.global-search-image-workspace {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 12px;
    min-height: 280px;
}

.global-search-query-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.global-search-query-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid var(--acme-color-border, #e2e8f0);
    border-radius: var(--acme-radius-lg, 8px);
    background: var(--acme-color-bg-base, #f8fafc);
}

.global-search-query-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.global-search-query-image-wrap .cropper-container {
    width: 100% !important;
    height: 100% !important;
}

.global-search-query-image-wrap .cropper-view-box,
.global-search-query-image-wrap .cropper-face {
    border-radius: 2px;
}

.global-search-query-image-wrap .cropper-view-box {
    outline-color: var(--acme-color-primary, #41b584);
    position: relative;
}

.global-search-query-image-wrap .cropper-view-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--acme-color-primary, #41b584), transparent);
    box-shadow: 0 0 8px var(--acme-color-primary, #41b584);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.global-search-query-image-wrap.is-searching .cropper-view-box::after {
    opacity: 1;
    animation: cropper-scan 2s linear infinite;
}

@keyframes cropper-scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.global-search-query-image-wrap .cropper-line,
.global-search-query-image-wrap .cropper-point {
    background-color: var(--acme-color-primary, #41b584);
}

.global-search-query-image-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--acme-radius-lg, 8px);
    background: var(--acme-color-primary-light, #ecf8f3);
    color: var(--acme-color-primary-dark, #208f67);
    font-size: 22px;
}

.global-search-query-caption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.global-search-query-label {
    color: var(--acme-color-text-muted, #94a3b8);
    font-size: 12px;
    font-weight: 600;
}

.global-search-query-name {
    overflow: hidden;
    color: var(--acme-color-text-main, #1e293b);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-image-results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 12px;
    min-width: 0;
    max-height: min(610px, calc(100vh - 230px));
    overflow-y: auto;
    padding-right: 2px;
    position: relative;
    transition: opacity 0.2s ease;
}

.global-search-image-results-grid.is-pending {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.global-search-image-grid-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    border-radius: var(--acme-radius-lg, 8px);
    transition: opacity 0.25s ease;
}

.global-search-image-grid-loader .global-search-image-loading-icon {
    font-size: 24px;
    color: var(--acme-color-primary, #41b584);
}

.global-search-image-result-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--acme-color-border, #e2e8f0);
    border-radius: var(--acme-radius-lg, 8px);
    background: var(--acme-color-bg-card, #fff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.global-search-image-result-card:hover,
.global-search-image-result-card.is-active,
.global-search-image-result-card[aria-selected="true"] {
    border-color: var(--acme-color-primary, #41b584);
    background: var(--acme-color-bg-card, #fff);
    box-shadow: 0 10px 25px -5px rgba(65, 181, 132, 0.1), 0 8px 16px -6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.global-search-image-card-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--acme-color-bg-base, #f8fafc);
}

.global-search-image-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.global-search-image-result-card:hover .global-search-image-card-media::after {
    opacity: 1;
}

.global-search-image-card-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
}

.global-search-image-result-card:hover .global-search-image-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.global-search-image-card-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--acme-color-text-main, #1e293b);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.18s, color 0.18s, transform 0.18s;
}

.global-search-image-card-action-btn:hover {
    background: var(--acme-color-primary, #41b584);
    color: #fff;
    transform: scale(1.1);
}

.global-search-image-card-action-btn:active {
    transform: scale(0.95);
}

.global-search-image-hover-preview {
    position: fixed;
    z-index: 16000;
    display: none;
    width: min(420px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid var(--acme-color-border, #e2e8f0);
    border-radius: var(--acme-radius-lg, 8px);
    background: #fff;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.22);
    pointer-events: none;
}

.global-search-image-hover-preview.show {
    display: block;
}

.global-search-image-hover-preview-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 260px;
    max-height: min(68vh, 560px);
    overflow: hidden;
    border-radius: 6px;
    background: var(--acme-color-bg-base, #f8fafc);
}

.global-search-image-hover-preview-media img {
    display: block;
    max-width: 100%;
    max-height: min(68vh, 560px);
    object-fit: contain;
}

.global-search-image-hover-preview-title {
    min-height: 24px;
    padding: 8px 4px 0;
    overflow: hidden;
    color: var(--acme-color-text-main, #1e293b);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-image-card-media.is-empty,
.global-search-image-card-empty {
    color: var(--acme-color-text-muted, #94a3b8);
    font-size: 24px;
}

.global-search-image-card-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.global-search-image-result-card:hover .global-search-image-card-photo {
    transform: scale(1.03);
}

.global-search-image-card-count {
    position: absolute;
    right: 6px;
    bottom: 6px;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    z-index: 3;
}

.global-search-image-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 10px;
}

.global-search-image-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-width: 0;
}

.global-search-image-card-code {
    min-width: 0;
    overflow: hidden;
    color: var(--acme-color-primary-dark, #208f67);
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-image-copy-code {
    border: 0;
    background: transparent;
    color: var(--acme-color-text-muted, #94a3b8);
    padding: 2px 4px;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.18s;
    flex-shrink: 0;
}

.global-search-image-copy-code:hover {
    color: var(--acme-color-primary, #41b584);
}

.global-search-image-card-title {
    overflow: hidden;
    color: var(--acme-color-text-sub, #475569);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-image-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--acme-color-text-sub, #475569);
    font-size: 11px;
    line-height: 1.4;
}

.global-search-image-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--acme-color-bg-base, #f8fafc);
}

.global-search-image-card-meta .global-search-image-confidence {
    font-weight: 600;
}

.global-search-image-card-meta .global-search-image-confidence.confidence-high,
.global-search-image-card-meta .global-search-image-confidence.confidence-medium,
.global-search-image-card-meta .global-search-image-confidence.confidence-low {
    background: var(--acme-color-primary-light, #ecf8f3);
    color: var(--acme-color-primary-dark, #208f67);
    border: 1px solid rgba(65, 181, 132, 0.18);
}

.global-search-query-reupload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 32px;
    margin-top: 8px;
    border: 1px dashed var(--acme-color-primary, #41b584);
    border-radius: var(--acme-radius-sm, 4px);
    color: var(--acme-color-primary-dark, #208f67);
    background: var(--acme-color-primary-light, #ecf8f3);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.global-search-query-reupload-btn:hover {
    background: var(--acme-color-primary, #41b584);
    color: #fff;
    border-style: solid;
}

.global-search-image-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 220px;
    color: var(--acme-color-text-sub, #475569);
    font-size: 13px;
}

.global-search-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    color: var(--acme-color-text-sub, #475569);
    font-size: 13px;
}

.global-search-image-loading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--acme-radius-lg, 8px);
    background: var(--acme-color-primary-light, #ecf8f3);
    color: var(--acme-color-primary-dark, #208f67);
    animation: global-search-upload-float 0.9s ease-in-out infinite;
}

@media (max-width: 900px) {
    .global-search-image-workspace {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .global-search-image-results-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .global-search-image-card-media {
        flex-basis: 180px;
        height: 180px;
    }
}

@media (max-width: 575.98px) {
    .acme-global-search-modal.is-image-search-mode .modal-dialog {
        max-width: none;
        margin: 0.75rem;
    }

    .global-search-image-workspace {
        grid-template-columns: 1fr;
    }

    .global-search-query-panel {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: center;
    }

    .global-search-image-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: calc(100vh - 310px);
    }

    .global-search-image-card-media {
        flex-basis: 150px;
        height: 150px;
    }
}

/* Action button in the result panel (e.g., Ask AI Fallback) */
.global-search-option-action {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: #eef7f4;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #208f67;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.global-search-option-action:hover {
    background: #e1efe9;
}

.gs-spu-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 2100;
}

.gs-spu-drawer-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.gs-spu-drawer {
    --gs-spu-panel-bg: #f5f7fb;
    --gs-spu-card-bg: #ffffff;
    --gs-spu-card-soft: #f8fbff;
    --gs-spu-line: #e4eaf2;
    --gs-spu-line-strong: #d5dee9;
    --gs-spu-text: #1f2937;
    --gs-spu-text-soft: #4b5563;
    --gs-spu-muted: #6b7280;
    --gs-spu-brand: #41b584;
    --gs-spu-brand-soft: #eef7f4;
    --gs-spu-brand-border: #a6dfc8;
    --gs-spu-brand-deep: #208f67;
    --gs-spu-danger: #dc2626;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(1040px, 100vw);
    height: 100vh;
    background: var(--gs-spu-panel-bg);
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: -18px 0 42px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    z-index: 2101;
}

.gs-spu-drawer.show {
    transform: translateX(0);
}

.gs-spu-drawer-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%);
}

.gs-spu-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 28px 16px;
    background: var(--gs-spu-card-bg);
    border-bottom: 1px solid var(--gs-spu-line);
    color: var(--gs-spu-text);
}

.gs-spu-drawer-header-main {
    min-width: 0;
    flex: 1 1 auto;
}

.gs-spu-drawer-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    word-break: break-word;
}

.gs-spu-title-code,
.gs-spu-title-name {
    display: inline;
    vertical-align: baseline;
}

.gs-spu-title-code {
    margin-right: 12px;
    font-size: 20px;
    font-weight: 800;
}

.gs-spu-title-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gs-spu-text);
}

.gs-spu-drawer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.gs-spu-drawer-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--gs-spu-line);
    color: var(--gs-spu-text-soft);
    font-size: 12px;
    font-weight: 600;
}

.gs-spu-drawer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(228, 234, 242, 0.72);
}

.gs-spu-drawer-summary:empty {
    display: none;
}

.gs-spu-drawer-summary-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.gs-spu-drawer-summary-label {
    color: var(--gs-spu-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
}

.gs-spu-drawer-summary-value {
    color: var(--gs-spu-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    word-break: break-word;
}

.gs-spu-drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gs-spu-drawer-quick-search {
    position: relative;
    display: flex;
    align-items: center;
}

.gs-spu-drawer-quick-search i {
    position: absolute;
    left: 12px;
    color: var(--gs-spu-text-soft);
    font-size: 14px;
}

.gs-spu-drawer-quick-input {
    width: 200px;
    height: 42px;
    padding: 0 16px 0 34px;
    border: 1px solid var(--gs-spu-line-strong);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--gs-spu-text);
    font-size: 13px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.gs-spu-drawer-quick-input:focus {
    width: 240px;
    background: #fff;
    border-color: var(--gs-spu-brand-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 0 0 3px rgba(37, 99, 235, 0.08); /* brand color is blueish */
    outline: none;
}

.gs-spu-drawer-quick-input::placeholder {
    color: #94a3b8;
}

.gs-spu-drawer-close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gs-spu-line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--gs-spu-text-soft);
    transition: all 0.18s ease;
}

.gs-spu-drawer-close:hover {
    border-color: var(--gs-spu-brand-border);
    color: var(--gs-spu-brand-deep);
    background: var(--gs-spu-brand-soft);
}

.gs-spu-drawer-tabs {
    display: flex;
    gap: 10px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--gs-spu-line);
    background: #ffffff;
}

.gs-spu-tab-list {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
}

.gs-spu-tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--gs-spu-text-soft);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s ease;
}

.gs-spu-tab-lock-marker {
    display: none;
    flex: 0 0 10px;
    width: 10px;
    color: var(--acme-color-primary-dark);
    font-size: 10px;
}

.gs-spu-tab.is-locked .gs-spu-tab-lock-marker {
    display: inline-block;
}

.gs-spu-tab:hover {
    border-color: var(--gs-spu-line-strong);
    color: var(--gs-spu-brand-deep);
    background: #fff;
}

.gs-spu-tab.is-active {
    border-color: var(--gs-spu-brand-border);
    background: var(--gs-spu-brand-soft);
    color: var(--gs-spu-brand-deep);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.gs-spu-tab-lock {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 1px solid transparent;
    border-radius: var(--acme-radius-sm);
    background: transparent;
    color: var(--acme-color-text-muted);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.gs-spu-tab-lock:hover,
.gs-spu-tab-lock:focus {
    border-color: var(--acme-color-border);
    background: var(--acme-color-bg-hover);
    color: var(--acme-color-primary-dark);
    outline: none;
}

.gs-spu-tab-lock.is-active {
    border-color: var(--acme-color-primary);
    background: var(--acme-color-primary-light);
    color: var(--acme-color-primary-dark);
}

.gs-spu-drawer-body {
    background: #fff;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 28px 30px;
}

.gs-spu-pane {
    display: none;
}

.gs-spu-pane.is-active {
    display: block;
}

.gs-spu-barcode-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gs-spu-craft-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

.gs-spu-craft-fields {
    min-width: 0;
}

.gs-spu-craft-image-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gs-spu-craft-image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gs-spu-craft-image-link {
    display: block;
    width: 96px;
    border: 1px solid var(--gs-spu-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.gs-spu-craft-image-preview {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f3f6fb;
}

.gs-spu-craft-image-desc {
    color: var(--gs-spu-text-light);
}

.gs-spu-craft-html-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.gs-spu-craft-opinion-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.gs-spu-craft-html-card {
    padding: 14px 16px;
    border: 1px solid var(--gs-spu-line);
    border-radius: 14px;
    background: #fff;
}

.gs-spu-craft-html-title {
    margin-bottom: 10px;
    color: var(--gs-spu-text);
    font-size: 13px;
    font-weight: 700;
}

.gs-spu-craft-html-body {
    color: var(--gs-spu-text-soft);
    font-size: 12px;
    line-height: 1.8;
    overflow: auto;
}

.gs-spu-craft-html-body table {
    width: 100%;
    border-collapse: collapse;
}

.gs-spu-craft-html-body th,
.gs-spu-craft-html-body td {
    padding: 8px 10px;
    border: 1px solid var(--gs-spu-line);
    vertical-align: top;
}

.gs-spu-craft-image-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gs-spu-craft-image-strip > * {
    flex: 0 0 220px;
}

.gs-spu-craft-horizontal-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gs-spu-craft-horizontal-card {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--gs-spu-line);
    border-radius: 14px;
    background: #fff;
}

.gs-spu-craft-horizontal-image {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.gs-spu-craft-horizontal-title {
    color: var(--gs-spu-text);
    font-size: 13px;
    font-weight: 700;
}

.gs-spu-craft-horizontal-value {
    color: var(--gs-spu-text-soft);
    font-size: 12px;
    line-height: 1.7;
}

.gs-spu-craft-strip-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--gs-spu-line);
    border-radius: 14px;
    background: #fff;
}

.gs-spu-craft-strip-link {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #f8fafc;
}

.gs-spu-craft-strip-image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.gs-spu-craft-strip-title {
    color: var(--gs-spu-text);
    font-size: 13px;
    font-weight: 700;
}

.gs-spu-craft-strip-desc {
    color: var(--gs-spu-text-soft);
    font-size: 12px;
    line-height: 1.75;
}

.gs-spu-craft-table td {
    line-height: 1.8;
    vertical-align: top;
}

.gs-spu-craft-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.gs-spu-craft-table th,
.gs-spu-craft-table td {
    white-space: normal;
    word-break: break-word;
}

.gs-spu-craft-table td:first-child {
    color: var(--gs-spu-text);
    font-weight: 700;
    white-space: nowrap;
}

.gs-spu-craft-measure-table td:first-child,
.gs-spu-craft-horizontal-table td:first-child,
.gs-spu-craft-indicator-table td:first-child {
    width: auto;
    font-weight: 400;
    color: var(--gs-spu-text-soft);
}

.gs-spu-craft-indicator-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 120px;
    text-align: center;
}

.gs-spu-craft-indicator-image {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: 0 0 auto;
}

.gs-spu-craft-indicator-text {
    min-width: 0;
    color: var(--gs-spu-text-soft);
    line-height: 1.7;
}

.gs-spu-craft-measure-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.gs-spu-craft-measure-table th,
.gs-spu-craft-measure-table td {
    white-space: nowrap;
}

.gs-spu-craft-measure-table {
    min-width: max-content;
    table-layout: auto;
}

.gs-spu-craft-horizontal-table th,
.gs-spu-craft-horizontal-table td {
    white-space: normal;
    word-break: break-word;
}

.gs-spu-craft-horizontal-table {
    table-layout: auto;
    min-width: max-content;
}

.gs-spu-craft-horizontal-table td {
    min-width: 120px;
}

.gs-spu-craft-indicator-table td {
    min-width: 140px;
}

.gs-spu-craft-gallery {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gs-spu-craft-gallery-item {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.gs-spu-craft-other-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    border-top: 1px solid var(--gs-spu-line);
}

.gs-spu-craft-other-row {
    display: grid;
    gap: 16px;
    width: 100%;
    padding: 12px 0;
    align-items: start;
}

.gs-spu-craft-other-label {
    color: var(--gs-spu-text);
    font-size: 13px;
    font-weight: 700;
}

.gs-spu-craft-other-value {
    color: var(--gs-spu-text-soft);
    font-size: 13px;
    line-height: 1.8;
    word-break: break-word;
    white-space: normal;
}

.gs-spu-craft-other-row.is-html .gs-spu-craft-other-value {
    color: var(--gs-spu-text);
}

.gs-spu-craft-other-row.is-html .gs-spu-craft-other-value p:first-child {
    margin-top: 0;
}

.gs-spu-craft-other-row.is-html .gs-spu-craft-other-value p:last-child {
    margin-bottom: 0;
}

.gs-spu-craft-procedure-table td,
.gs-spu-craft-merged-table td {
    white-space: normal;
    word-break: break-word;
}

.gs-spu-craft-procedure-table td:first-child,
.gs-spu-craft-merged-table td:first-child {
    white-space: normal;
    width: 15%;
}

.gs-spu-craft-procedure-table td:last-child,
.gs-spu-craft-merged-table td:last-child {
    white-space: normal;
    word-break: break-word;
}

.gs-spu-craft-merged-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gs-spu-craft-merged-label {
    color: var(--gs-spu-text);
    font-weight: 700;
}

.gs-spu-craft-merged-body {
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.gs-spu-section {
    width: 100%;
    min-width: 0;
}

.gs-spu-section-title {
    margin-bottom: 16px;
    color: var(--gs-spu-text);
    font-size: 15px;
    font-weight: 700;
}

.gs-spu-detail-sheet {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gs-spu-detail-top {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.gs-spu-detail-media {
    min-width: 0;
}

@media (max-width: 992px) {
    .gs-spu-craft-other-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .gs-spu-craft-other-grid {
        grid-template-columns: 1fr;
    }
}

.gs-spu-detail-image-card {
    overflow: hidden;
    border: 1px solid var(--gs-spu-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.gs-spu-detail-image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #f3f6fb;
}

.gs-spu-detail-content {
    min-width: 0;
}

.gs-spu-detail-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.gs-spu-detail-column {
    min-width: 0;
}

.gs-spu-detail-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(228, 234, 242, 0.72);
}

.gs-spu-detail-row.is-block {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.gs-spu-detail-row.is-status {
    grid-template-columns: 92px auto;
}

.gs-spu-detail-row:first-child {
    padding-top: 0;
}

.gs-spu-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gs-spu-detail-label,
.gs-spu-summary-label,
.gs-spu-filter-label {
    color: var(--gs-spu-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
}

.gs-spu-detail-row.is-block .gs-spu-detail-label {
    margin-bottom: 0;
}

.gs-spu-detail-value {
    color: var(--gs-spu-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    word-break: break-word;
}

.gs-spu-detail-value.is-emphasis {
    color: #ef4444;
    font-size: 15px;
    font-weight: 600;
}

.gs-spu-detail-row.is-block .gs-spu-detail-value {
    font-size: 13px;
    line-height: 1.78;
}

.gs-spu-detail-row.is-block .gs-spu-detail-value.is-emphasis {
    font-size: 14px;
}

.gs-spu-selling-point {
    display: inline-flex;
    width: 100%;
    align-items: flex-start;
    padding: 0 0 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(228, 234, 242, 0.72);
}

.gs-spu-selling-point-label {
    width: 13%;
    min-width: 92px;
    padding-right: 14px;
    color: var(--gs-spu-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
}

.gs-spu-selling-point-value {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--gs-spu-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.78;
}

.gs-spu-detail-link {
    color: var(--gs-spu-brand-deep);
    text-decoration: none;
}

.gs-spu-detail-link:hover {
    color: var(--gs-spu-brand);
    text-decoration: underline;
}

.gs-spu-detail-composition-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gs-spu-detail-composition-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.gs-spu-detail-composition-color {
    font-weight: 700;
    white-space: nowrap;
}

.gs-spu-detail-composition-text {
    min-width: 0;
}

.gs-spu-detail-composition-section {
    margin-top: 0;
}

.gs-spu-detail-composition-title {
    margin-bottom: 10px;
    color: var(--gs-spu-text);
    font-size: 14px;
    font-weight: 700;
}

.gs-spu-detail-composition-table-wrap {
    overflow: auto;
    border: 1px solid var(--gs-spu-line);
    border-radius: 12px;
    background: #fff;
}

.gs-spu-detail-composition-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gs-spu-detail-composition-table th,
.gs-spu-detail-composition-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.gs-spu-detail-composition-table th {
    background: #f8fafc;
    color: var(--gs-spu-text-soft);
    font-weight: 700;
}

.gs-spu-detail-composition-table th:first-child,
.gs-spu-detail-composition-table td:first-child {
    width: 20%;
}

.gs-spu-detail-composition-table th:last-child,
.gs-spu-detail-composition-table td:last-child {
    width: 80%;
}

.gs-spu-detail-composition-table td {
    color: var(--gs-spu-text);
    line-height: 1.75;
}

.gs-spu-detail-composition-table tbody tr:last-child td {
    border-bottom: none;
}

.gs-spu-detail-mark-section {
    margin-top: 0;
}

.gs-spu-detail-mark-grid-wrap {
    overflow: auto;
    border: 1px solid var(--gs-spu-line);
    border-radius: 12px;
    background: #fff;
}

.gs-spu-detail-mark-grid {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 13px;
}

.gs-spu-detail-mark-grid th,
.gs-spu-detail-mark-grid td {
    min-width: 120px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    border-right: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.gs-spu-detail-mark-grid th {
    background: #f8fafc;
    color: var(--gs-spu-text-soft);
    font-weight: 700;
}

.gs-spu-detail-mark-grid td {
    color: var(--gs-spu-text);
    line-height: 1.75;
}

.gs-spu-detail-mark-grid th:last-child,
.gs-spu-detail-mark-grid td:last-child {
    border-right: none;
}

.gs-spu-detail-mark-grid tbody tr:last-child td {
    border-bottom: none;
}

.gs-spu-detail-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 26px;
}

.gs-spu-detail-status i {
    font-size: 11px;
}

.gs-spu-detail-status.is-yes {
    background: #ecfdf5;
    color: #059669;
}

.gs-spu-detail-status.is-no {
    background: #fef2f2;
    color: #dc2626;
}

.gs-spu-detail-status.is-empty {
    background: #f3f4f6;
    color: #6b7280;
}

.gs-spu-barcode-toolbar {
    background: #fff;
}

.gs-spu-filter-group-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gs-spu-filter-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
}

.gs-spu-filter-label {
    margin: 6px 0 0;
    color: var(--gs-spu-text-soft);
}

.gs-spu-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gs-spu-filter-chip {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--gs-spu-line);
    border-radius: 10px;
    background: #fff;
    color: var(--gs-spu-text-soft);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.16s ease;
}

.gs-spu-filter-chip:hover {
    border-color: var(--gs-spu-brand-border);
    color: var(--gs-spu-brand-deep);
    background: #f8fbff;
}

.gs-spu-filter-chip.is-active {
    border-color: var(--gs-spu-brand-border);
    background: var(--gs-spu-brand-soft);
    color: var(--gs-spu-brand-deep);
    box-shadow: none;
}

.gs-spu-filter-chip--discarded {
    border-color: rgba(239, 68, 68, 0.38);
    background: #fff7f7;
    color: var(--gs-spu-danger);
}

.gs-spu-filter-chip--discarded .gs-spu-color-chip-text {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(185, 28, 28, 0.72);
}

.gs-spu-filter-chip--discarded:hover,
.gs-spu-filter-chip--discarded.is-active {
    border-color: rgba(239, 68, 68, 0.62);
    background: #fef2f2;
    color: var(--gs-spu-danger);
}

.gs-spu-barcode-summary {
    margin-top: 18px;
}

.gs-spu-order-tabs-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.gs-spu-order-type-tabs,
.gs-spu-order-code-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gs-spu-order-type-tab,
.gs-spu-order-code-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--gs-spu-line);
    border-radius: 10px;
    background: #fff;
    color: var(--gs-spu-text-soft);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.16s ease;
}

.gs-spu-order-type-tab.is-active,
.gs-spu-order-code-tab.is-active {
    border-color: var(--gs-spu-brand-border);
    background: var(--gs-spu-brand-soft);
    color: var(--gs-spu-brand-deep);
}

.gs-spu-order-type-count,
.gs-spu-order-code-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
}

.gs-spu-order-code-main {
    font-weight: 700;
}

.gs-spu-order-code-meta {
    color: var(--gs-spu-muted);
    font-size: 11px;
    font-weight: 600;
}

.gs-spu-order-code-tag {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gs-spu-brand-deep);
    font-size: 11px;
    font-weight: 600;
}

.gs-spu-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gs-spu-summary-card {
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--gs-spu-line);
}

.gs-spu-summary-value {
    color: var(--gs-spu-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.gs-spu-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 160px;
    padding: 18px;
    border: 1px dashed var(--gs-spu-line-strong);
    border-radius: 16px;
    background: #fff;
    color: var(--gs-spu-text-soft);
    text-align: center;
}

.gs-spu-state.is-error {
    color: var(--gs-spu-danger);
}

.gs-spu-empty-inline {
    color: var(--gs-spu-muted);
    font-size: 13px;
}

.gs-spu-table-wrap {
    overflow: auto;
    border: 1px solid var(--gs-spu-line);
    border-radius: 14px;
    background: #fff;
}

.gs-spu-table-wrap.is-barcode {
    min-height: 420px;
    max-height: calc(100vh - 290px);
}

.gs-spu-table {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.gs-spu-table th,
.gs-spu-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.gs-spu-table td {
    color: var(--gs-spu-text);
}

.gs-spu-barcode-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0.15rem 0.55rem;
    border-color: #d8e2ec;
    border-radius: 4px;
    background: #fff;
    color: var(--gs-spu-text-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transition: all 0.16s ease;
}

.gs-spu-barcode-print-btn i {
    color: var(--gs-spu-brand-deep);
    font-size: 12px;
}

.gs-spu-barcode-print-btn:hover,
.gs-spu-barcode-print-btn:focus {
    border-color: var(--gs-spu-brand-border);
    background: var(--gs-spu-brand-soft);
    color: var(--gs-spu-brand-deep);
    box-shadow: none;
}

.gs-spu-barcode-print-btn:focus {
    outline: none;
}

.gs-spu-order-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gs-spu-order-download-btn {
    min-width: 30px;
    justify-content: center;
}

.gs-spu-order-download-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.gs-spu-table tbody tr:hover td {
    background: #f8fbff;
}

.gs-spu-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7faff;
    color: var(--gs-spu-text-soft);
    font-weight: 700;
}

.gs-spu-json {
    margin: 0;
    padding: 14px 16px;
    overflow: auto;
    border-radius: 14px;
    background: #111827;
    color: #f9fafb;
    font-size: 12px;
    line-height: 1.6;
}

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

.gs-spu-error-text {
    color: #fca5a5;
}

body.gs-spu-drawer-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .gs-spu-drawer {
        width: 100vw;
    }

    .gs-spu-detail-top {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 18px;
    }

    .gs-spu-detail-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gs-spu-drawer-header,
    .gs-spu-drawer-tabs,
    .gs-spu-drawer-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .gs-spu-drawer-header {
        padding-top: 18px;
    }

    .gs-spu-drawer-tabs {
        gap: 8px;
    }

    .gs-spu-tab-list {
        gap: 4px;
    }

    .gs-spu-tab {
        gap: 4px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .gs-spu-drawer-title {
        font-size: 15px;
    }

    .gs-spu-title-code {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
        font-size: 17px;
    }

    .gs-spu-title-name {
        font-size: 13px;
    }

    .gs-spu-drawer-summary,
    .gs-spu-drawer-summary-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .gs-spu-detail-top {
        grid-template-columns: 1fr;
    }

    .gs-spu-detail-media {
        max-width: 180px;
    }

    .gs-spu-detail-composition-table th,
    .gs-spu-detail-composition-table td,
    .gs-spu-detail-mark-grid th,
    .gs-spu-detail-mark-grid td {
        white-space: normal;
    }

    .gs-spu-summary-grid {
        grid-template-columns: 1fr;
    }

    .gs-spu-detail-row,
    .gs-spu-filter-group {
        grid-template-columns: 1fr;
    }

    .gs-spu-filter-chips--color {
        grid-template-columns: 1fr;
    }

    .gs-spu-filter-chip-set--discarded {
        justify-content: flex-start;
        max-width: none;
        padding-left: 0;
        margin-left: 0;
        padding-top: 10px;
        border-top: 1px solid var(--gs-spu-line);
    }

    .gs-spu-selling-point {
        display: block;
    }

    .gs-spu-selling-point-label {
        display: block;
        width: 100%;
        min-width: 0;
        padding-right: 0;
        margin-bottom: 6px;
    }

    .gs-spu-detail-row.is-status {
        grid-template-columns: 1fr;
    }

    .gs-spu-detail-label,
    .gs-spu-filter-label {
        margin-top: 0;
    }

    .gs-spu-section {
        padding: 16px;
        border-radius: 14px;
    }

    .gs-spu-table-wrap.is-barcode {
        min-height: 320px;
        max-height: calc(100vh - 260px);
    }
}

@keyframes global-search-loading {
    from {
        background-position: 100% 0;
    }
    to {
        background-position: -100% 0;
    }
}

/* lightGallery z-index overrides to ensure it shows above the Bootstrap modal */
.lg-outer {
    z-index: 15000 !important;
}
.lg-backdrop {
    z-index: 14900 !important;
}
