:root {
    --primary-color: #ff6b35;
    --text-color: #333;
    --text-color-light: #999;
    --background-color: #f8f8f8;
    --surface-color: #ffffff;
    --border-color: #f5f5f5;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    background-color: var(--background-color);
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* 轮播图样式 */
.banner-section {
    position: relative;
    width: 100%;
    height: 200px; /* Mobile height */
    overflow: hidden;
    background-color: var(--border-color);
}

.banner-swiper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.banner-item {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--primary-color);
}

/* 功能导航样式 */
.nav-section {
    display: flex;
    background: var(--surface-color);
    padding: 20px 0;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.nav-icon img {
    width: 100%;
    height: 100%;
}

.nav-text {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

/* 通用section样式 */
.section {
    background: var(--surface-color);
    margin: 10px;
    border-radius: 8px;
    padding-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-more {
    display: flex;
    align-items: center;
    color: var(--text-color-light);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.arrow {
    margin-left: 5px;
    color: var(--primary-color);
}

/* 网格商品列表 */
.grid-shop-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grid-shop-item {
    width: calc(50% - 5px);
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.grid-shop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.grid-shop-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.grid-shop-info {
    padding: 12px;
}

.grid-shop-title {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    height: 38px; /* 2 lines height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.grid-shop-price {
    display: flex;
    align-items: center;
}

.price {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
}

.original-price {
    color: var(--text-color-light);
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 8px;
}

/* 品质保证版块 */
.quality-section {
     margin: 10px;
     background-color: var(--surface-color);
     border-radius: 8px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
     overflow: hidden;
}

.quality-content {
    padding: 5px 20px;
}

.quality-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.quality-item:last-child {
    border-bottom: none;
}

.quality-icon {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    border-radius: 50%;
}

.quality-icon img {
    width: 30px;
    height: 30px;
}

.quality-info {
    flex: 1;
}

.quality-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 2px;
}

.quality-desc {
    font-size: 13px;
    color: var(--text-color-light);
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-color-light);
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .banner-section {
        height: 400px;
        border-radius: 12px;
        margin-top: 20px;
    }
    
    .grid-shop-list {
         padding: 0;
         gap: 20px;
    }

    .grid-shop-item {
        width: calc(25% - 15px);
    }
    
    .nav-section {
        padding: 30px 0;
    }
    
    .nav-icon {
        width: 50px;
        height: 50px;
    }
}

/* Shop Page Specific Styles */
.search-section {
    width: 100%;
    position: sticky;
    top: 50px;
    z-index: 100;
    background: var(--surface-color);
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 15px;
}

.search-icon {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 18px;
}

.search-input {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
    border: none;
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-color-light);
}

.search-btn {
    font-size: 14px;
    color: white;
    background: var(--primary-color);
    padding: 5px 15px;
    border-radius: 15px;
    margin-left: 10px;
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 500;
}

.shop-grid-container {
    padding: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 10px;
}

.pagination a, .pagination span {
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #e0e0e0;
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.pagination .disabled {
    color: var(--text-color-light);
    pointer-events: none;
}

/* Auth Page (Login/Register) Styles */
.auth-wrapper {
    min-height: 100vh;
    background: var(--surface-color);
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
}

.auth-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.auth-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-color-light);
}

.auth-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-control {
    width: 100%;
    height: 48px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 15px;
    border: 1px solid #e3e8ef;
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    background: var(--surface-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.auth-btn {
    width: 100%;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-btn:hover {
    background: #e65c2e; /* A slightly darker shade of primary-color */
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-color-light);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

/* Detail Page Specific Styles */
.detail-container {
    background: var(--background-color);
    padding-bottom: 80px; /* Space for fixed footer */
}

/* Product Image Swiper */
.detail-swiper-section {
    position: relative;
    width: 100%;
    height: 375px;
    background: var(--surface-color);
}

.detail-swiper {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.detail-swiper-item {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.detail-swiper-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Product Info Section */
.detail-info-section {
    background: var(--surface-color);
    padding: 15px;
    margin-bottom: 10px;
}

.detail-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.detail-original-price {
    font-size: 14px;
    color: var(--text-color-light);
    text-decoration: line-through;
    margin-left: 10px;
}

.detail-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 10px;
    color: var(--text-color);
}

.detail-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tag {
    font-size: 12px;
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Product Details Content */
.detail-content-section {
    background: var(--surface-color);
    padding: 15px;
}

.detail-content-section .section-title {
    padding-left: 0;
    font-size: 16px;
    margin-bottom: 15px;
}

.detail-content-section .section-title::before {
    display: none;
}

.detail-content-section .content {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

.detail-content-section .content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

/* Fixed Footer Action Bar */
.detail-footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
}

.quantity-selector {
    display: flex;
    align-items: center;
}

.quantity-selector .label {
    font-size: 14px;
    margin-right: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
}

.quantity-input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 16px;
}

.add-to-cart-btn {
    flex: 1;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 500;
    margin-left: 15px;
    cursor: pointer;
}

/* My Account Page (my.php) Styles */
.my-container {
    background: var(--background-color);
}

.my-header {
    background: var(--primary-color);
    padding: 30px 20px;
    color: white;
}

.my-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.my-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    object-fit: cover;
}

.my-user-details .name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.my-user-details .tel {
    font-size: 14px;
    opacity: 0.9;
}

.my-login-prompt .prompt-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
}

.my-login-btn {
    background: white;
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
}

.my-card {
    background: var(--surface-color);
    margin: 10px 10px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.my-order-stats {
    display: flex;
    padding: 15px 0;
    justify-content: space-around;
}

.my-order-stat-item {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
}

.my-order-stat-item .icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.my-order-stat-item .label {
    font-size: 13px;
    color: var(--text-color-light);
}

.my-menu-list {
    padding: 10px 0;
}

.my-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.my-menu-item:last-child {
    border-bottom: none;
}

.my-menu-item .icon {
    font-size: 18px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
    color: var(--text-color-light);
}

.my-menu-item .title {
    flex: 1;
    font-size: 15px;
}

.my-menu-item .arrow {
    color: #ccc;
}

.my-logout-btn-container {
    padding: 20px;
}

.my-logout-btn {
    display: block;
    width: 100%;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: #ffebe6;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

/* General Top Navigation Bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    padding: 0 15px;
    background: var(--surface-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.top-nav .nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.top-nav .nav-right {
    justify-content: flex-end;
}

.top-nav .nav-left a,
.top-nav .nav-right a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.top-nav .nav-left img,
.top-nav .nav-right img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.top-nav .nav-center {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-nav .nav-site-name {
    font-size: 20px;
    font-weight: 600;
}

.top-nav .nav-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 8px;
    border-radius: 4px;
}

/* Adjust sticky search for new nav */
.search-section {
    width: 100%;
    position: sticky;
    top: 50px;
    z-index: 100;
    background: var(--surface-color);
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 15px;
}

.search-icon {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 18px;
}

.search-input {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
    border: none;
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-color-light);
}

.search-btn {
    font-size: 14px;
    color: white;
    background: var(--primary-color);
    padding: 5px 15px;
    border-radius: 15px;
    margin-left: 10px;
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 500;
}

.shop-grid-container {
    padding: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 10px;
}

.pagination a, .pagination span {
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #e0e0e0;
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.pagination .disabled {
    color: var(--text-color-light);
    pointer-events: none;
}