/* ══════════════════════════════════════
   EC Shop — front-footer.css
   靜態樣式，動態色值由 PHP inline :root 提供
   ══════════════════════════════════════ */

/* ── Footer 主體 ── */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 24px;
    margin-top: 60px;
    font-size: var(--footer-font-base);
}

/* ── Newsletter ── */
.footer-newsletter {
    background: var(--newsletter-bg);
    color: var(--newsletter-text);
    padding: 40px 48px;
    border-radius: var(--footer-radius);
    margin-top: 0;
    margin-bottom: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
    position: relative;
    overflow: hidden;
}
.footer-newsletter::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
    border-radius: 50%;
}
.fn-content { display: flex; align-items: center; gap: 20px; position: relative; }
.fn-icon { font-size: 40px; }
.fn-text h3 { color: inherit; font-size: var(--newsletter-title-size); font-weight: 800; margin-bottom: 4px; }
.fn-text p { color: inherit; opacity: .85; font-size: var(--newsletter-desc-size); }
.fn-right { position: relative; flex-shrink: 0; }
.fn-form { display: flex; gap: 8px; position: relative; }
.fn-form input {
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,.25);
    border-radius: 50px;
    background: var(--newsletter-input-bg);
    color: var(--newsletter-text);
    font-size: var(--newsletter-desc-size);
    width: 300px;
    font-family: inherit;
    transition: all .25s;
}
.fn-form input::placeholder { color: rgba(255,255,255,.5); }
.fn-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,.2); }
.fn-form button {
    padding: 14px 32px;
    background: var(--newsletter-btn-bg);
    color: var(--newsletter-btn-text);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--newsletter-desc-size);
    cursor: pointer;
    transition: all .25s;
    font-family: inherit;
    white-space: nowrap;
}
.fn-form button:hover { background: var(--newsletter-btn-hover-bg); transform: scale(1.02); }
.fn-form button:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.fn-msg {
    margin-top: 10px; font-size: var(--footer-body-size); font-weight: 600;
    text-align: center; border-radius: 8px; padding: 0;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: all .35s ease;
}
.fn-msg.fn-msg-show { padding: 8px 16px; max-height: 60px; opacity: 1; }
.fn-msg.fn-msg-ok  { background: rgba(255,255,255,.18); color: #fff; }
.fn-msg.fn-msg-err { background: rgba(255,80,80,.2); color: #ffd0d0; }

/* ── Footer Grid（動態欄數） ── */
.footer-grid {
    display: grid;
    grid-template-columns: var(--footer-grid-cols);
    gap: 48px;
    margin-bottom: 40px;
}
.footer-logo { height: 36px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .9; }
.footer-brand { color: var(--footer-link-hover); font-size: var(--footer-brand-size); font-weight: 800; margin-bottom: 12px; }

/* ── 欄目標題（各自獨立顏色） ── */
.footer-grid h3 {
    font-size: var(--footer-heading-size);
    margin-bottom: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #fff;
}
.footer-col-guide h3   { color: var(--footer-guide-title); }
.footer-col-service h3 { color: var(--footer-service-title); }
.footer-col-account h3 { color: var(--footer-account-title); }

.footer-about p { font-size: var(--footer-body-size); line-height: 1.8; margin-bottom: 16px; }
.footer-contact { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.footer-contact a { color: var(--footer-text); font-size: var(--footer-body-size); display: flex; align-items: center; gap: 8px; transition: color .25s; }
.footer-contact a:hover { color: var(--footer-link-hover); }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.social-icon {
    width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center;
    color: var(--footer-text); transition: all .25s;
}
.social-icon:hover { transform: translateY(-3px); }
.social-facebook:hover  { background: #1877f2; color: #fff; }
.social-instagram:hover { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.social-threads:hover   { background: #000; color: #fff; }
.social-youtube:hover   { background: #ff0000; color: #fff; }
.social-tiktok:hover    { background: #010101; color: #fff; }
.social-line:hover      { background: #00c300; color: #fff; }
.social-telegram:hover  { background: #0088cc; color: #fff; }
.social-whatsapp:hover  { background: #25d366; color: #fff; }

/* ── 3 欄連結（統一讀取設定） ── */
.footer-grid > div:not(.footer-about) a {
    color: var(--footer-link);
    display: block;
    padding: 6px 0;
    font-size: var(--footer-body-size);
    transition: all .25s;
    position: relative;
}
.footer-grid > div:not(.footer-about) a:hover {
    color: var(--footer-link-hover);
    padding-left: 6px;
}

/* ── 付款方式 ── */
.footer-payments-section {
    border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 20px 0; margin-bottom: 24px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.pay-label { font-size: var(--footer-small-size); font-weight: 600; color: var(--footer-muted); text-transform: uppercase; letter-spacing: .5px; }
.pay-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-icon-item {
    background: rgba(255,255,255,.06); padding: 6px 14px; border-radius: 6px;
    font-size: var(--footer-small-size); font-weight: 600; color: var(--footer-text);
    display: flex; align-items: center; justify-content: center;
    min-height: 32px; transition: all .25s;
}
.pay-icon-item:hover { background: rgba(255,255,255,.12); }
.pay-icon-item img { height: 20px; object-fit: contain; }

/* ── Footer 自訂文字（需求 6） ── */
.footer-custom-text {
    padding: 16px 0;
    margin-bottom: 24px;
    font-size: var(--footer-body-size);
    color: var(--footer-custom-text-color);
    line-height: 1.7;
}

/* ── Footer Bottom ── */
.footer-bottom {
    padding-top: 20px; display: flex; justify-content: space-between;
    align-items: center; font-size: var(--footer-small-size); flex-wrap: wrap; gap: 8px;
}
.footer-address { font-size: var(--footer-tiny-size); color: var(--footer-muted); }

/* ── Back to Top ── */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 44px; height: 44px; border-radius: 50%;
    background: #ffffff; color: var(--text, #1e293b); border: 1px solid #e2e8f0;
    cursor: pointer; z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    opacity: 0; transform: translateY(20px);
    transition: all .3s ease; display: flex;
    align-items: center; justify-content: center;
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { color: #fff; transform: translateY(-2px); }

/* ── RWD ── */
@media (max-width: 768px) {
    .footer-newsletter {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        margin-top: 0;
        margin-bottom: 40px;
    }
    .fn-content { flex-direction: column; gap: 8px; }
    .fn-right { width: 100%; }
    .fn-form { flex-direction: column; width: 100%; }
    .fn-form input { width: 100%; }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 28px 24px;
        align-items: flex-start;
    }
    .footer-about { grid-column: 1 / -1; }
    /* footer-col-guide / service / account 的 grid-column
       由 PHP inline <style> 控制，因為要睇邊欄有開 */

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}