/**
 * ECShop Footer 頁腳樣式
 * footer.css
 * 
 * 檔案說明：
 * 此檔案專門處理 ECShop 電商系統的頁腳區域設計，包含服務說明、
 * 聯絡資訊、店面資訊、導航連結、版權聲明等完整的頁腳內容佈局。
 * 採用響應式設計，在不同設備上提供最佳的視覺體驗。
 * 
 * 主要功能：
 * - 服務說明卡片區域（服務特色展示）
 * - 聯絡我們區域（多店面資訊顯示）
 * - 動態導航連結（多欄位分類導航）
 * - 版權聲明與法律顧問資訊
 * - ICP備案資訊顯示
 * - 店面詳細資訊（電話、地址、營業時間等）
 * 
 * 設計特色：
 * - 統一的卡片設計語言
 * - 漸層背景與陰影效果
 * - Hover 互動動畫
 * - 響應式網格佈局
 * - 行動裝置優化顯示
 * 
 * 內容組織：
 * - 服務信息區：突出企業服務特色
 * - 聯絡信息區：多店面完整聯絡方式
 * - 導航連結區：網站重要頁面導航
 * - 法律信息區：版權與合規資訊
 * 
 * 響應式設計：
 * - 桌面版：多欄佈局，完整資訊顯示
 * - 平板版：適度調整欄位數量
 * - 手機版：單欄佈局，簡化資訊顯示
 * - 超小螢幕：極簡化設計
 * 
 * 技術亮點：
 * - CSS Grid 現代佈局
 * - Flexbox 彈性排版
 * - CSS 變數統一管理
 * - 動畫效果漸進增強
 * - IE11 向下兼容
 * 
 * 商務功能：
 * - 多店面資訊管理
 * - LINE官方帳號整合
 * - 電話點擊撥號功能
 * - 地址定位連結
 * - 營業時間顯示
 * 
 * 法律合規：
 * - 版權聲明標準格式
 * - ICP備案號顯示
 * - 法律顧問資訊
 * - 企業登記資訊
 * 
 * 無障礙設計：
 * - 語義化HTML結構支援
 * - 鍵盤導航友善
 * - 螢幕閱讀器相容
 * - 高對比度模式支援
 * 
 * 適用版本：PHP 7.3+ / ECShop 4.x / cls_template
 * 版本：1.0
 * 更新：2024
 */

/* ==========================================================================
   Footer 頁腳設計
   ========================================================================== */

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

#footer {
    background: #ffffff; /* IE fallback */
    background: var(--background);
    color: #2c3e50;
    position: relative;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 20px rgba(44, 62, 80, 0.05);
}

.footer-content {
    padding: 80px 0 60px;
}

/* 統一標題樣式 */
.section-title,
.service-info-title,
.contact-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after,
.service-info-title::after,
.contact-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #8b7355, #a08654); /* IE fallback */
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-hover));
    border-radius: 2px;
}

/* 服務說明和聯絡我們區域 */
.service-info-section,
.contact-section {
    margin-bottom: 80px;
}

.service-cards-grid,
.contact-stores-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (minmax(280px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    place-items: center;
}

.contact-stores-grid {
    -ms-grid-columns: (minmax(320px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    max-width: 1200px;
}

/* 卡片樣式 */
.service-card,
.store-card {
    padding: 40px 30px;
    text-align: center;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.store-card {
    padding: 40px 35px;
}

.service-card-icon {
    font-size: 42px;
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    margin-bottom: 25px;
    display: block;
}

.service-card-title,
.store-name {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 18px;
}

.store-name {
    font-size: 22px;
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    margin-bottom: 25px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 12px;
}

.store-name i {
    font-size: 24px;
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
}

.service-card-text {
    font-size: 15px;
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 店面資訊樣式 */
.store-info-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
    width: 100%;
}

.store-info-icon {
    font-size: 18px;
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    margin-top: 3px;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex-shrink: 0;
}

.store-info-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    text-align: left;
}

.store-phones {
    margin-bottom: 18px;
}

.phone-group {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.phone-group:first-child .store-info-icon {
    margin-top: 3px;
}

.phone-group:not(:first-child) {
    padding-left: 30px;
}

.phone-numbers {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
}

.phone-link {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.phone-link:hover {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
}

.business-hours {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 5px;
}

.break-time {
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    font-size: 13px;
}

.store-address {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
}

.manager-info {
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 8px;
}

.line-link {
    color: #00C300;
    font-weight: 600;
    transition: color 0.3s ease;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
}

.line-link:hover {
    color: #009900;
}

.line-icon {
    color: #00C300;
}

.store-notice {
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 13px;
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
}

.legal-advisors {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(139, 115, 85, 0.2);
}

.legal-advisors p {
    margin: 0;
    padding: 8px 0;
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

/* 手機版混合網格 */
.mobile-combined-grid {
    display: none;
}

/* 動態內容區域 */
.footer-links {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (minmax(200px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    border-top: 1px solid #e2e8f0;
    padding-top: 60px;
    margin-bottom: 50px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.footer-column {
    background: #ffffff; /* IE fallback */
    background: var(--background);
}

.footer-section {
    width: 100%;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
    padding-left: 20px;
}

.footer-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 5px;
    height: 25px;
    background: linear-gradient(180deg, #8b7355, #a08654); /* IE fallback */
    background: linear-gradient(180deg, var(--secondary-color), var(--secondary-hover));
    border-radius: 3px;
}

.footer-title i {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    margin-right: 10px;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-item {
    margin-bottom: 15px;
}

.footer-link {
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    font-size: 15px;
    transition: all 0.3s ease; /* IE fallback */
    transition: var(--transition);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.footer-link:hover {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    padding-left: 10px;
}

.footer-link i {
    font-size: 12px;
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    opacity: 0.7;
}

.footer-link:hover i {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
}

/* 底部卡片區域 */
.footer-bottom {
    background: linear-gradient(135deg, #f8fafb 0%, #edf2f7 100%);
    border-top: 1px solid #e2e8f0;
    padding: 60px 0 40px;
}

.footer-bottom-cards {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-card {
    padding: 50px 40px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 12px 35px rgba(44, 62, 80, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.footer-card::before {
    height: 5px;
}

.footer-card-full {
    text-align: center;
}

.card-title {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 15px;
}

.card-title i {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    font-size: 26px;
}

/* 版權聲明樣式 */
.copyright-wrapper {
    text-align: center;
    padding: 30px 0;
}

.copyright-text {
    color: #64748b; /* IE fallback */
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 15px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
}

.copyright-text i {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    font-size: 18px;
}

.icp-info {
    margin-top: 15px;
}

.icp-link {
    color: #7f8c8d;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(139, 115, 85, 0.1);
    display: inline-block;
}

.icp-link:hover {
    color: #8b7355; /* IE fallback */
    color: var(--secondary-color);
    background: rgba(139, 115, 85, 0.2);
}

/* ==========================================================================
   響應式設計
   ========================================================================== */

/* 中型平板 (769px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 25px;
    }

    .service-cards-grid,
    .contact-stores-grid {
        -ms-grid-columns: 1fr 30px 1fr;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: 800px;
    }

    .store-card {
        padding: 35px 30px;
        max-width: none;
    }

    .footer-links {
        -ms-grid-columns: 1fr 35px 1fr;
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }

    .footer-bottom-cards {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
}

/* 手機版和小平板 (768px以下) */
@media (max-width: 768px) {
    .container {
        padding: 0;
        max-width: 100%;
    }

    /* Footer調整 */
    #footer {
        padding: 0;
    }

    .footer-content {
        padding: 40px 20px 30px;
    }

    .service-info-section,
    .contact-section {
        margin-bottom: 50px;
    }

    .section-title,
    .service-info-title,
    .contact-title {
        font-size: 28px;
        margin-bottom: 35px;
        padding: 0 20px;
    }

    .section-title::after,
    .service-info-title::after,
    .contact-title::after {
        width: 60px;
        height: 3px;
        bottom: -12px;
    }

    /* 隱藏桌面版，顯示手機版 */
    .service-cards-grid,
    .contact-stores-grid {
        display: none;
    }

    .mobile-combined-grid {
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: (minmax(140px, 1fr))[auto-fit];
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
        margin: 0 20px;
    }

    .mobile-card {
        padding: 20px 15px;
        text-align: center;
        border-radius: 12px; /* IE fallback */
        border-radius: var(--radius-md);
        box-shadow: 0 5px 20px rgba(44, 62, 80, 0.06);
    }

    .mobile-card::before {
        height: 3px;
    }

    .mobile-card:hover {
        -webkit-transform: translateY(-3px);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(44, 62, 80, 0.12);
    }

    .mobile-card-icon {
        font-size: 28px;
        color: #8b7355; /* IE fallback */
        color: var(--secondary-color);
        margin-bottom: 12px;
        display: block;
    }

    .mobile-card-title {
        font-size: 15px;
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 10px;
    }

    .mobile-card-text {
        font-size: 12px;
        color: #64748b; /* IE fallback */
        color: var(--text-secondary);
        line-height: 1.4;
    }

    .mobile-store-card .mobile-card-title {
        color: #8b7355; /* IE fallback */
        color: var(--secondary-color);
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        gap: 6px;
        font-size: 14px;
    }

    .mobile-store-card .mobile-card-icon {
        font-size: 18px;
        margin-bottom: 0;
    }

    .mobile-store-info {
        text-align: left;
        font-size: 11px;
        color: #2c3e50;
        line-height: 1.3;
        margin-top: 8px;
    }

    .mobile-store-info .phone-link {
        color: #2c3e50;
        font-weight: 600;
    }

    .mobile-store-info .phone-link:hover {
        color: #8b7355; /* IE fallback */
        color: var(--secondary-color);
    }

    .mobile-store-info .line-link {
        color: #00C300;
        font-weight: 600;
    }

    .mobile-store-info .line-link:hover {
        color: #009900;
    }
    
    .footer-links {
        -ms-grid-columns: 1fr 15px 1fr;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 50px 20px 40px;
        margin: 0;
        max-width: 100%;
    }

    .footer-title {
        font-size: 16px;
        margin-bottom: 20px;
        padding-left: 15px;
    }

    .footer-title::before {
        width: 3px;
        height: 16px;
    }

    .footer-link {
        font-size: 13px;
        padding: 5px 0;
    }

    .footer-bottom {
        padding: 15px 0;
        margin: 0;
    }

    .footer-bottom .container {
        padding: 0 20px;
    }

    .footer-bottom-cards {
        max-width: 100%;
    }

    .footer-card {
        padding: 15px 12px;
        border-radius: 10px;
        max-width: 100%;
        width: 100%;
    }

    .card-title {
        font-size: 14px;
        margin-bottom: 12px;
        gap: 6px;
    }

    .card-title i {
        font-size: 12px;
    }

    .copyright-text {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }

    .copyright-text i {
        font-size: 11px;
    }

    .icp-link {
        font-size: 10px;
        padding: 4px 8px;
    }

    .legal-advisors {
        margin-top: 10px;
        padding-top: 10px;
    }

    .legal-advisors p {
        font-size: 10px;
        padding: 1px 0;
        line-height: 1.3;
    }

    .footer-column {
        min-height: 150px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .footer-section {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .footer-nav {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
    }
}

/* 小屏手機 (480px以下) */
@media (max-width: 480px) {
    .mobile-combined-grid {
        -ms-grid-columns: 1fr 15px 1fr;
        grid-template-columns: 1fr 1fr;
    }

    .footer-links {
        gap: 20px;
        padding-top: 40px;
        margin-bottom: 35px;
    }

    .footer-title {
        padding-left: 17px;
    }

    .footer-title::before {
        width: 4px;
        height: 18px;
    }

    .footer-link {
        font-size: 14px;
        padding: 6px 0;
    }

    .footer-bottom {
        padding: 40px 0 25px;
    }

    .footer-card {
        padding: 25px 20px;
        border-radius: 12px; /* IE fallback */
        border-radius: var(--radius-md);
    }

    .card-title {
        font-size: 16px;
        margin-bottom: 20px;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 8px;
    }

    .card-title i {
        font-size: 18px;
    }
}

/* 超小屏手機 (360px以下) */
@media (max-width: 360px) {
    .mobile-combined-grid {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }

    .footer-links {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-cards {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }
}

/* IE11 Grid支援 */
@supports not (display: grid) {
    .service-cards-grid,
    .contact-stores-grid {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    .service-card,
    .store-card {
        -webkit-box-flex: 0;
        -ms-flex: 0 1 300px;
        flex: 0 1 300px;
        margin: 20px;
    }
    
    .footer-links {
        display: -ms-flexbox;
        -ms-flex-wrap: wrap;
        -ms-flex-pack: center;
    }
    
    .footer-column {
        -ms-flex: 0 1 200px;
        margin: 25px;
    }
}

/* 動畫效果 */
@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* 應用動畫 - 只在支援設備上應用 */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .store-card,
    .footer-column {
        -webkit-animation: fadeInUp 0.6s ease-out;
        animation: fadeInUp 0.6s ease-out;
    }

    .service-card:nth-child(1) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; }
    .service-card:nth-child(2) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
    .service-card:nth-child(3) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s; }

    .store-card:nth-child(1) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s; }
    .store-card:nth-child(2) { -webkit-animation-delay: 0.5s; animation-delay: 0.5s; }
    .store-card:nth-child(3) { -webkit-animation-delay: 0.6s; animation-delay: 0.6s; }

    .footer-column:nth-child(1) { -webkit-animation-delay: 0.7s; animation-delay: 0.7s; }
    .footer-column:nth-child(2) { -webkit-animation-delay: 0.8s; animation-delay: 0.8s; }
    .footer-column:nth-child(3) { -webkit-animation-delay: 0.9s; animation-delay: 0.9s; }
}

/* 聚焦狀態增強 */
.footer-link:focus {
    outline: 2px solid #3b82f6; /* IE fallback */
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 列印樣式 */
@media print {
    .service-card,
    .store-card,
    .footer-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .footer-content {
        padding: 20px 0 !important;
    }
}