/* 增强样式 - 改进响应式设计和用户体验 */

/* 响应式图片优化 */
.product-image-enhanced {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-image-enhanced:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 产品卡片增强 */
.product-card-enhanced {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.product-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

/* 导航增强 */
.nav-enhanced {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-enhanced .nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-enhanced .nav-item:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.nav-enhanced .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-enhanced .nav-item:hover::after {
    width: 100%;
}

/* 按钮增强 */
.btn-enhanced {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

/* 表格增强 */
.table-enhanced {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.table-enhanced th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table-enhanced td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.table-enhanced tr:hover td {
    background-color: #f8f9fa;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .product-card-enhanced {
        margin: 10px 0;
        padding: 15px;
    }
    
    .btn-enhanced {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .table-enhanced {
        font-size: 12px;
    }
    
    .table-enhanced th,
    .table-enhanced td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .product-card-enhanced {
        padding: 12px;
    }
    
    .btn-enhanced {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

/* 页面过渡效果 */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 图片懒加载效果 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 搜索框增强 */
.search-enhanced {
    position: relative;
    display: inline-block;
}

.search-enhanced input {
    padding: 10px 40px 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 250px;
}

.search-enhanced input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.search-enhanced button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-enhanced button:hover {
    background: #0056b3;
}

/* 面包屑导航增强 */
.breadcrumb-enhanced {
    display: flex;
    align-items: center;
    padding: 15px 0;
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb-enhanced a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-enhanced a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-enhanced .separator {
    margin: 0 10px;
    color: #adb5bd;
}

/* 标签增强 */
.tag-enhanced {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecef;
    color: #495057;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
    transition: all 0.3s ease;
}

.tag-enhanced:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* 卡片阴影层级 */
.shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.shadow { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12); }
.shadow-lg { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); }
.shadow-xl { box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18); }

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-blue {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.gradient-bg-green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* 动画类 */
.animate-fadeIn {
    animation: fadeIn 0.5s ease-in;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}
