:root {
    --primary-color: #1890ff;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #ff4d4f;
    --text-color: #333333;
    --text-secondary: #666666;
    --bg-light: #f5f7fa;
    --bg-card: #ffffff;
    --border-color: #e8e8e8;
    --mobile-padding: 12px;
    --touch-target-size: 44px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.header {
    background-color: var(--bg-card);
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    color: var(--primary-color);
    margin: 0;
    text-align: center;
    font-weight: 500;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-bar {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.items-count {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: 4px;
}

.search-input {
    width: 300px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.add-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s;
}

.add-btn:hover {
    background-color: #40a9ff;
}

.add-btn::before {
    content: "+";
    margin-right: 8px;
    font-size: 16px;
    font-weight: bold;
}

.item-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 20px;
    display: flex;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: none; /* 隐藏旧的卡片样式 */
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.item-image {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.item-details {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    align-items: center;
}

.item-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.item-value {
    background-color: var(--bg-light);
    padding: 8px 12px;
    border-radius: 4px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    color: white;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
}

.status-recycled {
    background-color: var(--danger-color);
}

.status-storing {
    background-color: var(--warning-color);
}

.status-sold {
    background-color: var(--success-color);
}

.status-badge.status-unstaked {
    background-color: #722ED1; /* 紫色用于已赎回状态 */
}

.status-badge.status-recycled {
    background-color: var(--danger-color);
}

.status-badge.status-storing {
    background-color: var(--warning-color);
}

.status-badge.status-sold {
    background-color: var(--success-color);
}

.status-badge.status-unstaked {
    background-color: #722ED1; /* 紫色用于已赎回状态 */
}

.status-badge.status-brand-new {
    background-color: #13c2c2; /* 青色用于全新状态 */
}

.expanded-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.toggle-details {
    width: 100%;
    text-align: center;
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s;
    font-size: 14px;
}

.expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
    margin-left: auto;
}

.expand-btn:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

.expand-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-light);
    transition: transform 0.3s;
}

.expand-icon::after {
    content: "∨";
    font-size: 12px;
    font-weight: bold;
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.item-value-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
}

.item-value-text {
    flex-grow: 1;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
}

.toggle-icon.expanded {
    transform: rotate(180deg);
}

.sale-info {
    grid-column: span 2;
    background-color: rgba(82, 196, 26, 0.1);
    padding: 10px 12px;
    border-radius: 4px;
    margin-top: 8px;
    border-left: 3px solid var(--success-color);
}

.sale-date {
    grid-column: span 2;
    background-color: var(--bg-light);
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sale-date::before {
    content: "📅";
    font-size: 14px;
}

.status-badge.status-sold {
    background-color: var(--success-color);
}

.status-badge.status-recycled {
    background-color: var(--danger-color);
}

.status-badge.status-storing {
    background-color: var(--warning-color);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 10% auto;
    padding: 24px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
}

.close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s;
    width: 24px;
    height: 24px;
}

.close-btn:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

.modal-item-row {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.modal-item-label {
    font-weight: 500;
    color: var(--text-secondary);
    width: 120px;
    flex-shrink: 0;
}

.modal-item-value {
    flex: 1;
    background-color: var(--bg-light);
    padding: 8px 12px;
    border-radius: 4px;
    word-break: break-word;
}

.modal-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.primary-btn:hover {
    background-color: #40a9ff;
}

.cancel-btn {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.cancel-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Form styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: white;
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

/* 新增的下拉菜单样式 */
.add-dropdown {
    position: absolute;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 200;
    margin-top: 2px; /* 添加一点间距 */
}

.add-dropdown-item {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.add-dropdown-item:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

/* 编辑选项下拉菜单样式 */
.edit-dropdown {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 300;
    animation: fadeIn 0.2s ease;
}

.edit-dropdown-title {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    margin-bottom: 8px;
}

.edit-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.edit-dropdown-item:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

.edit-dropdown-icon {
    margin-right: 10px;
    font-size: 16px;
}

/* 状态过滤器样式 */
.status-filter-container {
    margin: 15px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.status-filter-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 5px;
}

.status-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-filter-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-filter-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.status-filter-btn.active {
    background-color: rgba(24, 144, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* 图片gallery样式 */
.image-gallery-container {
    margin-bottom: 20px;
    position: relative;
}

.image-gallery {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.image-gallery::-webkit-scrollbar {
    height: 6px;
}

.image-gallery::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.image-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.gallery-image-wrapper {
    flex: 0 0 auto;
    scroll-snap-align: start;
    position: relative;
}

.gallery-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.gallery-image:hover {
    transform: scale(1.02);
}

.gallery-scroll-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.8;
}

/* 列表图片数量提示 */
.item-image-container {
    position: relative;
}

.image-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-left {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .item-card {
        flex-direction: column;
    }
    
    .item-image {
        margin-right: 0;
        margin-bottom: 16px;
        align-self: center;
    }
    
    .item-details {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .expanded-details {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 16px;
    }
    
    .container {
        padding: var(--mobile-padding);
    }
    
    .header {
        padding: 12px 0;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    /* Improve touch targets */
    .close-btn, 
    .add-btn,
    .status-filter-btn,
    .modal-btn {
        min-height: var(--touch-target-size);
        min-width: var(--touch-target-size);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Form improvements for mobile */
    .form-input,
    .form-select {
        padding: 12px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Fix modal positioning */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100%;
        overflow-y: auto;
        padding: var(--mobile-padding);
    }
    
    /* Create a bottom sheet effect for modals on mobile */
    .modal-bottom-sheet .modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        padding-bottom: 32px; /* Add extra padding for iOS safe area */
    }
    
    /* Stacking form elements for better mobile input */
    .form-group {
        margin-bottom: 20px;
    }
    
    /* Larger buttons for touch */
    .modal-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .modal-btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
    
    /* Better status filters for mobile */
    .status-filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-filter-buttons {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }
    
    /* Gallery improvements */
    .gallery-image {
        width: 120px;
        height: 120px;
    }
    
    /* Adjust dropdown positioning */
    .add-dropdown {
        margin-top: 2px; /* 添加一点间距 */
    }
    
    /* Fullscreen image view */
    .fullscreen-image-view {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.9);
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .fullscreen-image {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .fullscreen-close {
        position: absolute;
        top: 20px;
        right: 20px;
        color: white;
        background: rgba(0,0,0,0.5);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
    }
    
    .modal-item-row {
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .modal-item-label {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .modal-item-value {
        width: 100%;
    }
    
    .description-label {
        margin-bottom: 6px;
    }
    
    .description-content {
        padding: 10px;
    }
    
    .delete-image-icon {
        width: 32px;
        height: 32px;
    }
    
    .delete-image-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .delete-item-icon {
        width: 32px;
        height: 32px;
    }
    
    .delete-item-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .modal-header-buttons {
        gap: 12px;
    }
}

/* Small phone screens */
@media (max-width: 380px) {
    .gallery-image {
        width: 100px;
        height: 100px;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
    }
    
    .search-input {
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* Add swipe support indicator for galleries */
.swipe-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
    display: none;
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
        animation: fadeOut 2s forwards 1s;
    }
}

@keyframes fadeOut {
    from { opacity: 0.8; }
    to { opacity: 0; }
}

/* Add pull-to-refresh indicator */
.refresh-indicator {
    text-align: center;
    padding: 0;
    color: var(--text-secondary);
    font-size: 14px;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: rgba(24, 144, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.refreshing .refresh-indicator {
    padding: 10px;
    height: auto;
}

/* 添加下拉刷新箭头动画 */
.refresh-arrow {
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.3s ease;
}

.refresh-arrow.rotate {
    transform: rotate(180deg);
}

/* Make form inputs more touch-friendly */
input[type="checkbox"], 
input[type="radio"] {
    width: 22px;
    height: 22px;
}

/* Active states for touch */
.item-card:active {
    background-color: var(--bg-light);
}

.button:active,
.add-btn:active,
.modal-btn:active {
    opacity: 0.7;
}

/* Clickable images styles */
.clickable-image {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.clickable-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.clickable-image:active {
    transform: scale(0.98);
}

/* Lazy loading image styles */
.lazy-image {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.lazy-image.loaded {
    opacity: 1;
}

/* New styles for the description section */
.description-separator {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0 16px 0;
}

.modal-description {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.description-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.description-content {
    background-color: var(--bg-light);
    padding: 12px;
    border-radius: 4px;
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
}

/* 售出商品两栏布局 */
.sell-info-container {
    display: flex;
    margin-bottom: 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.buy-info-column,
.sell-info-column {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

.column-title {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.buy-info-column .column-title {
    border-bottom-color: var(--danger-color);
}

.sell-info-column .column-title {
    border-bottom-color: var(--success-color);
}

.column-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-item-row.full-width {
    width: 100%;
    margin-bottom: 8px;
}

/* 移动设备上的两栏布局调整 */
@media (max-width: 768px) {
    .sell-info-container {
        /* 保持两栏布局，但调整间距 */
        gap: 10px;
        padding-bottom: 15px;
    }
    
    .column-title {
        margin-bottom: 8px;
        font-size: 14px;
        padding-bottom: 5px;
    }
    
    .column-content {
        gap: 6px;
    }
    
    .modal-item-row.full-width .modal-item-label {
        font-size: 13px;
        width: auto;
        min-width: 60px;
    }
    
    .modal-item-row.full-width .modal-item-value {
        font-size: 13px;
        padding: 6px 8px;
    }
    
    /* 在特别小的屏幕上进一步缩小间距 */
    @media (max-width: 380px) {
        .sell-info-container {
            gap: 6px;
        }
        
        .column-title {
            font-size: 13px;
        }
        
        .modal-item-row.full-width .modal-item-label,
        .modal-item-row.full-width .modal-item-value {
            font-size: 12px;
        }
        
        /* 保持每行展示完整，不换行 */
        .modal-item-row.full-width {
            flex-direction: row;
            align-items: center;
        }
    }
}

/* 售出商品的通用信息区域样式 */
.general-item-info {
    background-color: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.general-item-info .modal-item-row {
    width: 100%;
    margin-bottom: 10px;
}

.general-item-info .modal-item-row:last-child {
    margin-bottom: 0;
}

.general-item-info .modal-item-value {
    background-color: var(--bg-card);
}

/* 新的产品网格布局 */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: var(--bg-light);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px; /* 减小空隙以容纳更多内容 */
    flex: 1;
}

.product-model {
    font-weight: 500;
    font-size: 16px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name {
    color: var(--text-secondary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 产品卡片中的客户信息样式 */
.product-customer {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-label {
    color: var(--text-secondary);
    margin-right: 5px;
    font-weight: 500;
}

.customer-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-status {
    margin-top: auto;
    padding-top: 8px;
}

.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background-color: var(--bg-light);
}

.image-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
}

.empty-result {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 响应式调整 */
/* 不固定2个，自动调整 */
@media (max-width: 768px) {
    .inventory-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .product-model {
        font-size: 14px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .product-customer {
        font-size: 12px;
    }
    
    .product-details {
        padding: 8px;
        gap: 2px;
    }
    
    /* 调整状态标签大小 */
    .product-status .status-badge {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* 移除480px的媒体查询，以确保保持2个卡片布局 */
@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* 加载指示器样式 */
.loading-indicator {
    text-align: center;
    padding: 30px;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 20px 0;
    font-size: 16px;
    color: var(--text-secondary);
}

/* 模态框加载中状态 */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模态框头部按钮布局 */
.modal-header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.delete-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--danger-color);
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.2s;
}

.delete-item-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.delete-item-icon svg {
    width: 24px;
    height: 24px;
}

/* 移动设备上的样式调整 */
@media (max-width: 768px) {
    .delete-item-icon {
        width: 32px;
        height: 32px;
    }
    
    .delete-item-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .modal-header-buttons {
        gap: 12px;
    }
}

/* 移除之前的绝对定位按钮样式 */
.delete-item-button {
    display: none;
}

/* 移动设备上的样式调整 */
@media (max-width: 768px) {
    .delete-item-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}
