/* ==========================================================
   Panasonic x 樂天市場 原廠授權經銷商 landing page
   Base: mobile first. Desktop: @media (min-width: 768px)
   ========================================================== */

:root {
  --c-blue:       #0060AF;
  --c-blue-dark:  #003C73;
  --c-blue-light: #E8F2FB;
  --c-blue-bg:    #F2F7FC;
  --c-yellow:     #FFE14A;
  --c-gold:       #C99A4B;
  --c-green:      #52C41A;
  --c-text:       #333333;
  --c-text-soft:  #666666;
  --c-border:     #E0E0E0;
  --c-white:      #FFFFFF;
  --c-red:        #D43933;

  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(0, 60, 115, .08);

  --font-base: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--c-text);
  line-height: 1.6;
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Shared section title ---------- */
.section-title {
  font-size: 1.5rem;
  color: var(--c-blue-dark);
  font-weight: 700;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 16px 24px;
}
.section-title .deco-left,
.section-title .deco-right {
  width: 28px; height: 28px;
  background: center/contain no-repeat;
  opacity: .55;
}
.section-title .deco-left  { background-image: url("../images/icon01.png"); opacity: 1; }
.section-title .deco-right { background-image: url("../images/icon02.png"); opacity: 1; }
.section-title--plain { justify-content: center; }


/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  text-align: center;
  background: #faf8f8;
  padding-bottom: 32px;
}

.hero__banner {
  display: block;
}
.hero__banner img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__actions {
  padding: 0 16px;
  margin-top: -60px;       /* 讓按鈕上移疊入底圖的空白區 */
  position: relative;
  z-index: 2;
}

.hero__cta {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border: 2px solid var(--c-blue);
  border-radius: 999px;
  overflow: hidden;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,96,175,.15);
  transition: transform .15s ease;
  text-decoration: none;
}
.hero__cta:hover { transform: translateY(-1px); text-decoration: none; }
.hero__cta .cta-left {
  padding: 12px 18px;
  color: var(--c-blue);
  font-size: 15px;
  white-space: nowrap;
}
.hero__cta .cta-right {
  padding: 12px 22px;
  background: var(--c-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  white-space: nowrap;
}

.hero__count {
  margin-top: 16px;
  font-size: 17px;
  color: var(--c-text-soft);
}
.hero__count strong {
  color: var(--c-blue-dark);
  font-size: 20px;
  margin: 0 2px;
}


/* ==========================================================
   PROBLEMS
   ========================================================== */
.problems {
  padding: 0 16px 40px;
  background: #faf8f8;
}
.problems .section-title { color: #2B2B2B; }

.problems__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.problem-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.problem-card__img {
  flex: 0 0 58%;
  background: #D9DDE1 center/cover no-repeat;
  aspect-ratio: 1 / 1;             /* 手機版:方形裁切 */
  position: relative;
  overflow: hidden;
}
.problem-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 漸層淡出:手機版 = 右邊淡出,桌面版 = 下方淡出 */
.problem-card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right,
    rgba(255,255,255,0) 55%,
    rgba(255,255,255,.7) 85%,
    #ffffff 100%);
}
.problem-card__img[data-img="problem-1"] { background-image: linear-gradient(135deg,#B7C2CB,#869AA9); }
.problem-card__img[data-img="problem-2"] { background-image: linear-gradient(135deg,#A7BECC,#7693A5); }
.problem-card__img[data-img="problem-3"] { background-image: linear-gradient(135deg,#B8C7D1,#8FA3B0); }

.problem-card__text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  text-align: center;
  line-height: 1.7;
  padding: 16px 10px;
}


/* ==========================================================
   AUTHORIZED STORE (整張底圖)
   ========================================================== */
.authorized {
  background: #fff;
}
.authorized__banner {
  display: block;
}
.authorized__banner img {
  width: 100%;
  height: auto;
  display: block;
}


/* ==========================================================
   DEALER LIST
   ========================================================== */
.dealer-list {
  padding: 20px 16px 48px;
  max-width: 1080px;
  margin: 0 auto;
}
.dealer-list .section-title--plain { padding-top: 0; padding-bottom: 12px; margin-top: -16px; }

.dealer-list__filter {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 12px;
  max-width: 480px;
}
.dealer-list__hint {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0 0 20px;
  font-size: 14px;
  color: #666;
  text-align: left;
}
.dealer-list__hint-icon {
  flex-shrink: 0;
  color: #f2a900;
}
.select-wrap {
  position: relative;
  flex: 1;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 12px 36px 12px 16px;
  border: 1.5px solid #808080;
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  color: var(--c-text);
  font-family: inherit;
}
.btn-search {
  padding: 12px 32px;
  background: var(--c-blue);
  color: #fff;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: background .15s ease;
}
.btn-search:hover { background: var(--c-blue-dark); }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: none;          /* 手機隱藏,桌面顯示 */
  background: #fff;
  border: 1px solid #E6E8EC;
}

/* ---------- 手機版卡片(方角灰框表格樣式) ---------- */
.dealer-cards {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dealer-card {
  background: #fff;
  border: 1px solid #CFD3D8;
  border-radius: 0;
  overflow: hidden;
}
.dealer-card__name-bar {
  background: var(--c-blue);
  color: #fff;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.dealer-card__name-bar a {
  color: #fff;
  text-decoration: underline;
}

.dealer-card__head {
  padding: 12px 14px;
  border-bottom: 1px solid #CFD3D8;
}
.dealer-card__addr,
.dealer-card__phone {
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.55;
  margin: 2px 0;
}

.dealer-card__certs {
  padding: 0;
  margin: 0;
  list-style: none;
}
.dealer-card__certs li {
  display: grid;
  grid-template-columns: 1fr 64px;   /* 左標籤 + 右勾勾欄位 */
  align-items: stretch;
  font-size: 14px;
  color: var(--c-text);
  border-top: 1px solid #CFD3D8;
}
.dealer-card__certs li:first-child { border-top: none; }
.dealer-card__certs .cert-label {
  padding: 12px 14px;
  display: flex;
  align-items: center;
}
.dealer-card__certs .cert-cell {
  border-left: 1px solid #CFD3D8;  /* 勾勾欄位的左邊框 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.dealer-card__certs .no-cert {
  font-size: 13px;
  color: #BBB;
}

.dealer-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
}
.dealer-table thead {
  background: #2B2D30;
  color: #fff;
}
.dealer-table thead th {
  padding: 14px 8px;
  font-weight: 600;
  text-align: center;
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
  line-height: 1.4;
  border: none;
}
.dealer-table thead th:first-child { border-top-left-radius: var(--radius-md); }
.dealer-table thead th:last-child  { border-top-right-radius: var(--radius-md); }

.dealer-table tbody tr {
  transition: background .15s ease;
}
.dealer-table tbody tr:hover { background: #F5F9FD; }
.dealer-table tbody td {
  padding: 18px 10px;
  vertical-align: middle;
  text-align: center;
  color: var(--c-text);
  font-size: 14px;
  border-bottom: 1px solid #EEF0F3;
}
.dealer-table tbody tr:last-child td { border-bottom: none; }

.dealer-table td.name {
  text-align: center;
  white-space: nowrap;
}
.dealer-table td.name a {
  color: var(--c-blue);
  font-weight: 600;
  text-decoration: underline;
}
.dealer-table td.addr  { color: var(--c-text); }
.dealer-table td.phone { color: var(--c-text); white-space: nowrap; }

.check {
  display: inline-block;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #1FAE4A;
  color: #fff;
  position: relative;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(31,174,74,.25);
}
.check::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 7px; height: 13px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg);
}
.check--empty {
  display: inline-block;
  width: 24px; height: 24px;
  background: transparent;
}
.check--empty::after { display: none; }


/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-top: 8px;
}
.pagination button {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--c-text-soft);
  background: transparent;
  transition: all .15s ease;
}
.pagination button:hover:not(:disabled) { color: var(--c-blue); }
.pagination button.is-active {
  background: var(--c-blue);
  color: #fff;
  font-weight: 700;
}
.pagination button:disabled {
  color: #CCC;
  cursor: not-allowed;
}


/* ==========================================================
   Desktop  >= 768px
   ========================================================== */
@media (min-width: 768px) {

  .section-title { font-size: 2rem; padding: 56px 16px 32px; }
  .section-title .deco-left,
  .section-title .deco-right { width: 36px; height: 36px; }

  /* Hero */
  .hero { padding-bottom: 60px; }
  .hero__actions { margin-top: clamp(-450px, -23vw, -160px); }
  .hero__cta .cta-left,
  .hero__cta .cta-right { padding: 14px 28px; font-size: 17px; }
  .hero__count { font-size: 18px; margin-top: 24px; }
  .hero__count strong { font-size: 22px; }

  /* Problems */
  .problems { padding: 0 24px 60px; }
  .problems__list {
    flex-direction: row;
    gap: 24px;
    justify-content: center;
  }
  .problem-card {
    flex: 1;
    flex-direction: column;
    max-width: 320px;
  }
  .problem-card__img {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;        /* 桌面版:4:3 landscape */
  }
  .problem-card__img::after {
    background: linear-gradient(to bottom,
      rgba(255,255,255,0) 55%,
      rgba(255,255,255,.7) 85%,
      #ffffff 100%);
  }
  .problem-card__text {
    padding: 24px 12px 28px;
    font-size: 1.1rem;
  }


  /* Dealer list */
  .dealer-list { padding: 20px 24px 80px; }
  .dealer-list .section-title--plain { margin-top: -40px; padding-bottom: 20px; }
  .table-wrap   { display: block; }       /* 桌面顯示表格 */
  .dealer-cards { display: none; }        /* 桌面隱藏卡片 */
  .dealer-table { font-size: 15px; }
  .dealer-table th { font-size: 14px; padding: 14px 10px; }
  .dealer-table td { padding: 16px 10px; }
  .dealer-table td.addr,
  .dealer-table td.phone { font-size: 14px; }
  .pagination button { min-width: 34px; height: 34px; font-size: 14px; }
}

@media (min-width: 1024px) {
  .problem-card__text { font-size: 1.2rem; }
}
