* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background-color: #232f3e;
    padding: 1rem 0;
    color: white;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.title {
    text-align: center;
    margin-bottom: 2rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.template-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.template-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.template-content {
    padding: 1rem;
}

.template-name {
    margin: 0 0 0.5rem 0;
}

.template-description {
    color: #666;
    margin-bottom: 1rem;
}

.select-button {
    width: 100%;
    padding: 0.8rem;
    background-color: #232f3e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.select-button:hover {
    background-color: #1a2532;
}

.footer {
    background-color: #f8f9fa;
    padding: 1rem 0;
    text-align: center;
    margin-top: auto;
}

#customizeModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-content button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-content button:first-of-type {
    background-color: #232f3e;
    color: white;
}

.modal-content button:last-of-type {
    background-color: #ddd;
}

/* 可编辑链接的样式 */
.editable-link {
    cursor: text;
    position: relative;
}

.editable-link:hover::after {
    content: '点击编辑链接';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* 链接编辑输入框样式 */
.link-edit-input {
    width: 100%;
    padding: 8px;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 14px;
    margin: 4px 0;
}

.link-edit-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 链接编辑提示容器样式 */
.link-edit-hint-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

/* 链接编辑提示样式 */
.link-edit-hint {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

/* 编辑模式下的链接样式 */
#modalProductLink {
    position: relative;
    cursor: pointer;
}

/* 输入框样式 */
.link-edit-input {
    width: 100%;
    padding: 8px;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 14px;
    margin: 4px 0;
}

.link-edit-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
} 

/* 添加到现有的 CSS 中 */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 20px;
}

.product-management {
    display: none;
    width: 100%;
    text-align: right;
}

.add-product-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.add-product-btn:hover {
    background-color: #45a049;
}

.delete-product-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 2;
    transition: background-color 0.3s;
}

.delete-product-btn:hover {
    background-color: rgba(255, 0, 0, 0.9);
}

.product-card {
    position: relative;
}

/* 添加到现有的 CSS 中 */
.edit-mode .contact-email,
.edit-mode .contact-phone {
    padding: 2px 5px;
    border: 1px dashed transparent;
    transition: all 0.3s ease;
}

.edit-mode .contact-email:hover,
.edit-mode .contact-phone:hover {
    border-color: var(--secondary-color);
    background: rgba(255, 153, 0, 0.05);
}

.edit-mode .contact-email:focus,
.edit-mode .contact-phone:focus {
    border-color: var(--secondary-color);
    outline: none;
    background: white;
    box-shadow: 0 0 5px rgba(255, 153, 0, 0.3);
}

/* 添加编辑提示 */
.edit-mode .contact-email::before,
.edit-mode .contact-phone::before {
    content: '点击编辑';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.edit-mode .contact-email:hover::before,
.edit-mode .contact-phone:hover::before {
    opacity: 1;
}

/* 语言模式选择器样式 */
.language-mode-select {
    padding: 0.5rem;
    border: 1px solid #fff;
    border-radius: 4px;
    background-color: transparent;
    color: white;
    cursor: pointer;
    font-size: 14px;
    margin-right: 1rem;
}

.language-mode-select option {
    background-color: #232f3e;
    color: white;
}

/* 语言编辑提示样式 */
.language-edit-hint {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
}

/* 单语言模式下隐藏语言切换器 */
.single-language .language-switcher {
    display: none !important;
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 2000;
}

.notification.success {
    background-color: #4CAF50;
}

.notification.error {
    background-color: #f44336;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* 图标选择器模态框样式 */
.icon-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.icon-picker-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
}

.icon-categories {
    margin-bottom: 20px;
}

.icon-categories select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.icon-item:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

/* 编辑模式下的图标样式 */
.edit-mode .feature-icon {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.edit-mode .feature-icon:hover {
    transform: scale(1.1);
}

.edit-mode .feature-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* 修改用户评价头像的样式 */
.testimonial-avatar {
    position: relative; /* 确保相对定位 */
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
    cursor: pointer; /* 添加指针样式 */
}

.edit-mode .testimonial-avatar {
    cursor: pointer;
}

.edit-mode .testimonial-avatar:hover .image-upload-overlay,
.edit-mode .testimonial-avatar:hover .image-upload-hint {
    opacity: 1;
}

.edit-mode .testimonial-avatar .image-upload-hint {
    font-size: 12px;
    padding: 4px 8px;
    white-space: nowrap;
}

/* 添加联系图标编辑样式 */
.edit-mode .contact-icon {
    cursor: pointer;
    position: relative;
}

.edit-mode .contact-icon:hover {
    opacity: 0.8;
}

.edit-mode .contact-icon:hover::after {
    content: '点击更换图标';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1;
}

.template-card.in-development {
    position: relative;
    opacity: 0.8;
}

.template-card.in-development::after {
    content: attr(data-status);
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.template-card.in-development .select-button {
    background-color: #6c757d;
    cursor: not-allowed;
}

.template-card.in-development .select-button:hover {
    transform: none;
    box-shadow: none;
}