/* 澳彼得精酿啤酒 - 主样式文件 */
/* Color Scheme: Gold (#D4A843) + Dark (#1a1a2e) + White */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #D4A843;
    --gold-light: #f0d68a;
    --gold-dark: #b8923a;
    --dark: #1a1a2e;
    --dark-light: #2d2d44;
    --white: #ffffff;
    --gray-100: #f7f7f7;
    --gray-200: #e8e8e8;
    --gray-300: #d0d0d0;
    --gray-500: #999999;
    --gray-700: #666666;
    --danger: #ff4757;
    --success: #2ed573;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gray-100);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.top-bar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
    font-size: 20px;
    font-weight: bold;
}

.top-bar .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.top-bar .actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar .icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.top-bar .icon-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: var(--dark);
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Banner */
.banner-container {
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    background: var(--dark);
}

.banner-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
    min-width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.banner-slide.slide-1 {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.banner-slide.slide-2 {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
}

.banner-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
}

.banner-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 16px;
    opacity: 0.9;
}

.banner-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-indicators .indicator.active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* Member Bar */
.member-bar {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--dark);
    font-weight: 500;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar {
    width: 40px;
    height: 40px;
    background: var(--dark);
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.coupon-count {
    background: var(--dark);
    color: var(--gold);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.login-prompt {
    background: var(--white);
    padding: 20px;
    margin: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.login-prompt p {
    color: var(--gray-700);
    margin-bottom: 15px;
}

.login-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.6);
}

/* Category Tabs */
.category-tabs {
    background: var(--white);
    padding: 15px 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 15px 20px;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 8px 20px;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 25px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.category-tab.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.category-tab:hover {
    border-color: var(--gold);
}

/* Product Grid */
.product-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 100px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-desc {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--gold-dark);
}

.product-price::before {
    content: "¥";
    font-size: 16px;
}

.add-cart-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(212, 168, 67, 0.3);
}

.add-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(212, 168, 67, 0.5);
}

.add-cart-btn:active {
    transform: scale(0.95);
}

/* Bottom Tab Bar */
.bottom-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-item.active {
    color: var(--gold);
}

.tab-item .tab-icon {
    font-size: 24px;
}

.tab-item:hover {
    color: var(--gold);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 20px;
}

.close-cart {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--gold-dark);
    font-weight: bold;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: var(--white);
    color: var(--gold);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--gold);
    color: var(--white);
}

.cart-footer {
    padding: 20px;
    background: var(--gray-100);
    border-top: 2px solid var(--gray-200);
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.4);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.6);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

.modal-input:focus {
    outline: none;
    border-color: var(--gold);
}

.modal-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.4);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.6);
}

.modal-btn.wechat {
    background: #07c160;
    color: var(--white);
    margin-top: 10px;
}

/* Pages */
.page {
    display: none;
    padding-top: 60px;
    padding-bottom: 70px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Coupons Page */
.coupon-list {
    padding: 20px;
}

.coupon-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.coupon-card.used {
    opacity: 0.5;
}

.coupon-card.expired {
    opacity: 0.3;
}

.coupon-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--gold);
}

.coupon-value::before {
    content: "¥";
    font-size: 20px;
}

.coupon-info {
    flex: 1;
}

.coupon-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.coupon-desc {
    font-size: 14px;
    color: var(--gray-700);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Order Page */
.order-placeholder {
    padding: 40px 20px;
    text-align: center;
}

.order-placeholder-icon {
    font-size: 100px;
    margin-bottom: 20px;
}

/* Profile Page */
.profile-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 40px 20px;
    text-align: center;
    color: var(--white);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 15px;
}

.profile-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-section {
    background: var(--white);
    margin: 15px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-section-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.3s ease;
}

.profile-section-item:hover {
    background: var(--gray-100);
}

.profile-section-item:last-child {
    border-bottom: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}
