/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
    line-height: 1.6;
    color: #5D4E37;
    background-color: #F5F2EA;
}

/* 確保所有標題和文字元素都使用標楷體 */
h1, h2, h3, h4, h5, h6, p, div, span, a, button, input, select, textarea, label {
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.navbar {
    background-color: #F2ECE0;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(139, 115, 85, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Logo 容器 */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 45px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #D4C4A8;
    box-shadow: 0 2px 8px rgba(212, 196, 168, 0.4);
}

.logo-text {
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
    font-size: 1.8rem;
    font-weight: 700;
    color: #8B7355;
    margin: 0;
    letter-spacing: 1.5px;
}

/* 漢堡選單按鈕 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #8B7355;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 漢堡選單動畫 */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 導航選單包裝器 */
.nav-menu-wrapper {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #8B7355;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #D4C4A8;
}

/* 導航欄下拉選單 */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: #8B7355;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle:hover {
    color: #D4C4A8;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #F2ECE0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    min-width: 200px;
    max-width: 300px;
    max-height: 400px; /* 限制最大高度 */
    overflow-y: auto; /* 加入垂直捲軸 */
    overflow-x: hidden; /* 隱藏水平捲軸 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    margin-top: 0.5rem;
    /* 捲軸樣式 */
    scrollbar-width: thin;
    scrollbar-color: #8B7355 #F2ECE0;
}

/* Webkit 瀏覽器的捲軸樣式 */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(139, 115, 85, 0.1);
    border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #8B7355;
    border-radius: 4px;
    opacity: 0.7;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #6F5A42;
    opacity: 1;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #8B7355;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: rgba(139, 115, 85, 0.15);
    color: #6F5A42;
    transform: translateX(2px);
}

.dropdown-item.loading {
    color: #8B7355;
    cursor: default;
}

/* 日期選項樣式 */
.date-option {
    text-align: left;
}

.date-text {
    font-size: 0.9rem;
    color: #8B7355;
    margin-bottom: 2px;
}

.delivery-status {
    font-size: 0.75rem;
    color: #dc3545;
    font-weight: 500;
    line-height: 1.2;
}
.dropdown-item.loading:hover {
    background-color: transparent;
}


/* Products Section */
.products-section {
    padding: 80px 0;
    background-color: white;
}

.products-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #8B7355;
}

.date-selector {
    text-align: center;
    margin-bottom: 2rem;
    display: none; /* 隱藏日期選擇器，統一從導航欄選擇日期 */
}

.date-selector label {
    font-size: 1.1rem;
    margin-right: 10px;
    color: #8B7355;
}

.date-selector input {
    padding: 8px 15px;
    border: 2px solid #8B7355;
    border-radius: 5px;
    font-size: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 當只有載入動畫時，確保完全置中 */
.products-grid .loading-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 無產品訊息置中 */
.products-grid .no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: #8B7355;
}

.no-products-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #8B7355;
}

.no-products-message p {
    font-size: 1.1rem;
    color: #5D4E37;
    opacity: 0.8;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #F5F2EA, #E8E0D0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #8B7355;
    overflow: hidden;
    position: relative;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    background: #F5F2EA;
}

.product-img:hover {
    transform: scale(1.05);
}

.product-image-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #F5F2EA, #E8E0D0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #8B7355;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #8B7355;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    white-space: pre-line;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #A0845C;
    margin-bottom: 0.5rem;
    min-height: 1.8rem;
    display: flex;
    align-items: center;
}

.product-stock {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    min-height: 1.5rem;
    display: flex;
    align-items: center;
}

.stock-available {
    color: #28a745;
}

.stock-low {
    color: #ffc107;
}

.stock-out {
    color: #dc3545;
}

.add-to-order-btn {
    background-color: #F5F2EA;
    color: #8B7335;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.add-to-order-btn:hover {
    background-color: #E8E0D0;
    color: #5D4E37;
}

.add-to-order-btn:disabled {
    background-color: #F5F2EA;
    color: #8B7335;
    cursor: not-allowed;
}

/* 尺寸選擇器樣式 */
.size-selector {
    margin: 1rem 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

.size-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #8B7355;
    font-size: 0.9rem;
}

.size-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #D4C4A8;
    border-radius: 5px;
    background-color: white;
    color: #5D4E37;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.size-selector select:focus {
    outline: none;
    border-color: #8B7355;
}

.size-selector select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 產品類型資訊顯示 */
.product-type-info {
    margin: 1rem 0;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 80px;
}

.type-label {
    font-weight: bold;
    color: #8B7355;
    font-size: 0.9rem;
}

.type-value {
    color: #5D4E37;
    font-size: 0.9rem;
    background-color: #F5F2EA;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    border: 1px solid #D4C4A8;
    display: inline-block;
}

/* 購物流程 Section */
.how-to-order-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #F5F2EA 0%, #E8E0D0 100%);
}

.how-to-order-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #8B7355;
    font-weight: bold;
}

/* 流程設計 */
.process-flow {
    margin-bottom: 4rem;
}

.flow-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.flow-step {
    flex: 1;
    text-align: center;
    padding: 0 10px;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B7355, #6F5A42);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 1rem;
    font-size: 0.9rem;
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    padding: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon.shopping-cart {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.step-icon.confirm-order {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.step-icon.member-login {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.step-icon.order-confirm {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
}

.step-icon.complete-order {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.step-icon.shipping {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
}

.step-icon.receive-goods {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.step-icon svg {
    width: 30px;
    height: 30px;
}

.flow-step h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #8B7355;
    margin-bottom: 0.5rem;
}

.flow-step p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #5D4E37;
}

.highlight-text {
    color: #e67e22;
    font-weight: bold;
}

.flow-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #bdc3c7;
    margin: 0 10px;
    margin-top: 50px;
}

.flow-arrow-reverse {
    transform: scaleX(-1);
}

/* Order Section */
.order-section {
    padding: 80px 0;
    background-color: #F5F2EA;
}

.order-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #8B7355;
}

.order-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #8B7355;
    display: flex;
    align-items: center;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[readonly],
.form-group input[disabled] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.form-group input[disabled]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.form-group label small {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Address Selectors */
.address-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.detail-address {
    margin-top: 10px;
}

.address-selectors select {
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B7355;
}

.order-items {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    color: #8B7355;
}

.item-price {
    color: #A0845C;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background-color: #8B7355;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: #6F5A42;
}

.quantity-display {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-item:hover {
    background-color: #c82333;
}

.total-amount {
    text-align: right;
    font-size: 1.2rem;
    color: #8B7355;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #D4C4A8;
}

.submit-button {
    background-color: #F5F2EA;
    color: #8B7335;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #F5F2EA;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: white;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #8B7355;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    color: #666;
}

.about-content p.registration-info {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #999;
    margin-top: 2rem;
}

/* Footer */
footer {
    background-color: #F2ECE0;
    color: #8B7355;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid rgba(139, 115, 85, 1);
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 115, 85, 0.6);
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
    color: #8B7355;
}

.social-icon-img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1); /* 將圖片轉為白色 */
}

/* Loading Animation */
.loading {
    text-align: center;
    font-size: 1.2rem;
    color: #8B7355;
    padding: 2rem;
}

/* Enhanced Loading Animation */
.loading-container {
    padding: 3rem 2rem;
    min-height: 200px;
    text-align: center;
}

.loading-animation {
    text-align: center;
    max-width: 300px;
}

/* Cake Loader */
.cake-loader {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    animation: bounceLoader 2s ease-in-out infinite;
}

.cake-layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    animation: stackLayers 3s ease-in-out infinite;
}

.layer-1 {
    bottom: 0;
    width: 80px;
    height: 25px;
    background: linear-gradient(45deg, #D4C4A8, #C4B398);
    animation-delay: 0s;
}

.layer-2 {
    bottom: 20px;
    width: 65px;
    height: 22px;
    background: linear-gradient(45deg, #E8E0D0, #D4C4A8);
    animation-delay: 0.5s;
}

.layer-3 {
    bottom: 37px;
    width: 50px;
    height: 20px;
    background: linear-gradient(45deg, #F5F2EA, #E8E0D0);
    animation-delay: 1s;
}

.cake-topping {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

/* Loading Text */
.loading-text {
    font-size: 1.1rem;
    color: #8B7355;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: fadeText 2s ease-in-out infinite;
}

/* Progress Bar */
.loading-progress {
    width: 200px;
    height: 4px;
    background-color: #E8E0D0;
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #8B7355, #A0845C, #8B7355);
    border-radius: 2px;
    animation: progressFill 3s ease-out infinite;
}

/* Keyframe Animations */
@keyframes bounceLoader {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes stackLayers {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) scale(1.2) rotate(180deg);
    }
}

@keyframes fadeText {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
        opacity: 0.8;
    }
    70% {
        width: 85%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0.9;
    }
}

/* 桌面版本保持 hover 效果，但排除觸控設備 */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* 顯示漢堡選單按鈕 */
    .hamburger-menu {
        display: flex;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    /* 隱藏原本的導航選單包裝器 */
    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #F2ECE0;
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .nav-menu-wrapper.active {
        transform: translateX(0);
    }

    .nav-menu {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        font-weight: 600;
        color: #8B7355;
        text-decoration: none;
        padding: 1rem;
        display: block;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        color: #D4C4A8;
        transform: scale(1.1);
    }

    .logo-container {
        gap: 8px;
    }

    .logo-image {
        height: 35px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 1rem;
        align-items: center;
        justify-content: center;
    }

    /* 手機版下拉選單 */
    .nav-dropdown {
        position: relative;
        touch-action: manipulation;
    }

    .dropdown-toggle {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        touch-action: manipulation;
    }

    .dropdown-menu {
        position: static;
        background-color: transparent;
        border: none;
        border-radius: 8px;
        margin: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transition: opacity 0.2s ease, visibility 0.2s ease, max-height 0.3s ease, transform 0.2s ease;
    }

    .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        max-height: 60vh;
        padding: 0.5rem 0;
        margin-top: 1rem;
        background-color: #F2ECE0;
        border: 1px solid #D4C4A8;
        border-radius: 8px;
        transform: translateY(0);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #8B7355 #F2ECE0;
    }

    .dropdown-item {
        display: block;
        padding: 0.8rem 1.5rem;
        color: #8B7335;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        background: none;
        width: 100%;
        text-align: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* 手機版日期選項樣式 */
    .dropdown-item .date-option {
        text-align: center;
    }
    
    .dropdown-item .date-text {
        font-size: 1rem;
        color: #8B7335;
        margin-bottom: 4px;
    }
    
    .dropdown-item .delivery-status {
        font-size: 0.8rem;
        color: #dc3545;
        font-weight: 500;
        line-height: 1.2;
    }

    .dropdown-item:hover {
        background-color: rgba(139, 115, 85, 0.2);
        color: #6F5A42;
        transform: scale(1.02);
    }

    .dropdown-item:active {
        background-color: rgba(139, 115, 85, 0.3);
        transform: scale(0.98);
    }

    /* 自定義滾動條樣式 */
    .dropdown-menu.show::-webkit-scrollbar {
        width: 6px;
    }

    .dropdown-menu.show::-webkit-scrollbar-track {
        background: rgba(139, 115, 85, 0.1);
        border-radius: 3px;
    }

    .dropdown-menu.show::-webkit-scrollbar-thumb {
        background: #8B7355;
        border-radius: 3px;
        opacity: 0.7;
    }

    .dropdown-menu.show::-webkit-scrollbar-thumb:hover {
        background: #6F5A42;
        opacity: 1;
    }

    .dropdown-toggle {
        position: relative;
    }

    .dropdown-toggle::after {
        content: '▼';
        font-size: 0.8rem;
        margin-left: 0.5rem;
        transition: transform 0.3s ease;
    }

    .nav-dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .social-link {
        margin-left: 0;
    }


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

    .order-form-container {
        padding: 1rem;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .quantity-controls {
        align-self: flex-end;
    }

    /* 購物流程響應式 */
    .how-to-order-section h2 {
        font-size: 2rem;
    }

    .flow-row {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .flow-step {
        max-width: 280px;
        padding: 0;
    }

    .flow-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .flow-arrow-reverse {
        transform: rotate(90deg);
    }

    .step-icon {
        width: 50px;
        height: 50px;
        padding: 12px;
    }

    .step-icon svg {
        width: 24px;
        height: 24px;
    }

    .flow-step h3 {
        font-size: 1rem;
    }

    .flow-step p {
        font-size: 0.8rem;
    }

    /* 地址選擇器響應式 */
    .address-selectors {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Footer 響應式 */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .product-description {
    white-space: pre-line;
    line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }


    .products-section h2,
    .order-section h2,
    .about-section h2 {
        font-size: 2rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.hidden {
    display: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* 日期切換通知樣式 */
.date-change-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem 2rem;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-size: 1rem;
    font-weight: 500;
    animation: slideInNotification 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 浮動購物車按鈕 */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #F2ECE0, #F2ECE0);
    border-radius: 50%;
    display: none; /* 初始隱藏 */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 115, 85, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 115, 85, 0.6);
}

.cart-icon {
    font-size: 24px;
    color: white;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* 加入購物車通知 */
.add-to-cart-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #28a745;
    z-index: 10000;
    transition: all 0.3s ease;
}

.add-to-cart-notification.show {
    right: 20px;
}

.add-to-cart-notification .notification-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.add-to-cart-notification .notification-icon {
    width: 40px;
    height: 40px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.add-to-cart-notification .notification-text {
    flex: 1;
}

.add-to-cart-notification .notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.3;
}

.add-to-cart-notification .notification-subtitle {
    color: #28a745;
    font-size: 13px;
    font-weight: 500;
}

/* 手機版響應式調整 */
@media (max-width: 768px) {
    .floating-cart {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .cart-icon {
        font-size: 20px;
    }

    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }

    .add-to-cart-notification {
        width: calc(100vw - 30px);
        right: -100vw;
        top: 80px;
    }

    .add-to-cart-notification.show {
        right: 15px;
    }

    .add-to-cart-notification .notification-content {
        padding: 12px;
        gap: 10px;
    }

    .add-to-cart-notification .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* 條款確認勾選框樣式 */
.terms-agreement {
    margin-top: 1rem;
}

.terms-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.terms-text input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #8B7355;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-content {
    flex: 1;
}

.ig-link {
    color: #8B7355;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.ig-link:hover {
    color: #6F5A42;
    text-decoration: underline;
}

.warning-text {
    color: #dc3545;
    font-weight: 600;
}

/* 重新載入按鈕樣式 */
.retry-button {
    background-color: #8B7355;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
    font-size: 1rem;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background-color: #6d5a3f;
}

/* 成功Modal樣式 */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
}

.success-modal.show {
    opacity: 1;
}

.success-modal.hiding {
    opacity: 0;
}

.modal-content {
    background: #F5F2EA;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(139, 115, 85, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.success-modal.show .modal-content {
    transform: scale(1);
}

/* 成功標題區域 */
.success-header {
    text-align: center;
    margin-bottom: 32px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.success-header h2 {
    font-size: 2rem;
    color: #8B7355;
    margin: 0 0 8px 0;
    font-weight: bold;
}

.success-subtitle {
    color: #6F5A42;
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

/* 訂單摘要區域 */
.order-summary-section {
    margin-bottom: 32px;
    padding: 24px;
    background: #FAFAF8;
    border-radius: 16px;
    border: 1px solid #E8E4D9;
}

.order-summary-section h3 {
    color: #8B7355;
    font-size: 1.3rem;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #E0DDD4;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    margin: 0;
    color: #5D4E37;
}

/* 下一步區域 */
.next-steps {
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #FFF9E6 0%, #F9F4E8 100%);
    border-radius: 16px;
    border: 2px solid #F0E68C;
}

.next-steps h3 {
    color: #B8860B;
    font-size: 1.3rem;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E8E4D9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.15);
}

.primary-step {
    border: 2px solid #8B7355;
    background: linear-gradient(135deg, #FFF 0%, #F8F6F0 100%);
}

.step-number {
    background: #8B7355;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: #8B7355;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.step-desc {
    color: #6F5A42;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 4px 0 12px 0;
}

.highlight {
    background: #FFE4B5;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #8B4513;
}

/* IG按鈕 */
.ig-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #8B7355 0%, #6F5A42 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
}

.ig-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 115, 85, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #6F5A42 0%, #5D4E37 100%);
}

/* IG提醒 */
.ig-reminder {
    background: #FFE4B5;
    color: #8B4513;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 行動按鈕組 */
.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

.primary-btn, .secondary-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
}

.primary-btn {
    background: linear-gradient(135deg, #8B7355 0%, #6F5A42 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 115, 85, 0.4);
}

.secondary-btn {
    background: #F5F2EA;
    color: #8B7355;
    border: 2px solid #8B7355;
}

.secondary-btn:hover {
    background: #8B7355;
    color: white;
    transform: translateY(-2px);
}

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

/* 關閉按鈕 */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #8B7355;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(139, 115, 85, 0.1);
    transform: rotate(90deg);
}

/* 快速通知 */
.quick-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #8B7355;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
}

.quick-notification.show {
    transform: translateX(0);
}

/* 手機版優化 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 24px 20px;
        max-height: 90vh;
        border-radius: 16px;
    }

    .success-header h2 {
        font-size: 1.6rem;
    }

    .success-icon {
        font-size: 3rem;
    }

    .step-list {
        gap: 16px;
    }

    .step {
        padding: 12px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 12px;
    }

    .primary-btn, .secondary-btn {
        padding: 16px 20px;
        font-size: 1.1rem;
    }

    .order-content {
        font-size: 13px;
        padding: 16px;
    }

    .quick-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        text-align: center;
    }

    .quick-notification.show {
        transform: translateY(0);
    }
}

/* 手機版條款確認樣式調整 */
@media (max-width: 768px) {
    .terms-agreement {
        margin-top: 0.8rem;
    }

    .terms-text {
        font-size: 13px;
        gap: 10px;
        padding: 12px 16px;
    }
}

/* 優惠碼相關樣式 */
.promo-code-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.promo-code-wrapper input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #D4C4A8;
    border-radius: 4px;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
    background-color: #FEFEFE;
}

.apply-promo-btn {
    background: linear-gradient(135deg, #8B7355 0%, #6F5A42 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: DFKai-sb, '標楷體', 'BiauKai', 'serif';
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.apply-promo-btn:hover {
    background: linear-gradient(135deg, #6F5A42 0%, #5D4E37 100%);
    transform: translateY(-1px);
}

.apply-promo-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.promo-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    min-height: 20px;
}

.promo-message.success {
    background-color: #D4F4DD;
    color: #2F7D32;
    border: 1px solid #81C784;
}

.promo-message.error {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #E57373;
}

.original-amount {
    color: #999;
    font-size: 0.9rem;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.discount-amount {
    color: #2F7D32;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 8px;
}

/* 手機版表單樣式修正 */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* 防止iOS縮放 */
        padding: 12px 10px; /* 稍微增加垂直內邊距以改善觸控體驗 */
    }

    /* 特別針對日期輸入框的樣式修正 */
    input[type="date"] {
        -webkit-appearance: none;
        -moz-appearance: textfield;
        appearance: none;
        background-color: #fff;
        border: 2px solid #ddd;
        border-radius: 5px;
        padding: 12px 10px;
        font-size: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .order-form-container {
        padding: 1.5rem;
        margin: 0 10px;
    }

    .address-selectors {
        grid-template-columns: 1fr;
    }
}

/* 手機版優惠碼樣式 */
@media (max-width: 768px) {
    .promo-code-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .apply-promo-btn {
        width: 100%;
        padding: 10px 16px;
    }
}