/* アプリ共通スタイル */
.auth-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.form-auth {
    max-width: 420px;
    padding: 0 1rem;
}

.sidebar .list-group-item.active,
.sidebar .list-group-item:hover {
    background-color: #f8f9fa;
}

.card {
    border: 0;
}

/* ページネーション（Bootstrap と合わせた微調整） */
.card-footer .pagination {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.25rem;
}

.card-footer .page-link {
    min-width: 2.25rem;
    text-align: center;
}

/* 商品詳細：省スペース画像ギャラリー */
.product-gallery {
    position: relative;
}

.product-gallery-main {
    background: #f1f3f5;
    min-height: 220px;
    max-height: 280px;
}

.product-gallery-main img {
    max-height: 280px;
    width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.product-gallery .carousel-control-prev,
.product-gallery .carousel-control-next {
    width: 12%;
    opacity: 0.85;
}

.product-gallery .carousel-control-prev-icon,
.product-gallery .carousel-control-next-icon {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55));
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
}

.product-gallery-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0.35rem;
    overflow: hidden;
    background: #f1f3f5;
    cursor: pointer;
}

.product-gallery-thumb.is-active {
    border-color: var(--bs-primary);
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery-modal-main {
    background: #111;
    min-height: 50vh;
}

.product-gallery-modal-main img {
    max-height: min(78vh, 720px);
    width: 100%;
    object-fit: contain;
}

/* 商品一覧：ステータス別行色
 * Bootstrap 5.3 は td に --bs-table-bg で背景を付けるため、
 * tr の background-color だけでは色が表に出ない。
 */
.product-list-table > tbody > tr.product-row > td:first-child {
    box-shadow: inset 4px 0 0 transparent;
}

.product-list-table > tbody > tr.product-row--research {
    --bs-table-bg: #f1f3f5;
    --bs-table-hover-bg: #e9ecef;
    --bs-table-striped-bg: #f1f3f5;
}
.product-list-table > tbody > tr.product-row--research > td:first-child {
    box-shadow: inset 4px 0 0 #868e96;
}

.product-list-table > tbody > tr.product-row--attention {
    --bs-table-bg: #fff3cd;
    --bs-table-hover-bg: #ffe69c;
    --bs-table-striped-bg: #fff3cd;
}
.product-list-table > tbody > tr.product-row--attention > td:first-child {
    box-shadow: inset 4px 0 0 #f0ad4e;
}

.product-list-table > tbody > tr.product-row--rejected {
    --bs-table-bg: #e9ecef;
    --bs-table-hover-bg: #dee2e6;
    --bs-table-striped-bg: #e9ecef;
    --bs-table-color: #6c757d;
}
.product-list-table > tbody > tr.product-row--rejected > td:first-child {
    box-shadow: inset 4px 0 0 #868e96;
}

.product-list-table > tbody > tr.product-row--purchase {
    --bs-table-bg: #cfe2ff;
    --bs-table-hover-bg: #b6d4fe;
    --bs-table-striped-bg: #cfe2ff;
}
.product-list-table > tbody > tr.product-row--purchase > td:first-child {
    box-shadow: inset 4px 0 0 #0d6efd;
}

.product-list-table > tbody > tr.product-row--ops {
    --bs-table-bg: #e5dbff;
    --bs-table-hover-bg: #d0bfff;
    --bs-table-striped-bg: #e5dbff;
}
.product-list-table > tbody > tr.product-row--ops > td:first-child {
    box-shadow: inset 4px 0 0 #845ef7;
}

.product-list-table > tbody > tr.product-row--bundle {
    --bs-table-bg: #e3fafc;
    --bs-table-hover-bg: #c5f6fa;
    --bs-table-striped-bg: #e3fafc;
}
.product-list-table > tbody > tr.product-row--bundle > td:first-child {
    box-shadow: inset 4px 0 0 #15aabf;
}

.product-list-table > tbody > tr.product-row--listing {
    --bs-table-bg: #d3f9d8;
    --bs-table-hover-bg: #b2f2bb;
    --bs-table-striped-bg: #d3f9d8;
}
.product-list-table > tbody > tr.product-row--listing > td:first-child {
    box-shadow: inset 4px 0 0 #37b679;
}

.product-list-table > tbody > tr.product-row--fulfill {
    --bs-table-bg: #b2f2bb;
    --bs-table-hover-bg: #8ce99a;
    --bs-table-striped-bg: #b2f2bb;
}
.product-list-table > tbody > tr.product-row--fulfill > td:first-child {
    box-shadow: inset 4px 0 0 #2f9e44;
}

.product-list-table > tbody > tr.product-row--claim {
    --bs-table-bg: #f8d7da;
    --bs-table-hover-bg: #f1aeb5;
    --bs-table-striped-bg: #f8d7da;
}
.product-list-table > tbody > tr.product-row--claim > td:first-child {
    box-shadow: inset 4px 0 0 #dc3545;
}

.product-list-table > tbody > tr.product-row--done {
    --bs-table-bg: #ced4da;
    --bs-table-hover-bg: #adb5bd;
    --bs-table-striped-bg: #ced4da;
}
.product-list-table > tbody > tr.product-row--done > td:first-child {
    box-shadow: inset 4px 0 0 #495057;
}

.product-row-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
}

.product-row-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.product-row-legend-swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.15rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* AI評価待ちオーバーレイ */
.ai-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(33, 37, 41, 0.55);
    backdrop-filter: blur(2px);
}

.ai-loading-overlay.is-visible {
    display: flex;
}

.ai-loading-panel {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.75rem 2rem;
    text-align: center;
    min-width: 16rem;
    max-width: 90vw;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.ai-loading-panel .spinner-border {
    width: 2.75rem;
    height: 2.75rem;
}
