/* 重置樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本樣式 */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --text-color: #2d3436;
    --light-text: #636e72;
    --light-bg: #f5f6fa;
    --dark-bg: #2d3436;
    --border-color: #dfe6e9;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #d63031;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Heiti TC', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button, .btn {
    cursor: pointer;
    border: none;
    outline: none;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

button:hover, .btn:hover {
    background: #5649c0;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d1d1d1;
}

input, select, textarea {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

/* 頁頭樣式 */
header {
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
}

.top-bar {
    background-color: var(--dark-bg);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i, .user-actions i {
    margin-right: 5px;
}

.user-actions a {
    margin-left: 15px;
    color: white;
}

.user-actions a:hover {
    color: var(--secondary-color);
}

.main-nav {
    padding: 15px 0;
    background: white;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

.search-bar {
    display: flex;
    width: 40%;
    position: relative;
}

.search-bar input {
    border-radius: 50px;
    padding-right: 50px;
    background-color: var(--light-bg);
    border: none;
}

.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    border-radius: 0 50px 50px 0;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-actions {
    display: flex;
    align-items: center;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-nav {
    background-color: var(--light-bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.category-nav ul {
    display: flex;
    justify-content: space-between;
}

.category-nav li a {
    padding: 5px 10px;
    font-weight: 500;
    color: var(--text-color);
}

.category-nav li a:hover {
    color: var(--primary-color);
}

/* 頁尾樣式 */
footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-info li i {
    margin-right: 10px;
    margin-top: 5px;
}

.footer-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.payment-methods {
    display: flex;
    align-items: center;
}

.payment-methods span {
    margin-right: 15px;
}

.payment-methods img {
    height: 30px;
    margin-right: 10px;
}

.footer-bottom {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* 年齡驗證彈窗 */
.age-verification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.age-verification-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
}

.age-verification h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.age-verification p {
    margin-bottom: 15px;
}

.age-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-bar {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav .container {
        flex-wrap: wrap;
    }
    
    .logo {
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
    }
    
    .search-bar {
        width: 80%;
        margin: 0 auto 15px;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
    }
    
    .category-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .footer-middle {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .age-verification-content {
        padding: 20px;
        width: 90%;
    }
    
    .age-buttons {
        flex-direction: column;
        gap: 10px;
    }
}
