#mobile-shop-owner-products-modal,
#mobile-shop-owner-products-modal * {
    box-sizing: border-box;
}

#mobile-shop-owner-products-modal {
    --shop-manager-bg: var(--mobile-shop-bg, var(--background-color));
    --shop-manager-text: var(--mobile-shop-text, var(--text-primary));
    --shop-manager-muted: var(--mobile-shop-muted, var(--text-secondary));
    --shop-manager-border: var(--mobile-shop-border, var(--border-color));
    --shop-manager-surface: var(--mobile-shop-surface, var(--surface-color));
    --shop-manager-soft: var(--mobile-shop-soft, var(--input-bg));
    --shop-manager-button-text: var(--mobile-shop-bg, var(--background-color));
    position: fixed;
    top: var(--mobile-app-header-height, calc(env(safe-area-inset-top, 0px) + 116px));
    right: 0;
    bottom: var(--mobile-shop-bottom-nav-offset, calc(64px + env(safe-area-inset-bottom, 0px)));
    left: 0;
    z-index: 9000;
    background: var(--shop-manager-bg);
    color: var(--shop-manager-text);
    display: flex;
    flex-direction: column;
}

.mobile-shop-owner-products-header {
    padding: 10px 14px 8px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
}

.mobile-shop-owner-products-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--shop-manager-text);
    -webkit-text-fill-color: var(--shop-manager-text);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.mobile-shop-owner-products-icon-btn.is-add {
    border: 1px solid var(--shop-manager-border);
    background: var(--shop-manager-soft);
}


.mobile-shop-owner-products-header.is-title-only {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 18px 10px;
}
.mobile-shop-owner-products-header.is-title-only .mobile-shop-owner-products-title {
    text-align: left;
    font-size: 26px;
    line-height: 1.05;
    font-weight: 780;
    letter-spacing: -0.04em;
}

.mobile-shop-owner-products-title {
    min-width: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 860;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-shop-owner-products-tools {
    padding: 12px 18px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    background: var(--shop-manager-bg);
}

.mobile-shop-owner-products-embed-btn {
    grid-column: 2;
    grid-row: 1;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--shop-manager-border);
    background: #ffffff;
    color: var(--shop-manager-text) !important;
    -webkit-text-fill-color: var(--shop-manager-text) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    box-shadow: none;
}

.mobile-shop-owner-products-embed-btn span {
    display: none;
}

.mobile-shop-owner-products-embed-btn i,
.mobile-shop-owner-products-embed-btn span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

.mobile-shop-owner-products-search-wrap {
    grid-column: 1;
    grid-row: 1;
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid var(--shop-manager-border);
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: var(--shop-manager-muted);
    box-shadow: 0 8px 22px rgba(5, 5, 5, 0.035);
}

#mobile-shop-owner-products-search {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 760;
    outline: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    color: var(--shop-manager-text) !important;
    -webkit-text-fill-color: var(--shop-manager-text) !important;
}

#mobile-shop-owner-products-search:empty::before {
    content: attr(data-placeholder);
    color: var(--shop-manager-muted) !important;
    -webkit-text-fill-color: var(--shop-manager-muted) !important;
    opacity: 1 !important;
}

#mobile-shop-owner-products-categories {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 0 0;
    scrollbar-width: none;
}

#mobile-shop-owner-products-categories.is-empty {
    display: none;
}

#mobile-shop-owner-products-categories::-webkit-scrollbar {
    display: none;
}

.mobile-shop-owner-product-filter {
    flex: 0 0 auto;
    min-height: 30px;
    border-radius: 999px;
    border: 1px solid var(--shop-manager-border);
    background: #ffffff;
    color: var(--shop-manager-muted) !important;
    -webkit-text-fill-color: var(--shop-manager-muted) !important;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 820;
    box-shadow: 0 8px 18px rgba(5, 5, 5, 0.035);
}

.mobile-shop-owner-product-filter.is-active {
    background: #f7f7f7;
    border-color: rgba(16, 16, 16, 0.2);
    color: #101010 !important;
    -webkit-text-fill-color: #101010 !important;
    box-shadow: none;
}

.mobile-shop-owner-product-filter span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

.mobile-shop-owner-product-filter-count {
    opacity: 0.72;
}

#mobile-shop-owner-products-list {
    flex: 1;
    overflow-y: auto;
    padding: 2px 18px calc(42px + env(safe-area-inset-bottom, 0px));
    display: grid;
    align-content: start;
    gap: 10px;
}

.mobile-shop-owner-products-state {
    padding: 34px 0;
    text-align: center;
    color: var(--shop-manager-muted);
}

.mobile-shop-owner-products-state i {
    font-size: 28px;
    margin-bottom: 12px;
    opacity: 0.45;
}

.mobile-shop-owner-products-state.is-loading i {
    font-size: 22px;
    margin-bottom: 10px;
    opacity: 1;
}

.mobile-shop-owner-products-state-title {
    font-size: 18px;
    font-weight: 860;
    color: var(--shop-manager-text);
    letter-spacing: 0;
}

.mobile-shop-owner-products-state-copy {
    font-size: 12px;
    line-height: 1.45;
    margin: 6px auto 16px;
    max-width: 260px;
}

.mobile-shop-owner-products-primary-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(16, 16, 16, 0.18);
    background: #ffffff;
    color: #101010 !important;
    -webkit-text-fill-color: #101010 !important;
    font-size: 13px;
    font-weight: 850;
}

.mobile-shop-owner-products-primary-btn i,
.mobile-shop-owner-products-primary-btn span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

.mobile-shop-owner-product-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--shop-manager-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(5, 5, 5, 0.035);
}

.mobile-shop-owner-product-thumb {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 16px;
    border: 1px solid var(--shop-manager-border);
    background: var(--shop-manager-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-manager-muted);
    -webkit-text-fill-color: var(--shop-manager-muted);
    box-shadow: none;
}

.mobile-shop-owner-product-thumb .mobile-shop-product-design-overlay {
    position: absolute !important;
    left: var(--shop-design-x, 50%) !important;
    top: var(--shop-design-y, 50%) !important;
    z-index: 2 !important;
    width: var(--shop-design-size, 22%) !important;
    height: auto !important;
    transform: translate(-50%, -50%) !important;
    object-fit: contain !important;
    pointer-events: none !important;
}

.mobile-shop-owner-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-shop-owner-product-body {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.mobile-shop-owner-product-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.mobile-shop-owner-product-copy {
    min-width: 0;
}

.mobile-shop-owner-product-name {
    font-size: 16px;
    font-weight: 820;
    line-height: 1.12;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--shop-manager-text);
}

.mobile-shop-owner-product-meta {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.mobile-shop-owner-product-meta span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--shop-manager-muted);
    -webkit-text-fill-color: var(--shop-manager-muted);
}

.mobile-shop-owner-product-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: var(--shop-manager-border);
}

.mobile-shop-owner-product-copy .mobile-shop-variant-chips {
    display: grid;
    gap: 4px;
    margin-top: 7px;
}

.mobile-shop-owner-product-copy .mobile-shop-variant-chips div {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}

.mobile-shop-owner-product-copy .mobile-shop-variant-chips strong {
    flex: 0 0 auto;
    color: var(--shop-manager-muted);
    -webkit-text-fill-color: var(--shop-manager-muted);
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.mobile-shop-owner-product-copy .mobile-shop-variant-chips span {
    flex: 0 0 auto;
    max-width: 82px;
    padding: 3px 6px;
    border-radius: 999px;
    border: 1px solid var(--shop-manager-border);
    color: var(--shop-manager-text);
    -webkit-text-fill-color: var(--shop-manager-text);
    font-size: 9px;
    line-height: 1;
    font-weight: 820;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-shop-owner-product-price {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
    font-weight: 760;
    letter-spacing: 0;
    color: var(--shop-manager-text);
    -webkit-text-fill-color: var(--shop-manager-text);
}

.mobile-shop-owner-product-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.mobile-shop-owner-product-action {
    min-height: 32px;
    border-radius: 999px;
    border: 1px solid var(--shop-manager-border);
    background: #ffffff;
    color: var(--shop-manager-text);
    -webkit-text-fill-color: var(--shop-manager-text);
    font-size: 11px;
    font-weight: 820;
    box-shadow: none;
}

.mobile-shop-owner-product-action.is-edit {
    min-width: 74px;
    padding: 0 14px;
    background: #ffffff;
    border-color: rgba(16, 16, 16, 0.22);
    color: #101010;
    -webkit-text-fill-color: #101010;
}

.mobile-shop-owner-product-action.is-icon {
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-shop-owner-product-action.is-delete {
    border-color: rgba(16, 16, 16, 0.12);
    color: rgba(16, 16, 16, 0.72);
    -webkit-text-fill-color: rgba(16, 16, 16, 0.72);
}


/* Hard final override: owner product category active tab must stay readable. */
#mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active,
#mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active span,
#mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active .mobile-shop-owner-product-filter-count,
#mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active * {
    color: #101010 !important;
    -webkit-text-fill-color: #101010 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

/* Remove the extra Products title row; app header already identifies the tab. */
#mobile-shop-owner-products-modal .mobile-shop-owner-products-header.is-title-only {
    display: none !important;
}

[data-theme="dark"] #mobile-shop-owner-products-modal,
[data-theme="dark-accent"] #mobile-shop-owner-products-modal {
    background: var(--mobile-shop-bg) !important;
    color: var(--mobile-shop-text) !important;
}

[data-theme="dark"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active,
[data-theme="dark"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active *,
[data-theme="dark-accent"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active,
[data-theme="dark-accent"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active * {
    background-color: #f7f7f7 !important;
    border-color: #f7f7f7 !important;
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}

[data-theme="dark"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active span,
[data-theme="dark"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active .mobile-shop-owner-product-filter-count,
[data-theme="dark"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active *,
[data-theme="dark-accent"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active span,
[data-theme="dark-accent"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active .mobile-shop-owner-product-filter-count,
[data-theme="dark-accent"] #mobile-shop-owner-products-modal .mobile-shop-owner-product-filter.is-active * {
    background-color: transparent !important;
}
