:root {
    --primary-color: #234454;
    --accent-color: #C72391;
    --accent-gradient: linear-gradient(90deg, #C72391 0%, #FD385D 100%);
    --bg-light: #F5F5F5;
    --border-color: #E2E4E7;
    --text-muted: #979B9F;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.collapse {
    visibility: inherit;
}

/* Header Card */
.inventory-header {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.company-logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 4px;
    object-fit: contain;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}


/* ---- 侧边栏 ---- */
.sidebar {
    width: 96px;
    flex-shrink: 0 !important; /* 禁止flex压缩，重点！ */
    min-width: 96px !important; /* 额外兜底，最小宽度锁死 */
    min-height: calc(100vh - 56px);
    background: #fff;
    border-right: 2px solid #e5e7eb;
    position: sticky;
    top: 56px;
    /*height: calc(100vh - 56px);*/
    overflow-y: auto;
    z-index: 100;
}

.sidebar .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    color: #7e98a3;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: #e91e8c;
    background-color: #e8f4fd;
    text-decoration: none;
}

.sidebar .nav-link.active {
    background-color: #e8f4fd;
    color: #2378c4;
    font-weight: 600;
}

.sidebar .nav-link svg {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

.sidebar .nav-link .nav-label {
    font-size: 11px;
    line-height: 1.2;
}


.badge-exclusive {
    background: var(--accent-gradient);
    color: #fff;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 16px;
    height: 24px;
    display: inline-flex;
    align-items: center;
}

.active-listings {
    font-size: 14px;
    color: var(--primary-color);
}

.active-listings strong {
    font-weight: 600;
}

.vertical-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 16px;
}

/* Filter Accordion */
.filter-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    min-height: 48px;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.filter-header:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.filter-header .filter-icon {
    color: var(--primary-color);
    margin-right: 12px;
    font-size: 18px;
}

.filter-header .filter-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    flex-grow: 1;
}

.filter-header .expand-icon {
    color: rgba(0, 0, 0, 0.54);
    transition: transform 0.3s ease;
    font-size: 20px;
}

.filter-header[aria-expanded="true"] .expand-icon {
    transform: rotate(180deg);
}

.filter-body {
    padding: 8px 16px 16px;
}

.filter-body .form-group {
    margin-bottom: 16px;
}

.filter-body .form-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    display: block;
}

.filter-select {
    height: 40px;
    border: 1px solid #979B9F;
    border-radius: 4px;
    font-size: 14px;
    color: var(--primary-color);
    background-color: #fff;
    padding: 8.5px 14px;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23234454' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 1.5rem;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.toggle-label {
    font-size: 14px;
    color: var(--primary-color);
    cursor: pointer;
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.38);
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #1976D2;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1199.98px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background-color: #FAFAFA;
    overflow: hidden;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.product-card-body {
    padding: 16px;
}

.product-brand {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.product-category {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-specs {
    font-size: 12px;
    color: var(--primary-color);
    line-height: 1.8;
}

.product-specs strong {
    font-weight: 600;
}

.product-specs .verified-time {
    color: var(--text-muted);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    font-size: 14px;
    padding: 8px 14px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.04);
}