/* Kirei Life 电商网站 - 淘宝手机版风格 */
:root {
    --primary-color: #333333;
    --secondary-color: #ff5000;
    --accent-color: #ff5000;
    --light-color: #f5f5f5;
    --dark-color: #333333;
    --gray-color: #999999;
    --light-gray: #f0f0f0;
    --border-color: #e8e8e8;
    --taobao-orange: #ff5000;
    --price-red: #ff0036;
    
    /* 圆角 */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--taobao-orange);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--taobao-orange);
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 var(--spacing-lg);
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.nav-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-btn {
    background: #ff5000;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--taobao-orange);
}

.cart-icon {
    position: relative;
    font-size: 20px;
    color: var(--dark-color);
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #ff5000, #ff7a45);
    padding: 20px 0;
    margin-bottom: 12px;
    border-radius: 0;
    color: #fff;
    text-align: center;
}

.hero h1 {
    font-size: 20px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
}

.hero p {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto 12px;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #ff5000;
    padding: 8px 24px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 分类导航 */
.categories {
    margin-bottom: var(--spacing-xxl);
}

.section-title {
    font-size: 28px;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.category-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.category-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.category-name {
    font-weight: 500;
    font-size: 14px;
}

/* 商品展示 */
.products {
    margin-bottom: var(--spacing-xxl);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--light-gray);
}

.product-info {
    padding: var(--spacing-md);
}

.product-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--price-red);
}

.original-price {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--spacing-md);
    font-size: 14px;
    color: var(--gray-color);
}

.stars {
    color: #f1c40f;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: #ff5000;
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.add-to-cart:hover {
    background-color: #e04400;
}

.add-to-cart.added {
    background-color: #27ae60;
    animation: buttonPulse 0.5s ease;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* 特色栏 */
.features {
    background-color: var(--light-color);
    padding: var(--spacing-xxl) 0;
    margin-bottom: var(--spacing-xxl);
    border-radius: var(--border-radius-lg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: var(--spacing-md);
    color: var(--secondary-color);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.feature-desc {
    color: var(--gray-color);
    font-size: 14px;
}

/* 底部 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        padding: 0 8px;
    }
    
    .nav-search {
        flex: 1;
        margin: 0 6px;
        order: 2;
        max-width: none;
    }
    
    .nav-search input {
        background: #f5f5f5;
        border: none;
        border-radius: 20px;
        height: 32px;
        font-size: 13px;
        padding: 0 12px 0 32px;
        color: #333;
    }
    
    .nav-search input::placeholder { color: #ccc; }
    
    .nav-search i {
        left: 10px;
        color: #999;
        font-size: 14px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero {
        background: linear-gradient(135deg, #ff5000, #ff7a45);
        padding: 20px 0;
        margin-bottom: 12px;
        border-radius: 0;
        color: #fff;
    }
    .hero h1 { font-size: 20px; color: #fff; font-weight: 600; margin-bottom: 8px; }
    .hero p { font-size: 12px; color: rgba(255,255,255,0.85); margin-bottom: 12px; }
    .cta-button { 
        background: #fff;
        color: #ff5000;
        border-radius: 20px;
        padding: 8px 24px;
        font-size: 14px;
        font-weight: 700;
    }
    
    .category-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px 4px;
        padding: 4px 8px;
    }
    .category-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 4px;
        border: none;
        border-radius: 8px;
        background: transparent;
        text-decoration: none;
    }
    .category-card:hover {
        transform: none;
        box-shadow: none;
        background: #f5f5f5;
    }
    .category-icon {
        font-size: 24px;
        margin-bottom: 4px;
        display: block;
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        background: #fff5f0;
        border-radius: 10px;
    }
    .category-name {
        font-size: 11px;
        font-weight: 400;
        color: #666;
        text-align: center;
        line-height: 1.2;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card {
        border: none;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }
    .product-card:hover { transform: none; box-shadow: none; }
    .product-image { height: 180px; border-radius: 4px; }
    .product-title {
        font-size: 13px;
        color: #333;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .current-price {
        font-size: 16px;
        font-weight: 700;
        color: #ff0036;
    }
    .original-price { font-size: 11px; color: #999; }
    .add-to-cart {
        background: #ff5000;
        border-radius: 14px;
        font-size: 12px;
        padding: 5px 12px;
    }
    .product-info { padding: 10px; }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .lang-dropdown {
        display: none !important;
        grid-template-columns: 1fr 1fr;
        gap: 2px;
        padding: 4px;
        min-width: 220px;
        max-height: 240px;
        overflow-y: auto;
    }
    .lang-dropdown.show {
        display: grid !important;
    }
    .lang-dropdown li {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 4px;
        gap: 6px;
    }
    .lang-current {
        font-size: 12px;
        padding: 5px 10px;
        min-width: 60px;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 4px;
        z-index: 1002;
    }
    .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s;
    }
    .nav-menu.mobile-show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 4px;
        border-radius: 0 0 12px 12px;
    }
    .nav-menu.mobile-show li {
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .navbar .container {
        gap: 8px;
    }
    
    .navbar { padding: 8px 0; }
    .logo { font-size: 20px; }
    
    .hero { padding: 20px 0; margin-bottom: 12px; }
    
    .categories, .products, .features { margin-bottom: 16px; }
    .features { padding: 16px 0; margin-bottom: 16px; }
    .feature-grid { gap: 8px; }
    .feature-card { padding: 12px 8px; }
    .feature-icon { font-size: 24px; margin-bottom: 4px; }
    .feature-title { font-size: 13px; margin-bottom: 2px; }
    .feature-desc { font-size: 11px; line-height: 1.3; }
    .section-title { font-size: 18px; margin-bottom: 10px; }
    
    .footer { padding: 16px 0 80px; }
    .footer-content { gap: 12px; }
    .footer-section h3 { font-size: 13px; margin-bottom: 6px; }
    .footer-links a { font-size: 11px; }
    .footer-links li { margin-bottom: 2px; }
    .copyright { padding-top: 8px; font-size: 11px; }

    /* 底部导航栏 */
    .mobile-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e8e8e8;
        z-index: 1000;
        padding: 4px 0 env(safe-area-inset-bottom);
    }
    .mobile-tabbar .tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #666;
        font-size: 10px;
        padding: 4px 0;
        gap: 3px;
    }
    .mobile-tabbar .tab-item.active {
        color: #ff5000;
    }
    .mobile-tabbar .tab-icon {
        font-size: 20px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    body { padding-bottom: 56px; }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero { padding: 20px 0; }
    .product-card .product-image { height: 200px; }
    .feature-icon { font-size: 32px; }
    .feature-title { font-size: 16px; }
}
/* ==================== */
/* Language Switcher */
/* ==================== */

.lang-switcher {
    position: relative;
    display: inline-block;
    font-family: 'Segoe UI', 'Hiragino Sans', sans-serif;
    z-index: 1000;
}

.lang-current {
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-width: 80px;
    justify-content: space-between;
}

.lang-current:hover {
    border-color: #ff5000;
    box-shadow: 0 2px 6px rgba(255, 80, 0, 0.1);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 6px 0;
    margin: 4px 0 0 0;
    min-width: 140px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
    animation: langDropdownFadeIn 0.2s ease;
}

@keyframes langDropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown li {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #333;
    transition: all 0.15s ease;
}

.lang-dropdown li:hover {
    background-color: #f8f9fa;
    color: #ff5000;
}

.lang-flag {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* RTL support for Arabic */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .lang-switcher {
    direction: ltr;
}

body.rtl .lang-current {
    flex-direction: row-reverse;
}

body.rtl .lang-dropdown {
    right: auto;
    left: 0;
}

body.rtl .navbar .container {
    flex-direction: row-reverse;
}

body.rtl .nav-menu {
    flex-direction: row-reverse;
}

body.rtl .footer-content {
    flex-direction: row-reverse;
}

body.rtl .product-grid,
body.rtl .category-grid,
body.rtl .feature-grid {
    direction: rtl;
}

body {
    transition: direction 0.3s ease, text-align 0.3s ease;
}

/* Admin header language switcher */
.admin-header .lang-switcher {
    display: inline-block;
    margin-left: 20px;
}

.admin-header .lang-current {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.admin-header .lang-dropdown {
    background: #2c3e50;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-header .lang-dropdown li {
    color: white;
}

.admin-header .lang-dropdown li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ff5000;
}

/* ============ 后台管理样式 ============ */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 100px;
}

.admin-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header-bar h2 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
}

.btn-primary {
    background-color: #ff5000;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #e04800;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background-color: #e8e8e8;
}

.btn-danger {
    background-color: #ff0036;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background-color: #d9002e;
}

.btn-danger-sm {
    background-color: #ff0036;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 6px;
}

.btn-danger-sm:hover {
    background-color: #d9002e;
}

.btn-edit {
    background-color: #fff;
    color: #ff5000;
    border: 1px solid #ff5000;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit:hover {
    background-color: #fff5f0;
}

.btn-back-shop {
    color: #ff5000;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid #ff5000;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-back-shop:hover {
    background-color: #fff5f0;
}

/* 统计卡片 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* 表格 */
.admin-table-wrapper {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #fafafa;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #e8e8e8;
}

.admin-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #fafafa;
}

.admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.admin-prod-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.admin-price {
    color: #ff0036;
    font-weight: 600;
    font-size: 14px;
}

.badge-tag {
    display: inline-block;
    background: #fff0e6;
    color: #ff5000;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
}

.custom-tag {
    display: inline-block;
    background: #e6f7ff;
    color: #1890ff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

.default-tag {
    display: inline-block;
    background: #f5f5f5;
    color: #999;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 手机卡片列表 */
.admin-card-list {
    display: none;
}

.admin-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

.admin-card-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.admin-card-info {
    flex: 1;
    min-width: 0;
}

.admin-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.admin-card-actions {
    display: flex;
    gap: 8px;
}

.admin-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* 模态弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-sm {
    max-width: 420px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    background: #fff;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff5000;
    box-shadow: 0 0 0 3px rgba(255, 80, 0, 0.1);
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-half {
    flex: 1;
}

/* 图片预览 */
.image-preview {
    margin-top: 8px;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    object-fit: cover;
}

/* 多语言折叠 */
.lang-fields-toggle {
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    transition: background 0.2s;
    user-select: none;
}

.lang-fields-toggle:hover {
    background: #f0f0f0;
}

.lang-fields-area {
    padding-left: 8px;
    border-left: 3px solid #ff5000;
    margin-bottom: 16px;
}

.lang-fields-area .form-group {
    margin-bottom: 12px;
}

.lang-fields-area label {
    font-size: 12px;
    color: #888;
}

/* 导航栏管理入口 */
.nav-admin-item a {
    color: #ff5000 !important;
    font-weight: 500;
}

@media (max-width: 768px) {
    .nav-admin-item {
        border-top: 1px solid #f0f0f0;
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* responsive admin */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .stat-card {
        padding: 14px 10px;
    }
    .stat-number {
        font-size: 24px;
    }
    .stat-label {
        font-size: 11px;
    }
    .admin-table-wrapper {
        display: none;
    }
    .admin-card-list {
        display: block;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }
    .btn-back-shop {
        display: none;
    }
}

/* 底部导航栏桌面端隐藏 */
.mobile-tabbar { display: none; }
@media (max-width: 768px) {
    .mobile-tabbar { display: flex; }
}

/* 汉堡菜单默认隐藏 */
.hamburger { display: none; }
@media (max-width: 768px) {
    .hamburger { display: flex; }
}