/* ============================================================
   Instagram Wall · 樂活眼鏡首頁
   方案 A2-B：
     上半：主打完整 IG embed（左半） + 右 2×2 KOL（裁切版）
     下半：4 欄 KOL（裁切版）
   ============================================================ */

.lohas-ig-wall {
  background: #FAF7F2;
  padding: 64px 24px 72px;
  max-width: 100%;
  overflow-x: hidden;
}

.lohas-ig-wall * {
  box-sizing: border-box;
}

.lohas-ig-wall__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}

.lohas-ig-wall__eyebrow {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: #50422D;
  font-weight: 600;
  margin-bottom: 10px;
}

.lohas-ig-wall__title {
  font-size: 32px;
  font-weight: 700;
  color: #3D3026;
  letter-spacing: 1px;
  margin: 0 0 10px;
  line-height: 1.25;
}

.lohas-ig-wall__desc {
  font-size: 14px;
  color: #6B5E4F;
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   上半：主打（左大）+ 2×2 KOL（右）
   ============================================ */
.lohas-ig-wall__top {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

/* === 主打：完整 IG embed === */
.lohas-ig-wall__featured {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 1px 0 rgba(0,0,0,0.5), 0 1px 10px 0 rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lohas-ig-wall__featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  background: #d85a30;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.lohas-ig-wall__featured .instagram-media,
.lohas-ig-wall__featured > blockquote {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* === 右側 2×2 KOL Grid === */
.lohas-ig-wall__top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

/* ============================================
   下半：4 欄 KOL（更高，顯示按讚數和部分內文）
   ============================================ */
.lohas-ig-wall__bottom-grid {
  max-width: 1280px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* 下方卡片獨立加高 */
.lohas-ig-wall__bottom-grid .lohas-ig-wall__cell {
  padding-top: calc(100% + 200px);
}

/* ============================================
   KOL 卡（裁切版）：只顯示 header(65) + 圖 + 互動列(46)
   ============================================ */
.lohas-ig-wall__cell {
  position: relative;
  display: block;
  width: 100%;
  padding-top: calc(100% + 111px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 1px 0 rgba(0,0,0,0.5), 0 1px 10px 0 rgba(0,0,0,0.08);
}

.lohas-ig-wall__cell .instagram-media,
.lohas-ig-wall__cell iframe,
.lohas-ig-wall__cell > blockquote {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.lohas-ig-wall__cell iframe {
  height: 1200px !important;
}

/* 載入骨架 */
.lohas-ig-wall__cell .instagram-media:not(.instagram-media-rendered),
.lohas-ig-wall__featured .instagram-media:not(.instagram-media-rendered) {
  background:
    linear-gradient(90deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0.6) 50%,
      rgba(255,255,255,0) 100%
    ),
    #f0e8db !important;
  background-size: 200% 100%, 100% 100% !important;
  animation: lohasIgShimmer 1.6s infinite;
  height: 100% !important;
}

.lohas-ig-wall__featured .instagram-media:not(.instagram-media-rendered) {
  min-height: 600px;
}

@keyframes lohasIgShimmer {
  0%   { background-position: -150% 0, 0 0; }
  100% { background-position: 150% 0, 0 0; }
}

/* ===== Footer 追蹤 CTA ===== */
.lohas-ig-wall__follow {
  text-align: center;
  margin-top: 44px;
}

.lohas-ig-wall__follow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #50422D;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  border-bottom: 1px solid #50422D;
  padding-bottom: 4px;
  transition: opacity 0.2s;
}

.lohas-ig-wall__follow a:hover {
  opacity: 0.7;
}

/* ============================================
   RWD
   ============================================ */
@media (max-width: 1024px) {
  .lohas-ig-wall__top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .lohas-ig-wall__top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .lohas-ig-wall__bottom-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
  }
}

@media (max-width: 600px) {
  .lohas-ig-wall {
    padding: 44px 16px 56px;
  }

  .lohas-ig-wall__title {
    font-size: 24px;
  }

  .lohas-ig-wall__desc {
    font-size: 13px;
  }

  .lohas-ig-wall__top,
  .lohas-ig-wall__top-grid,
  .lohas-ig-wall__bottom-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* 全域保險：覆寫 IG 內聯 min-width:326px */
.lohas-ig-wall .instagram-media {
  min-width: 0 !important;
}
