/**
 * ETB Footer XCD - 三段式 Footer 重构
 * 版本: 1.0.0
 * 更新日期: 2026-03-02
 * 
 * 结构:
 * 1. CSS 变量
 * 2. 根容器
 * 3. Top 区（Newsletter + Social）
 * 4. Main 区（4栏内容）
 * 5. Bottom 区（支付 + Legal + 版权）
 * 6. Accordion（移动端）
 * 7. 响应式断点
 */

/* ===========================================
   1. CSS 变量（继承 header-xcd.css）
   =========================================== */
.etb-footer {
  --footer-bg: #1A1A1A;
  --footer-bg-top: #222222;
  --footer-text: #FFFFFF;
  --footer-text-muted: rgba(255, 255, 255, 0.7);
  --footer-border: rgba(255, 255, 255, 0.12);
  --footer-link-hover: #DA2127;
  --footer-accent: #DA2127;
  --footer-max-width: 1440px;
  --footer-padding-x: 24px;
  --footer-section-gap: 48px;
}

/* ===========================================
   2. 根容器
   =========================================== */
.etb-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  width: 100%;
}

.etb-footer *,
.etb-footer *::before,
.etb-footer *::after {
  box-sizing: border-box;
}

.etb-footer a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.etb-footer__container {
  max-width: var(--footer-max-width);
  margin: 0 auto;
  padding: 0 var(--footer-padding-x);
}

/* ===========================================
   3. Top 区（Newsletter + Social）
   =========================================== */
.etb-footer__top {
  background: var(--footer-bg-top);
  padding: 32px 0;
  border-bottom: 1px solid var(--footer-border);
}

.etb-footer__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.etb-footer__newsletter {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.etb-footer__newsletter-text {
  flex-shrink: 0;
}

.etb-footer__newsletter-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.etb-footer__newsletter-desc {
  font-size: 14px;
  color: var(--footer-text-muted);
  margin: 0;
}

.etb-footer__newsletter-form {
  display: flex;
  gap: 0;
}

.etb-footer__newsletter-input {
  width: 260px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--footer-border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--footer-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.etb-footer__newsletter-input::placeholder {
  color: var(--footer-text-muted);
}

.etb-footer__newsletter-input:focus {
  border-color: var(--footer-accent);
  background: rgba(255, 255, 255, 0.12);
}

.etb-footer__newsletter-btn {
  padding: 12px 24px;
  background: var(--footer-accent);
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.etb-footer__social {
  display: flex;
  align-items: center;
  gap: 24px;
}

.etb-footer__social-text {
  flex-shrink: 0;
}

.etb-footer__social-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.etb-footer__social-desc {
  font-size: 14px;
  color: var(--footer-text-muted);
  margin: 0;
}

.etb-footer__social-links {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.etb-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  transition: color 0.2s ease;
}

.etb-footer__social-link .etb-icon {
  width: 24px;
  height: 24px;
}

/* ===========================================
   4. Main 区（4栏内容）
   =========================================== */
.etb-footer__main {
  padding: 48px 0;
}

.etb-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.etb-footer__col {
  min-width: 0;
}

.etb-footer__title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 16px;
  padding-bottom: 12px;
  position: relative;
  color: #fff;
}

.etb-footer__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 3px;
  background: var(--footer-accent);
}

.etb-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.etb-footer__links li {
  margin-bottom: 10px;
}

.etb-footer__links li:last-child {
  margin-bottom: 0;
}

.etb-footer__links a {
  color: var(--footer-text-muted);
  font-size: 14px;
  display: inline-block;
}

.etb-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--footer-text-muted);
  font-size: 14px;
}

.etb-footer__contact-item:last-child {
  margin-bottom: 0;
}

.etb-footer__contact-item .etb-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--footer-accent);
}

.etb-footer__contact-label {
  font-weight: 600;
  color: var(--footer-text);
  margin-right: 4px;
}

.etb-footer__contact-link {
  color: var(--footer-text-muted);
}

/* ===========================================
   4.5 Stores Row
   =========================================== */
.etb-footer__stores-row {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--footer-border);
}

.etb-footer__stores-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 20px;
  padding-bottom: 12px;
  position: relative;
  color: #fff;
}

.etb-footer__stores-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 3px;
  background: var(--footer-accent);
}

.etb-footer__stores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.etb-footer__store {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.etb-footer__store-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--footer-text);
  margin-bottom: 6px;
}

.etb-footer__store-address {
  color: var(--footer-text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.etb-footer__store-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--footer-text);
  transition: background 0.2s ease;
}

.etb-footer__store-btn .etb-icon {
  width: 14px;
  height: 14px;
}

/* ===========================================
   5. Bottom 区（支付 + Legal + 版权）
   =========================================== */
.etb-footer__bottom {
  padding: 24px 0;
  border-top: 1px solid var(--footer-border);
}

.etb-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.etb-footer__payments {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 40px;
}

.etb-footer__payments .list-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.etb-footer__payments .payment-icon-container {
  padding: 6px 8px;
  background: #EFEFEF;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.etb-footer__payments .payment-icon {
  width: 50px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.etb-footer__legal {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.etb-footer__legal-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.etb-footer__legal-links a {
  color: var(--footer-text-muted);
  font-size: 13px;
}

.etb-footer__copyright {
  color: var(--footer-text-muted);
  font-size: 13px;
  text-align: right;
}

.etb-footer__copyright p {
  margin: 0;
}

.etb-footer__abn {
  margin-top: 4px;
}

/* ===========================================
   6. Accordion（移动端专用）
   =========================================== */
.etb-footer__acc-toggle {
  display: none;
}

.etb-footer__acc-body {
  display: block;
}

/* ===========================================
   7. 响应式断点
   =========================================== */

/* Tablet: 768px - 991px */
@media (max-width: 991px) {
  .etb-footer {
    --footer-padding-x: 20px;
  }

  .etb-footer__top-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .etb-footer__newsletter,
  .etb-footer__social {
    width: 100%;
  }

  .etb-footer__newsletter-form {
    flex: 1;
    max-width: 400px;
  }

  .etb-footer__newsletter-input {
    flex: 1;
    width: auto;
  }

  .etb-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }

  .etb-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .etb-footer__copyright {
    text-align: left;
  }

  .etb-footer__stores-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
  .etb-footer {
    --footer-padding-x: 16px;
  }

  .etb-footer__top {
    padding: 24px 0;
  }

  .etb-footer__newsletter {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .etb-footer__newsletter-form {
    width: 100%;
    max-width: none;
  }

  .etb-footer__newsletter-input {
    width: 100%;
    flex: 1;
    font-size: 16px;
  }

  .etb-footer__social {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .etb-footer__main {
    padding: 0;
  }

  .etb-footer__grid {
    display: block;
  }

  .etb-footer__col {
    border-bottom: 1px solid var(--footer-border);
  }

  .etb-footer__col:last-child {
    border-bottom: none;
  }

  .etb-footer__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin: 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .etb-footer__title::after {
    display: none;
  }

  .etb-footer__acc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
  }

  .etb-footer__acc-toggle .etb-icon {
    width: 20px;
    height: 20px;
    color: var(--footer-text-muted);
  }

  .etb-footer__col.is-open .etb-footer__acc-toggle {
    transform: rotate(180deg);
  }

  .etb-footer__acc-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
    padding: 0 0;
  }

  .etb-footer__col.is-open .etb-footer__acc-body {
    opacity: 1;
    padding: 0 0 16px;
  }

  .etb-footer__links li {
    margin-bottom: 12px;
  }

  .etb-footer__contact-item {
    margin-bottom: 14px;
  }

  .etb-footer__stores-row {
    margin-top: 0;
    padding-top: 24px;
    border-top: none;
  }

  .etb-footer__stores-title {
    margin-bottom: 16px;
  }

  .etb-footer__stores-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .etb-footer__store {
    padding: 14px;
  }

  .etb-footer__bottom {
    padding: 20px 0;
  }

  .etb-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .etb-footer__legal-links {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .etb-footer__payments {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ===========================================
   8. PC 端 Hover 效果（仅 PC）
   =========================================== */
@media (hover: hover) and (pointer: fine) {
  .etb-footer a:hover {
    color: var(--footer-link-hover);
  }

  .etb-footer__newsletter-btn:hover {
    background: #B01820;
  }

  .etb-footer__social-link:hover {
    color: var(--footer-accent);
  }

  .etb-footer__links a:hover {
    color: var(--footer-text);
    transform: translateX(2px);
  }

  .etb-footer__contact-link:hover {
    color: var(--footer-text);
  }

  .etb-footer__store-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .etb-footer__legal-links a:hover {
    color: var(--footer-text);
  }
}

/* ===========================================
   9. 辅助样式
   =========================================== */
.etb-footer .etb-icon {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
}

.etb-footer .etb-icon--spin {
  animation: etb-spin 1s linear infinite;
}

@keyframes etb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.etb-footer .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
