/* ========================================
   组件样式 - JDL Overseas 官网
   ======================================== */

/* 搜索框组件 */
.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-md);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    pointer-events: none;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* 标签组件 */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.tab {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-size: var(--font-size-md);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid var(--color-border);
    color: var(--color-text-primary);
}

.tab:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-lighter);
}

.tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

/* 产品卡片 */
.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: var(--color-bg-light);
    padding: 16px;
}

.product-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-id {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-primary-lighter);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    width: fit-content;
}

.product-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.product-description {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    flex: 1;
    line-height: 1.6;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.badge.vegan { background: #E8F5E9; color: #2E7D32; }
.badge.organic { background: #FFF3E0; color: #E65100; }
.badge.halal { background: #E3F2FD; color: #1565C0; }
.badge.kosher { background: #F3E5F5; color: #6A1B9A; }

/* 分类卡片 */
.category-card {
    position: relative;
    min-height: 240px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.category-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.category-icon {
    font-size: 60px;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.category-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.category-count {
    font-size: var(--font-size-lg);
    color: rgba(255,255,255,0.95);
    font-weight: 500;
}

/* 特性卡片 */
.feature-card {
    background: white;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
    flex-shrink: 0;
}

.feature-icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

.feature-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.feature-description {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* 认证徽章 */
.certification-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.certification-badge:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.certification-name {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: var(--spacing-md);
    text-align: center;
}

/* 联系信息卡片 */
.contact-info-card {
    background: white;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* 表单组件 */
.contact-form {
    background: white;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* 加载动画 */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: var(--spacing-4xl) auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 数据卡片 */
.stat-card {
    text-align: center;
    padding: var(--spacing-2xl);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
}

/* 客户评价卡片 */
.testimonial-card {
    background: white;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial-quote {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.testimonial-avatar,
.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-info h4 {
    margin: 0 0 4px 0;
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-text-primary);
}

.author-info p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.testimonial-company {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* 社交链接 */
.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-2xl);
    right: var(--spacing-2xl);
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-4px);
}
