/* ===== 全域重置 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-orange: #ff8a1d;
  --brand-orange-deep: #d85a16;
  --brand-sky: #dff7ff;
  --brand-sky-deep: #79d5ef;
  --brand-cyan: #2cb9de;
  --brand-blue: #1e7fab;
  --brand-blue-deep: #0d597c;
  --brand-surface: #daf3fb;
  --brand-surface-warm: #eefbff;
  --brand-card: rgba(255, 255, 255, 0.95);
  --brand-card-strong: rgba(255, 255, 255, 0.98);
  --brand-border: rgba(255, 255, 255, 0.78);
  --brand-ink: #17384a;
  --brand-muted: #5f7b8c;
  --brand-soft-shadow: 0 20px 44px rgba(39, 117, 150, 0.14);
  --brand-card-shadow:
    24px 24px 48px rgba(44, 121, 151, 0.16),
    -12px -12px 24px rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* ===== 主體樣式 ===== */
html {
  background: var(--brand-surface);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--brand-ink);
  background: var(--brand-surface);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ===== 背景漸層 ===== */
.background-gradient {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background:
    linear-gradient(145deg, #ecfbff 0%, #caeef9 42%, #9ed6ea 100%);
  opacity: 1;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.background-gradient::before,
.background-gradient::after {
  content: '';
  position: absolute;
  border-radius: 48px;
  pointer-events: none;
}

.background-gradient::before {
  top: 5%;
  right: 12%;
  width: min(42vw, 520px);
  height: min(70vh, 760px);
  background: linear-gradient(160deg, rgba(22, 99, 137, 0.96) 0%, rgba(12, 76, 107, 0.94) 100%);
  box-shadow: 0 36px 70px rgba(14, 77, 109, 0.28);
  transform: rotate(16deg);
}

.background-gradient::after {
  left: -8%;
  bottom: 6%;
  width: min(28vw, 420px);
  height: min(28vw, 420px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.08) 58%, transparent 74%);
}

/* ===== Bento Grid 容器 ===== */
.bento-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 24px 88px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* ===== 基礎卡片樣式 ===== */
.bento-card {
  background: var(--brand-card);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border-radius: 34px;
  padding: 32px;
  border: 1px solid var(--brand-border);
  box-shadow: var(--brand-card-shadow);
  transition: transform 0.32s ease, box-shadow 0.32s ease, background-color 0.32s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.28) 34%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.bento-card:hover::before {
  opacity: 1;
}

/* 可點擊卡片 hover 效果 */
a.bento-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.bento-card:hover {
  transform: translateY(-8px);
  box-shadow:
    26px 30px 58px rgba(39, 117, 150, 0.18),
    -14px -14px 28px rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 0 0 1px rgba(255, 255, 255, 0.56);
}

/* ===== Header Card - 品牌標題 ===== */
.header-card {
  grid-column: span 2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 252, 255, 0.94) 100%);
  color: var(--brand-ink);
  text-align: center;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    30px 34px 64px rgba(37, 114, 145, 0.18),
    -14px -14px 24px rgba(255, 255, 255, 0.78),
    0 1px 0 rgba(255, 255, 255, 0.98) inset;
}

.header-card::before {
  content: '';
  position: absolute;
  inset: auto auto -38% -6%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(44, 185, 222, 0.2) 0%, rgba(44, 185, 222, 0.05) 44%, transparent 72%);
  opacity: 1;
}

.header-card::after {
  content: '';
  position: absolute;
  top: -22%;
  right: -6%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 138, 29, 0.22) 0%, rgba(255, 138, 29, 0.05) 44%, transparent 74%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-20px, -20px) scale(1.1);
  }
}

.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 142px;
  height: 142px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
  border-radius: 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 250, 255, 0.88) 100%);
  overflow: hidden;
  box-shadow:
    18px 18px 34px rgba(41, 118, 148, 0.16),
    -10px -10px 20px rgba(255, 255, 255, 0.78),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(255, 255, 255, 0.5);
}

.site-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: drop-shadow(0 10px 18px rgba(32, 95, 120, 0.14));
}

.brand-title {
  font-size: 3rem;
  font-weight: 780;
  letter-spacing: -0.05em;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  color: var(--brand-blue-deep);
}

.brand-slogan {
  font-size: 1.02rem;
  color: rgba(23, 56, 74, 0.68);
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}

/* ===== Banner Card - 活動輪播 ===== */
.banner-card {
  grid-column: span 2;
  padding: 0;
  min-height: 280px;
  background:
    linear-gradient(145deg, rgba(81, 91, 212, 0.88) 0%, rgba(111, 94, 191, 0.82) 54%, rgba(196, 112, 49, 0.74) 100%);
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.46);
}

.banner-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.banner-slide:hover {
  opacity: 0.95;
}

.banner-content {
  text-align: center;
  color: white;
  z-index: 2;
  padding: 40px;
  display: block;
  pointer-events: none;
}

.banner-content h3 {
  font-size: 2rem;
  font-weight: 760;
  margin-bottom: 8px;
  text-shadow: 0 10px 24px rgba(17, 24, 39, 0.24);
}

.banner-content p {
  font-size: 1.1rem;
  opacity: 0.95;
  text-shadow: 0 8px 18px rgba(17, 24, 39, 0.2);
}

/* Banner 導航按鈕 */
.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.banner-nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.banner-nav.prev {
  left: 16px;
}

.banner-nav.next {
  right: 16px;
}

/* Banner 指示點 */
.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* ===== Brand Cards - 品牌卡片 ===== */
.brand-card {
  grid-column: span 1;
  min-height: 200px;
  justify-content: space-between;
}

.brand-logo-wrapper,
.brand-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(236, 248, 252, 0.88) 100%);
  box-shadow:
    14px 14px 24px rgba(40, 117, 148, 0.12),
    -8px -8px 16px rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.brand-logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-icon {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand-ink);
}

.brand-info {
  flex: 1;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 760;
  color: var(--brand-ink);
  margin-bottom: 4px;
}

.brand-desc {
  font-size: 0.95rem;
  color: var(--brand-muted);
  margin-bottom: 8px;
}

.brand-meta {
  font-size: 0.85rem;
  color: rgba(110, 110, 115, 0.8);
}

/* 品牌卡片漸變背景 */
.brand-card.royal-canin {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 248, 255, 0.92) 100%);
}

.brand-card.farmina {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 249, 255, 0.92) 100%);
}

.brand-card.catidea {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(237, 250, 255, 0.92) 100%);
}

.brand-card.ciao {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 255, 0.92) 100%);
}

.brand-card.solution {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 250, 255, 0.92) 100%);
}

.brand-card.natural-balance {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 248, 255, 0.92) 100%);
}

.brand-card.blackwood {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 248, 251, 0.92) 100%);
}

.brand-card.gootoe {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 249, 255, 0.92) 100%);
}

/* 去除部分 JPG logo 的白邊視覺 */
.brand-card.catidea .brand-logo-wrapper,
.brand-card.solution .brand-logo-wrapper,
.brand-card.natural-balance .brand-logo-wrapper,
.brand-card.blackwood .brand-logo-wrapper {
  background: transparent;
  box-shadow: none;
}

.brand-card.catidea .brand-logo-img,
.brand-card.solution .brand-logo-img,
.brand-card.natural-balance .brand-logo-img,
.brand-card.blackwood .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.brand-card.gootoe .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.16);
}

.brand-card.gootoe .brand-logo-wrapper {
  overflow: hidden;
}

/* ===== Category Title Card ===== */
.category-title-card {
  grid-column: span 4;
  min-height: 132px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(230, 248, 255, 0.92) 100%);
  color: var(--brand-blue-deep);
  justify-content: center;
  text-align: center;
  box-shadow:
    28px 30px 60px rgba(34, 111, 142, 0.16),
    -12px -12px 24px rgba(255, 255, 255, 0.74),
    0 1px 0 rgba(255, 255, 255, 0.98) inset;
}

.category-title-card .section-title {
  font-size: 2rem;
  font-weight: 780;
  margin-bottom: 8px;
}

.category-title-card .section-subtitle {
  font-size: 0.98rem;
  color: rgba(23, 56, 74, 0.64);
}

/* ===== Category Cards - 分類卡片 ===== */
.category-card {
  grid-column: span 1;
  min-height: 180px;
  justify-content: space-between;
  text-align: center;
  align-items: center;
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 14px rgba(46, 124, 153, 0.14));
}

.category-name {
  font-size: 1.2rem;
  font-weight: 760;
  color: var(--brand-ink);
  margin-bottom: 8px;
}

.category-desc {
  font-size: 0.85rem;
  color: var(--brand-muted);
  margin-bottom: 12px;
}

/* 分類卡片漸變背景 */
.category-card.cat-dry {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 251, 255, 0.92) 100%);
}

.category-card.dog-dry {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 249, 255, 0.92) 100%);
}

.category-card.cat-wet {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 248, 255, 0.92) 100%);
}

.category-card.dog-wet {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 248, 255, 0.92) 100%);
}

.category-card.treats {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 248, 255, 0.92) 100%);
}

.category-card.health {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 246, 255, 0.92) 100%);
}

/* ===== Site Footer - 網站頁尾 ===== */
.site-footer {
  width: 100%;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-top: 1px solid rgba(255, 255, 255, 0.88);
  margin-top: 40px;
  padding: 24px 20px 18px;
  position: relative;
  z-index: 1;
  box-shadow: 0 -18px 34px rgba(33, 107, 136, 0.08);
}

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

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-ink);
  margin-bottom: 8px;
}

.footer-contact {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.line-official-btn {
  height: 28px;
  width: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.line-official-btn:hover {
  opacity: 0.8;
}

.footer-link {
  color: var(--brand-ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--brand-cyan);
}

.footer-divider {
  color: var(--brand-muted);
  font-size: 0.8rem;
  user-select: none;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--brand-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ===== Card Arrow - 卡片箭頭 ===== */
.card-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  color: var(--brand-cyan);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(233, 249, 255, 0.9) 100%);
  box-shadow:
    10px 10px 18px rgba(40, 117, 148, 0.12),
    -6px -6px 12px rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  align-self: flex-end;
  margin-top: auto;
}

a.bento-card:hover .card-arrow {
  color: white;
  background: linear-gradient(180deg, var(--brand-cyan) 0%, var(--brand-blue) 100%);
  transform: translateX(4px) translateY(-1px);
}

/* ===== 響應式設計 - 平板 ===== */
@media (max-width: 1024px) {
  .bento-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 32px 16px 60px;
  }

  .header-card {
    grid-column: span 3;
  }

  .banner-card {
    grid-column: span 3;
  }

  .category-title-card {
    grid-column: span 3;
  }

  .brand-card {
    grid-column: span 1;
  }

  .category-card:nth-child(n+7):nth-child(-n+9) {
    grid-column: span 1;
  }
}

/* ===== 響應式設計 - 手機 ===== */
@media (max-width: 768px) {
  .bento-container {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 16px 48px;
  }

  /* Header - 全寬 */
  .header-card {
    grid-column: span 1;
    min-height: 220px;
    padding: 32px 24px;
  }

  .logo-placeholder {
    width: 112px;
    height: 112px;
    margin-bottom: 16px;
    border-radius: 24px;
  }

  .brand-title {
    font-size: 1.8rem;
  }

  .brand-slogan {
    font-size: 0.9rem;
  }

  .site-logo {
    width: 100%;
    height: 100%;
  }

  /* Banner - 全寬 */
  .banner-card {
    grid-column: span 1;
    min-height: 200px;
  }

  .banner-content h3 {
    font-size: 1.4rem;
  }

  .banner-content p {
    font-size: 0.9rem;
  }

  /* 品牌卡片 - 細長條形 */
  .brand-card {
    grid-column: span 1;
    flex-direction: row;
    align-items: center;
    min-height: auto;
    padding: 16px 20px;
    gap: 16px;
  }

  .brand-logo-wrapper,
  .brand-icon-wrapper {
    width: 56px;
    height: 56px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .brand-logo-img {
    width: 44px;
    height: 44px;
  }

  .brand-info {
    flex: 1;
    text-align: left;
  }

  .brand-name {
    font-size: 1.1rem;
    margin-bottom: 2px;
  }

  .brand-desc {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }

  .brand-meta {
    font-size: 0.8rem;
  }

  /* 分類標題 - 全寬 */
  .category-title-card {
    grid-column: span 1;
    min-height: 100px;
    padding: 24px;
  }

  .category-title-card .section-title {
    font-size: 1.5rem;
  }

  .category-title-card .section-subtitle {
    font-size: 0.9rem;
  }

  /* 分類卡片 - 細長條形 */
  .category-card {
    grid-column: span 1;
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-height: auto;
    padding: 16px 20px;
    gap: 16px;
  }

  .category-icon {
    font-size: 2.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .category-name {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }

  .category-desc {
    font-size: 0.8rem;
    margin-bottom: 0;
  }

  /* 箭頭在手機版保持在右側 */
  .card-arrow {
    align-self: center;
    margin-top: 0;
    margin-left: auto;
  }

  /* 頁尾響應式 */
  .site-footer {
    padding: 16px 12px 12px;
    margin-top: 24px;
  }

  .footer-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .footer-contact {
    flex-direction: column;
    gap: 8px;
  }

  .footer-divider {
    display: none;
  }

  .line-official-btn {
    height: 28px;
  }

  .footer-link {
    font-size: 0.8rem;
  }

  .footer-copyright {
    font-size: 0.7rem;
    margin-top: 8px;
    padding-top: 8px;
  }
}

/* ===== 極小螢幕優化 ===== */
@media (max-width: 480px) {
  .bento-container {
    padding: 20px 12px 40px;
  }

  .header-card {
    min-height: 200px;
    padding: 28px 20px;
  }

  .logo-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .brand-title {
    font-size: 1.6rem;
  }

  .brand-slogan {
    font-size: 0.85rem;
  }

  .brand-card,
  .category-card {
    padding: 14px 16px;
  }

  .brand-name,
  .category-name {
    font-size: 1rem;
  }

  .brand-desc,
  .category-desc {
    font-size: 0.8rem;
  }

  .brand-meta {
    font-size: 0.75rem;
  }
}

/* ===== 動畫效果 ===== */
.bento-card {
  animation: fadeInUp 0.55s ease-out backwards;
}

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

/* 錯開動畫延遲 */
.bento-card:nth-child(1) { animation-delay: 0s; }
.bento-card:nth-child(2) { animation-delay: 0.05s; }
.bento-card:nth-child(3) { animation-delay: 0.1s; }
.bento-card:nth-child(4) { animation-delay: 0.15s; }
.bento-card:nth-child(5) { animation-delay: 0.2s; }
.bento-card:nth-child(6) { animation-delay: 0.25s; }
.bento-card:nth-child(7) { animation-delay: 0.3s; }
.bento-card:nth-child(8) { animation-delay: 0.35s; }
.bento-card:nth-child(9) { animation-delay: 0.4s; }
.bento-card:nth-child(10) { animation-delay: 0.45s; }
.bento-card:nth-child(11) { animation-delay: 0.5s; }
.bento-card:nth-child(12) { animation-delay: 0.55s; }
.bento-card:nth-child(13) { animation-delay: 0.6s; }
.bento-card:nth-child(14) { animation-delay: 0.65s; }
