/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4a574;
    --secondary-color: #8b6f47;
    --accent-color: #f4e4d7;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --white: #ffffff;
    --error-color: #e74c3c;
    --success-color: #27ae60;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* 轮播图样式 */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: var(--accent-color);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.carousel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.carousel-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 2;
}

.carousel-btn:hover {
    background: rgba(255,255,255,1);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: var(--white);
}

/* 欢迎区域 */
.welcome {
    padding: 5rem 0;
    text-align: center;
    background: var(--accent-color);
}

.welcome h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.welcome p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* 产品区域 */
.featured-products,
.products-section {
    padding: 5rem 0;
}

.featured-products h2,
.products-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 25px;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.product-count {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-category {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.product-availability {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.product-availability.available {
    color: var(--success-color);
}

.product-availability.unavailable {
    color: var(--error-color);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
}

.modal-product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary-color);
}

.modal-product-name {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-product-price {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-product-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.modal-product-ingredients {
    margin-top: 1.5rem;
}

.modal-product-ingredients h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.modal-product-ingredients ul {
    list-style: none;
    padding-left: 0;
}

.modal-product-ingredients li {
    padding: 0.3rem 0;
    color: var(--text-light);
}

.modal-product-ingredients li::before {
    content: '• ';
    color: var(--primary-color);
    font-weight: bold;
}

/* 关于页面样式 */
.about-section {
    padding: 5rem 0;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.about-text li {
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 1.1rem;
}

.about-text li::before {
    content: '✓ ';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* 联系页面样式 */
.contact-section {
    padding: 5rem 0;
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3,
.contact-form-container h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* 表单样式 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-message {
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none;
    margin-top: 1rem;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    text-align: center;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.featured-products .btn-primary {
    display: block;
    margin: 3rem auto 0;
    max-width: 250px;
}

/* 页脚样式 */
footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .carousel-content h2 {
        font-size: 2rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .hero-carousel {
        height: 400px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* 蛋糕预定页面样式 */
.order-section {
    padding: 3rem 0;
    background: var(--accent-color);
}

.order-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.bakery-info,
.price-info {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.bakery-info h3,
.price-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.bakery-info p,
.price-info p {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.price-info ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.price-info ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.price-info ul li:last-child {
    border-bottom: none;
}

.price-note {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 1rem;
}

.order-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

.order-form .form-group {
    margin-bottom: 1.5rem;
}

.order-form label {
    font-weight: 600;
    color: var(--text-dark);
}

.required {
    color: var(--error-color);
}

.order-form select,
.order-form input[type="text"],
.order-form input[type="tel"],
.order-form input[type="email"],
.order-form input[type="date"],
.order-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.order-form select:focus,
.order-form input:focus,
.order-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.field-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.3rem;
    font-style: italic;
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.order-form button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.2rem;
    padding: 1.2rem;
}

/* 响应式设计 - 预定表单 */
@media (max-width: 768px) {
    .order-section h2 {
        font-size: 2rem;
    }
    
    .order-form {
        padding: 1.5rem;
    }
    
    .bakery-info,
    .price-info {
        padding: 1rem;
    }
}
