/* static/style.css - 完整版商城样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: radial-gradient(circle at 20% 20%, rgba(52,152,219,0.12), transparent 35%), radial-gradient(circle at 80% 0%, rgba(39,174,96,0.12), transparent 30%), #f5f7fb;
    min-height: 100vh;
    position: relative;
}

.page-background {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 10% 90%, rgba(231, 76, 60, 0.12), transparent 25%), radial-gradient(circle at 90% 40%, rgba(52, 152, 219, 0.18), transparent 28%);
    filter: blur(60px);
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
}

.page-main {
    position: relative;
    z-index: 1;
    padding-bottom: 3rem;
}

/* 导航栏样式 */
nav {
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.6rem 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

nav h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

nav h1 a:hover {
    color: #3498db;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.25);
}

.nav-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.nav-cart-badge {
    position: absolute;
    top: -6px;
    right: -12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cart-badge.hidden {
    display: none;
}

.widget-badge {
    margin-left: auto;
    box-shadow: none;
}

/* 主容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* 消息提示样式 */
.flash-messages {
    margin-bottom: 2rem;
}

.flash-message {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    border-left: 4px solid #2980b9;
}

/* 首页样式 */
.welcome {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.welcome h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.welcome p {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title h3 {
    font-size: 1.4rem;
    color: #2c3e50;
}

.section-title p {
    color: #6c757d;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #e8f4ff, #f0fbf4);
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.9rem;
}

.pill .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #27ae60;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    border: 1px solid #edf2f7;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.carousel-track {
    position: relative;
}

.hero-slide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: center;
    padding: 3rem;
    min-height: 460px;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.7s ease;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

.hero-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(52,152,219,0.08), transparent 45%), radial-gradient(circle at 80% 70%, rgba(39,174,96,0.1), transparent 40%);
    pointer-events: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: 1px solid #e5e7eb;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    color: #1f2d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background: #1f2d3d;
    color: white;
}

.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.dot-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dot-btn.active {
    background: #2563eb;
    width: 18px;
    border-radius: 999px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(52,152,219,0.2), transparent 60%);
    right: -50px;
    top: -50px;
}

.hero-content h2 {
    font-size: 2.6rem;
    color: #1f2d3d;
    margin: 1rem 0 0.5rem;
}

.hero-content p {
    color: #5c6670;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
}

.mini-note {
    display: flex;
    gap: 0.75rem;
    color: #6c757d;
}

.mini-note li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mini-note .bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    display: inline-block;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.metric {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    background: linear-gradient(135deg, #f8fbff, #f9fffb);
}

.metric strong {
    display: block;
    font-size: 1.6rem;
    color: #1d4ed8;
}

.metric span {
    color: #6c757d;
}

.hero-visual {
    position: relative;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    height: 100%;
}

.hero-visual > * {
    width: 100%;
    max-width: 400px;
}

.floating-card {
    padding: 1.5rem;
    border-radius: 14px;
    background: white;
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    position: relative;
    z-index: 1;
}

.floating-card h4 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.device-mock {
    width: 100%;
    max-width: 360px;
    height: 500px;
    margin: 0 auto;
    border-radius: 32px;
    background: linear-gradient(180deg, #e5e7eb, #f8fafc);
    padding: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    position: relative;
}

.device-screen {
    height: 100%;
    border-radius: 26px;
    background: linear-gradient(180deg, #0f172a, #111827);
    padding: 14px;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.device-header {
    display: flex;
    gap: 6px;
}

.device-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #334155;
}

.device-body {
    padding: 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    flex: 1;
}

.device-body p {
    color: #e2e8f0;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.device-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.glassy-card {
    padding: 1.85rem;
    width: 100%;
    max-width: 380px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(236,245,255,0.9));
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
    backdrop-filter: blur(6px);
}

.glassy-title {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 0.3rem;
}

.glassy-sub {
    color: #6b7280;
    margin-bottom: 0.8rem;
}

.glassy-chips {
    display: flex;
    gap: 0.5rem;
}

.glassy-chips span {
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    color: #111827;
    border: 1px solid #e5e7eb;
    font-weight: 700;
}

.floating-list {
    display: grid;
    gap: 0.75rem;
}

.floating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.glow {
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(39, 174, 96, 0.25), transparent 60%);
    bottom: -40px;
    left: -20px;
    filter: blur(20px);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card strong {
    font-size: 2.1rem;
    color: #1d4ed8;
    display: block;
}

.stat-card p {
    color: #6c757d;
    margin-top: 0.4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    display: grid;
    gap: 0.5rem;
    border: 1px solid #eef2f6;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.feature-card h4 {
    color: #2c3e50;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.5;
}

.category-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.category-title {
    font-weight: 800;
    color: #1f2d3d;
    white-space: nowrap;
}

.category-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 0.9rem;
    overflow-x: auto;
    padding: 0.25rem 0;
}

.category-list a {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #1f2d3d;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-list a:hover {
    background: #1f2d3d;
    color: white;
    border-color: #1f2d3d;
}

.mega-promo {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mega-main {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    color: white;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.mega-main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
    z-index: 0;
}

.mega-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    display: grid;
    gap: 0.4rem;
}

.mega-content h3 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 800;
}

.mega-desc {
    margin: 0;
    color: rgba(255,255,255,0.9);
}

.mega-tag {
    display: inline-flex;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-weight: 700;
    width: fit-content;
}

.mega-side {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 0.7rem;
}

.side-card {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: white;
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
}

.side-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 0;
}

.side-content {
    position: relative;
    z-index: 1;
    padding: 1rem;
    display: grid;
    gap: 0.2rem;
}

.side-content h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.side-desc {
    margin: 0;
    color: rgba(255,255,255,0.9);
}

.promo-card-wrap {
    overflow: hidden;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.promo-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: white;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.25s ease;
}

.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.1);
    border-color: #dbeafe;
}

.promo-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    width: fit-content;
}

.promo-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
}

.promo-card p {
    color: #6b7280;
    margin: 0;
}

.label {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    background: #ecfdf3;
    color: #16a34a;
    font-weight: 700;
    font-size: 0.85rem;
}

.highlight-panel {
    padding: 1.5rem;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
    align-items: center;
}

.highlight-panel ul {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.4rem;
    color: rgba(255,255,255,0.9);
}

.highlight-panel strong {
    font-size: 1.1rem;
}

.quick-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    font-weight: 700;
}

.auth-links, .user-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.user-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.user-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* 表单样式 */
.admin-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* 商品网格布局 */
.products-header {
    text-align: center;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.products-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.products-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* 搜索框样式 */
.search-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.search-form {
    width: 100%;
    max-width: 600px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #2c3e50;
    background: transparent;
}

.search-input::placeholder {
    color: #95a5a6;
}

.search-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: scale(1.05);
}

.search-btn:active {
    transform: scale(0.95);
}

.search-icon {
    font-size: 1.2rem;
    display: inline-block;
}

.clear-search-btn {
    padding: 0.5rem 1rem;
    color: #95a5a6;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.clear-search-btn:hover {
    color: #e74c3c;
    transform: scale(1.2);
}

.clear-search-btn span {
    display: inline-block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: stretch;
}

/* 商品卡片样式 */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 商品图片区域 */
.product-image-container {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.product-image {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.out-of-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* 商品内容区域 */
.product-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    min-height: 3.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 2.85rem;
}

.product-meta {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: #e74c3c;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-stock {
    font-size: 0.9rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
}

/* 商品操作区域 */
.product-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 1.25rem;
    margin-top: auto;
    flex-shrink: 0;
}

.add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quantity-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-section label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    min-width: 40px;
}

.quantity-input {
    width: 80px;
    padding: 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.add-to-cart-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.add-to-cart-btn.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none !important;
}

.login-to-buy-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.login-to-buy-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* 购物车样式 */
.cart-header {
    text-align: center;
    margin-bottom: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.cart-items-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-items-header {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr 1fr 0.5fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95rem;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-items-list.desktop-view {
    display: flex;
}

.cart-cards-grid.mobile-view {
    display: none;
}

.cart-item {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr 1fr 0.5fr;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cart-item:hover {
    background: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 1.05rem;
}

.item-price, .item-quantity, .item-total {
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    font-size: 1rem;
}

.item-total {
    color: #e74c3c;
    font-weight: 700;
    font-size: 1.1rem;
}

.remove-btn {
    color: #e74c3c;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e74c3c;
}

.remove-btn:hover {
    color: white;
    background: #e74c3c;
    transform: scale(1.1);
}

/* 购物车摘要 */
.cart-summary-section {
    position: sticky;
    top: 2rem;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.summary-card h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.4rem;
    text-align: center;
}

.summary-divider {
    margin: 1.5rem 0;
    border-top: 1px solid #e9ecef;
}

/* 地址选择样式 */
.address-selection {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.address-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.address-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.address-option input[type="radio"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    cursor: pointer;
}

.address-option input[type="radio"]:checked + .address-info {
    color: #3498db;
}

.address-option.default {
    border-color: #3498db;
    background: #f0f7ff;
}

.address-info {
    flex: 1;
}

.address-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.address-header strong {
    color: #2c3e50;
    font-size: 1rem;
}

.address-header .phone {
    color: #6c757d;
    font-size: 0.9rem;
}

.default-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.address-detail {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.address-actions {
    margin-top: 0.5rem;
}

.add-address-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.add-address-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.no-address {
    text-align: center;
    padding: 1.5rem;
    color: #6c757d;
}

.no-address p {
    margin-bottom: 1rem;
}

.address-info-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 1rem;
}

.summary-row.total {
    border-top: 2px solid #e9ecef;
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1.25rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.total-amount {
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: 800;
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.checkout-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    text-decoration: none;
    padding: 1.25rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(39, 174, 96, 0.4);
}

.continue-shopping-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.continue-shopping-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* 表格样式 */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.orders-table.desktop-view {
    display: table;
}

.orders-table th, .orders-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.products-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.category-sidebar {
    padding: 1.25rem;
    position: sticky;
    top: 90px;
}

.category-sidebar h4 {
    margin-bottom: 1rem;
    color: #1f2d3d;
}

.category-menu {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.category-menu li {
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 700;
    color: #1f2d3d;
    transition: all 0.2s ease;
}

.category-menu li:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.category-menu li.active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #1d4ed8;
    box-shadow: 0 8px 20px rgba(37,99,235,0.12);
}

.orders-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

.orders-table tfoot {
    background: #f8f9fa;
    font-weight: 700;
}

/* 状态标签 */
.status-待付款 {
    color: #e67e22;
    font-weight: 700;
    background: #fef9e7;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-待发货 {
    color: #3498db;
    font-weight: 700;
    background: #ebf5fb;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-购物车 {
    color: #95a5a6;
    font-weight: 700;
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-待收货 {
    color: #f39c12;
    font-weight: 700;
    background: #fef5e7;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-已完成 {
    color: #27ae60;
    font-weight: 700;
    background: #eafaf1;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
}

.text-muted {
    color: #6c757d;
    font-size: 0.9rem;
}

.orders-page {
    margin-top: 1rem;
}

.orders-page h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

/* 订单卡片样式（移动端） */
.orders-cards {
    display: none;
}

.orders-cards.mobile-view {
    display: none;
}

.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.order-card * {
    box-sizing: border-box;
}

.order-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #e9ecef;
}

.order-id {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.order-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.order-product-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
    overflow: hidden;
}

.order-product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .order-product-image {
        width: 100%;
        height: 120px;
    }
}

.order-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.order-product-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.order-product-name {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-product-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
    overflow: hidden;
}

.order-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e74c3c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-quantity {
    font-size: 0.9rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.order-card-divider {
    height: 1px;
    background: #e9ecef;
    margin: 1rem 0;
}

.order-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid #f8f9fa;
    border-bottom: 1px solid #f8f9fa;
}

.order-total-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 600;
}

.order-total-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: #e74c3c;
}

.order-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.order-time-label {
    font-weight: 600;
}

.order-time-value {
    color: #495057;
}

.order-completed,
.order-pending {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.btn-full {
    width: 100%;
    margin-top: 0.5rem;
}

/* 管理员卡片基础样式 */
.products-cards.mobile-view,
.users-cards.mobile-view,
.admin-orders-cards.mobile-view {
    display: none;
}

.product-admin-card,
.user-admin-card,
.admin-order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.product-admin-card *,
.user-admin-card *,
.admin-order-card * {
    box-sizing: border-box;
}

.product-admin-card:hover,
.user-admin-card:hover,
.admin-order-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 管理员商品卡片详细样式 */
.product-admin-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-header {
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #e9ecef;
}

.product-id {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95rem;
}

.product-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-image-section {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
}

.product-card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.product-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

.product-price-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(135deg, #fff5f5, #ffe5e5);
    border-radius: 8px;
    border: 1px solid #fed7d7;
}

.price-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #e74c3c;
}

.product-description-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    padding: 0.6rem 0.9rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7rem;
}

.product-stock-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stock-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}

.stock-form-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.stock-input-mobile {
    flex: 1;
    max-width: 80px;
    padding: 0.5rem 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.stock-input-mobile:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-stock-update {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-stock-update:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.product-card-footer {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.product-actions-group {
    display: flex;
    gap: 0.75rem;
}

.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-text {
    font-size: 0.9rem;
}

/* 桌面端和移动端视图切换 */
.desktop-view {
    display: table;
}

.mobile-view {
    display: none;
}

/* 确保订单卡片在移动端显示为2列网格 */
@media (max-width: 768px) {
    .orders-table.desktop-view {
        display: none !important;
    }
    
    .orders-cards.mobile-view {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* 管理员商品管理卡片2列布局 */
    .products-cards.mobile-view {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    /* 隐藏桌面端表格 */
    .orders-table.desktop-view {
        display: none !important;
    }
    
    .product-admin-card {
        margin-bottom: 0;
        overflow: hidden;
        max-width: 100%;
    }
    
    .product-card-header {
        padding: 0.75rem 0.9rem;
    }
    
    .product-id {
        font-size: 0.85rem;
    }
    
    .product-card-body {
        padding: 0.9rem;
        gap: 0.75rem;
    }
    
    .product-image-section {
        height: 140px;
    }
    
    .product-card-name {
        font-size: 0.9rem;
        min-height: 2.4rem;
        -webkit-line-clamp: 2;
    }
    
    .product-price-tag {
        padding: 0.5rem 0.75rem;
    }
    
    .price-label {
        font-size: 0.75rem;
    }
    
    .price-value {
        font-size: 1rem;
    }
    
    .product-description-text {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        min-height: 2.4rem;
        -webkit-line-clamp: 2;
    }
    
    .product-stock-section {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
    }
    
    .stock-label {
        font-size: 0.75rem;
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .stock-form-mobile {
        width: 100%;
        gap: 0.4rem;
    }
    
    .stock-input-mobile {
        flex: 1;
        max-width: 70px;
        padding: 0.4rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .btn-stock-update {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .product-card-footer {
        padding: 0.75rem 0.9rem;
    }
    
    .product-actions-group {
        gap: 0.5rem;
        flex-direction: column;
    }
    
    .btn-action {
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .btn-icon {
        font-size: 0.9rem;
    }
    
    .btn-text {
        font-size: 0.85rem;
    }
    
    /* 管理员用户管理卡片2列布局 */
    .users-cards.mobile-view {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .user-admin-card {
        margin-bottom: 0;
        overflow: hidden;
        max-width: 100%;
    }
    
    .user-card-header {
        padding: 0.75rem 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .user-id {
        font-size: 0.85rem;
        width: 100%;
    }
    
    .user-card-header .role-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .user-card-body {
        padding: 0.9rem;
    }
    
    .user-info-row {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .user-card-footer .btn {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    /* 管理员订单管理卡片2列布局 */
    .admin-orders-cards.mobile-view {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .admin-order-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        border: 1px solid #e9ecef;
        display: flex;
        flex-direction: column;
        height: 100%;
        margin-bottom: 0;
    }
    
    .admin-order-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0.9rem;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border-bottom: 1px solid #e9ecef;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .admin-order-id {
        font-weight: 700;
        color: #2c3e50;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .admin-order-card-header .status-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .admin-order-card-body {
        padding: 0.9rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        overflow: hidden;
    }
    
    .admin-order-info-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        font-size: 0.8rem;
        gap: 0.5rem;
        overflow: hidden;
    }
    
    .admin-info-label {
        color: #6c757d;
        font-weight: 600;
        flex-shrink: 0;
        min-width: 50px;
    }
    
    .admin-info-value {
        color: #2c3e50;
        text-align: right;
        flex: 1;
        word-wrap: break-word;
        overflow: hidden;
    }
    
    .admin-info-value.admin-price {
        color: #e74c3c;
        font-weight: 700;
        font-size: 0.9rem;
    }
    
    .admin-order-card-footer {
        padding: 0.75rem 0.9rem;
        border-top: 1px solid #f8f9fa;
        margin-top: auto;
    }
    
    .admin-order-status-text {
        text-align: center;
        color: #6c757d;
        font-size: 0.85rem;
        padding: 0.5rem;
        background: #f8f9fa;
        border-radius: 6px;
    }
    
    .admin-order-card-footer .btn-full {
        width: 100%;
        padding: 0.65rem;
        font-size: 0.85rem;
    }
}

/* 演示账户样式 */
.demo-accounts {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.demo-accounts h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.demo-accounts p {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* 管理员样式 */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.order-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.order-stats-bar h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.stats-mini {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stats-mini .stat-item {
    color: #6c757d;
    font-size: 0.95rem;
}

.stats-mini .stat-item strong {
    color: #3498db;
    font-size: 1.1rem;
    margin-left: 0.25rem;
}

/* 自定义确认对话框 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

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

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.5rem;
    color: #495057;
    line-height: 1.6;
}

.modal-body p {
    margin: 0;
    font-size: 1rem;
}

.modal-body strong {
    color: #3498db;
    font-weight: 700;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
}

.modal-footer .btn {
    min-width: 100px;
}

.admin-actions {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stock-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.stock-input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    background: white;
}

.stock-input:focus {
    outline: none;
    border-color: #3498db;
}

.admin-products {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-products h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
    font-weight: 700;
}

/* 管理员商品卡片桌面端样式优化 */
@media (min-width: 769px) {
    .products-cards.mobile-view {
        display: none !important;
    }
    
    .orders-table.desktop-view {
        margin-top: 1.5rem;
    }
    
    .orders-table.desktop-view th {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        color: white;
        font-weight: 600;
        padding: 1rem;
        text-align: left;
        font-size: 0.95rem;
    }
    
    .orders-table.desktop-view td {
        padding: 1rem;
        vertical-align: middle;
        font-size: 0.9rem;
    }
    
    .orders-table.desktop-view tbody tr {
        transition: all 0.3s ease;
        border-bottom: 1px solid #e9ecef;
    }
    
    .orders-table.desktop-view tbody tr:hover {
        background: #f8f9fa;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .orders-table.desktop-view tbody tr:last-child {
        border-bottom: none;
    }
    
    .stock-form {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    .stock-input {
        width: 80px;
        padding: 0.5rem;
        border: 2px solid #e9ecef;
        border-radius: 6px;
        text-align: center;
        font-weight: 600;
        background: white;
        transition: all 0.3s ease;
    }
    
    .stock-input:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }
    
    .orders-table.desktop-view .btn-small {
        margin: 0.25rem;
        display: inline-block;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .orders-table.desktop-view img {
        border-radius: 6px;
        border: 2px solid #e9ecef;
        transition: all 0.3s ease;
    }
    
    .orders-table.desktop-view tbody tr:hover img {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
}

/* 用户管理样式 */
.admin-users {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.admin-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.admin-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.users-table-container {
    margin-bottom: 2rem;
}

.current-user-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.role-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.role-user {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.users-summary {
    margin-top: 2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.form-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #6c757d;
}

.current-user-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-message {
    color: #856404;
    font-size: 0.95rem;
}

/* 订单数量样式 */
.order-count {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-count.has-orders {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #856404;
}

.order-count.no-orders {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* 图片预览样式 */
.current-image {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.current-image label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.image-preview {
    text-align: center;
}

.image-preview img {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

/* 空状态样式 */
.empty-state, .empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.empty-icon, .empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state h3, .empty-cart h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-state p, .empty-cart p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

.site-footer {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.footer-inner {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #dbeafe;
}

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

.floating-widgets {
    position: fixed;
    right: 20px;
    bottom: 140px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1500;
}

.widget-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 0.9rem;
    background: rgba(255,255,255,0.9);
    color: #1f2d3d;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 700;
    min-width: 110px;
}

.widget-btn:hover {
    background: #1f2d3d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.12);
}

.widget-icon {
    font-size: 1rem;
    line-height: 1;
}

.widget-text {
    font-size: 0.95rem;
}

.widget-btn.to-top {
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.widget-btn.to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* 导航下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 在触发元素下方添加一个不可见的连接区域 */
.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 140px;
    background: rgba(255,255,255,0.98);
    color: #1f2d3d;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
    padding: 0.5rem 0;
    list-style: none;
    display: none;
    border: 1px solid #e5e7eb;
    z-index: 1200;
}

/* 在下拉菜单上方添加一个不可见的连接区域，填充触发元素和菜单之间的间隙 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: -20px;
    right: -20px;
    height: 4px;
    background: transparent;
}

/* 确保鼠标在 dropdown 容器内时菜单保持显示 */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: #1f2d3d;
    border-radius: 0;
    background: transparent;
    border: none;
}

.dropdown-menu li a:hover {
    background: #f1f5f9;
    color: #111827;
}

/* 个人中心 */
.profile-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(135deg, #f3f6ff, #ecfdf3);
    border: 1px solid #e5e7eb;
}

.profile-hero.glass {
    backdrop-filter: blur(8px);
}

.hero-left {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(37,99,235,0.25);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid #e0e7ff;
}

.profile-hero h2 {
    font-size: 1.7rem;
    color: #0f172a;
    margin: 0.3rem 0;
}

.profile-hero .muted {
    color: #6b7280;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    align-self: center;
}

.stat-card {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.stat-card.soft {
    background: #f8fafc;
}

.stat-title {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.stat-value {
    color: #0f172a;
    font-weight: 800;
}

.profile-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.2rem;
}

.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.panel.wide {
    grid-column: 1 / -1;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.label {
    font-size: 0.9rem;
    color: #6b7280;
}

.tag {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #f4f6fb;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
}

.tag.success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.tag.warning {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.form-vertical,
.address-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field label {
    font-weight: 700;
    color: #1f2937;
}

.field input {
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
    background: white;
}

.field.readonly label {
    color: #4b5563;
}

.readonly-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
    background: #f8fafc;
    color: #111827;
    font-weight: 700;
}

.pill-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e0f2fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.field.grow {
    grid-column: span 2;
}

.inline-checkbox {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.btn.full {
    width: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
}

.btn.dark {
    background: #1f2937;
    color: white;
    border: none;
}

.btn.ghost {
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.address-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.address-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #111827;
    font-weight: 700;
}

.address-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: #4b5563;
    margin-top: 0.3rem;
    font-size: 0.95rem;
}

.empty-tip {
    color: #6b7280;
    margin-top: 0.5rem;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.mini-card {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

.mini-card .mini-title {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.mini-card .mini-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
}

.mini-card.pending {
    border-color: #fde68a;
    background: #fffbeb;
}

.mini-card.shipping {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.mini-card.success {
    border-color: #bbf7d0;
    background: #ecfdf3;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
/* 搜索框响应式样式 */
@media (max-width: 768px) {
    .search-container {
        margin: 1rem 0;
    }
    
    .search-box {
        border-radius: 30px;
    }
    
    .search-input {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .search-btn {
        padding: 0.9rem 1.2rem;
        min-width: 50px;
    }
    
    .clear-search-btn {
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        padding: 0 0.75rem;
    }
    
    nav {
        padding: 0.5rem 0;
    }
    
    nav h1 a {
        font-size: 1.2rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }
    
    nav ul li {
        flex: 0 0 auto;
    }
    
    nav ul li a {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        margin: 0.5rem auto;
        padding: 0 0.75rem;
    }
    
    body {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
    }
    
    .hero-slide {
        padding: 2rem;
    }
    
    .carousel-btn {
        display: none;
    }
    
    .hero {
        padding: 2rem;
    }
    
    .highlight-panel {
        grid-template-columns: 1fr;
    }
    
    .mega-promo {
        grid-template-columns: 1fr;
    }

    .mega-side {
        grid-template-rows: 1fr 1fr;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .side-card {
        min-height: 160px;
    }

    .category-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-sidebar {
        position: static;
        padding: 1rem;
    }
    
    .category-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-menu li {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .products-header {
        padding: 1.25rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .products-header h2 {
        font-size: 1.5rem;
    }
    
    .products-header p {
        font-size: 0.9rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-card {
        margin: 0;
    }
    
    .product-image-container {
        height: 140px;
        padding: 0.75rem;
    }
    
    .product-image {
        max-height: 110px;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.95rem;
        min-height: 2.4rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .product-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        min-height: 2rem;
        -webkit-line-clamp: 2;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .product-stock {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .add-to-cart-btn, .login-to-buy-btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .quantity-input {
        width: 60px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .quantity-section label {
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .floating-widgets {
        right: 12px;
        bottom: 80px;
        gap: 8px;
    }

    .widget-btn {
        padding: 0.6rem 0.8rem;
        min-width: 96px;
    }

    .cart-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* 移动端隐藏桌面端列表 */
    .cart-items-list.desktop-view {
        display: none !important;
    }
    
    .cart-items-header {
        display: none;
    }
    
    /* 移动端显示卡片网格 */
    .cart-cards-grid.mobile-view {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .cart-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        border: 1px solid #e9ecef;
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease;
    }
    
    .cart-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }
    
    .cart-card-image {
        width: 100%;
        height: 140px;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
        border-bottom: 1px solid #e9ecef;
    }
    
    .cart-card-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    
    .cart-card-content {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .cart-card-name {
        font-size: 0.9rem;
        font-weight: 700;
        color: #2c3e50;
        margin: 0 0 0.75rem 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.4rem;
    }
    
    .cart-card-meta {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        flex: 1;
    }
    
    .cart-card-price-row,
    .cart-card-quantity-row,
    .cart-card-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85rem;
    }
    
    .cart-card-price-label,
    .cart-card-quantity-label,
    .cart-card-total-label {
        color: #6c757d;
        font-weight: 600;
    }
    
    .cart-card-price {
        color: #2c3e50;
        font-weight: 700;
    }
    
    .cart-card-quantity {
        color: #495057;
        font-weight: 600;
        background: #f8f9fa;
        padding: 0.2rem 0.5rem;
        border-radius: 8px;
    }
    
    .cart-card-total {
        color: #e74c3c;
        font-weight: 800;
        font-size: 1rem;
    }
    
    .cart-card-actions {
        margin-top: auto;
        padding-top: 0.75rem;
        border-top: 1px solid #f8f9fa;
    }
    
    .cart-card-actions .btn {
        width: 100%;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* 桌面端列表样式保持不变 */
    .cart-item {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .item-image {
        width: 70px;
        height: 70px;
        margin-bottom: 0.5rem;
    }
    
    .item-name {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .item-price, .item-quantity, .item-total {
        font-size: 0.9rem;
        text-align: left;
        margin: 0.25rem 0;
    }
    
    .item-actions {
        margin-top: 0.5rem;
    }
    
    .remove-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .admin-links {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .auth-links, .user-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .quantity-section {
        justify-content: center;
    }
    
    .add-to-cart-form {
        flex-direction: column;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    .user-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        margin: 0.8rem 0;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .search-box {
        border-radius: 25px;
    }
    
    .search-input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-input::placeholder {
        font-size: 0.85rem;
    }
    
    .search-btn {
        padding: 0.8rem 1rem;
        min-width: 45px;
    }
    
    .search-icon {
        font-size: 1rem;
    }
    
    .clear-search-btn {
        padding: 0.3rem 0.6rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome {
        padding: 2rem 1rem;
    }
    
    .welcome h2 {
        font-size: 2rem;
    }
    
    .admin-form {
        padding: 1.5rem;
    }
    
    .product-content {
        padding: 1.25rem;
    }
    
    .cart-items-section, .summary-card {
        padding: 1rem;
    }
    
    /* 移动端显示卡片，隐藏表格 */
    .orders-table.desktop-view {
        display: none !important;
    }
    
    .orders-cards.mobile-view {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }
    
    /* 确保所有桌面视图在移动端隐藏 */
    .desktop-view {
        display: none !important;
    }
    
    /* 确保所有移动视图在移动端显示 */
    .mobile-view {
        display: block !important;
    }
    
    .cart-cards-grid.mobile-view {
        display: grid !important;
    }
    
    .order-card {
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        max-width: 100%;
    }
    
    .order-card-header {
        padding: 0.75rem 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .order-id {
        font-size: 0.85rem;
        width: 100%;
    }
    
    .order-card-header .status-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .order-card-body {
        padding: 0.9rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .order-product-info {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
        width: 100%;
        overflow: hidden;
    }
    
    .order-product-image {
        width: 100%;
        height: 120px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .order-product-details {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    
    .order-product-name {
        font-size: 0.85rem;
        min-height: 2.2rem;
        margin-bottom: 0.4rem;
        -webkit-line-clamp: 2;
        word-wrap: break-word;
        overflow: hidden;
    }
    
    .order-product-meta {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        flex-wrap: wrap;
        width: 100%;
        overflow: hidden;
    }
    
    .order-price {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 0;
    }
    
    .order-quantity {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .order-card-divider {
        margin: 0.75rem 0;
    }
    
    .order-card-footer {
        gap: 0.6rem;
        margin-top: auto;
    }
    
    .order-total {
        padding: 0.6rem 0;
        font-size: 0.85rem;
    }
    
    .order-total-label {
        font-size: 0.8rem;
    }
    
    .order-total-amount {
        font-size: 1.1rem;
    }
    
    .order-time {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .order-time-label {
        font-size: 0.7rem;
    }
    
    .order-time-value {
        font-size: 0.75rem;
    }
    
    .btn-full {
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .order-completed,
    .order-pending {
        padding: 0.6rem;
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
}