/* =========================================================================
 * redesign.css — koreacoupon.kr 프론트 초고도화 (2026-06-28)
 * 목적: 카드 텍스트 겹침/리스트 가변길이 깨짐 해소 · 카드 전체 클릭 ·
 *       반응형 전 환경 overflow 0 · 디자인 현대화 · 소개/FAQ(GEO/AEO) 스타일.
 * 안전: 신규 파일(기존 style.css 무수정). owl 캐러셀 부모(.today-top/.bnr-itms/
 *       .fea-cate)는 건드리지 않고 "카드 내부"만 오버라이드. CMS 무관.
 * 롤백: 본 파일 제거 + head_v.php의 redesign.css <link> 1줄 제거.
 * ========================================================================= */

:root{
  --kc-navy:#0b2545; --kc-navy2:#13315c; --kc-blue:#0a66c2;
  --kc-gold:#ffc400; --kc-ink:#1d2939; --kc-sub:#667085; --kc-line:#e4e7ec;
  --kc-bg:#f7f9fc; --kc-radius:14px; --kc-shadow:0 2px 12px rgba(16,24,40,.06);
  --kc-shadow-h:0 14px 34px rgba(16,24,40,.16);
}

/* ---------- 0. 전 환경 overflow 0 보강 ---------- */
html,body{max-width:100%;overflow-x:hidden;}
*{min-width:0;}
img{max-width:100%;height:auto;}

/* =========================================================================
 * 1. 쿠폰 카드 내부 (메인 탭 + 카테고리 공통 .coupon-inner)
 *    부모(ul.row/owl)는 무수정 — 내부만 손대 캐러셀/그리드 양쪽 안전.
 * ========================================================================= */
.coupon-inner{
  border:1px solid var(--kc-line)!important;
  border-radius:var(--kc-radius);
  box-shadow:var(--kc-shadow);
  overflow:hidden; position:relative;
  background:#fff;
  display:flex!important; flex-direction:column;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.coupon-inner:hover{
  transform:translateY(-4px);
  box-shadow:var(--kc-shadow-h);
  border-color:var(--kc-gold)!important;
}
.coupon-inner .c-img{
  display:flex; flex-direction:column; flex:1 1 auto;
  padding:0 14px 4px; margin-top:12px;
}
/* 제목/부제 말줄임 — min-height 고정 제거, 높이 균일화(겹침 근본 해소) */
.coupon-inner .c-img h3{
  min-height:0!important;
  font-size:18px; line-height:1.35; font-weight:700; color:#f48013;
  margin:6px 0 2px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; word-break:break-word;
}
.coupon-inner .c-img h5{
  min-height:0!important;
  font-size:13.5px; line-height:1.4; color:var(--kc-sub);
  margin:0 0 8px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; word-break:break-word;
}
.coupon-inner .c-img p{font-size:12.5px;color:#98a2b3;margin:0 0 12px;}
.coupon-inner .c-img .text-center{margin-top:auto;padding-bottom:4px;}
.coupon-inner .btn{
  border-radius:9px!important; padding:9px 22px!important;
  font-weight:600; margin-top:4px;
}
/* COUPON 리본 좌상단 고정 — 텍스트 침범 0 */
.coupon-inner .top-tag{
  position:absolute!important; top:12px; left:0; width:auto!important; z-index:3;
}

/* ---------- 2. 카드 전체 클릭 (stretched-link) ----------
 * GET COUPON 버튼 ::after가 카드(coupon-inner=relative) 전체를 덮어
 * 어디를 눌러도 쿠폰 URL로 이동. 버튼 텍스트는 z-index:2로 위. */
.coupon-inner .text-center .btn::after{
  content:""; position:absolute; inset:0; z-index:1;
}

/* =========================================================================
 * 3. 메인 TOP OFFER (.today-top .offer-in) — owl 아이템, 부모 무수정
 * ========================================================================= */
.today-top .offer-in{
  position:relative; border-radius:var(--kc-radius); overflow:hidden;
  box-shadow:var(--kc-shadow); cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease;
}
.today-top .offer-in:hover{transform:translateY(-4px);box-shadow:var(--kc-shadow-h);}
.offer-in .offer-top-in h3,.offer-in .off-over h3{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;word-break:break-word;
}
.offer-in .offer-top-in h6,.offer-in .off-over h6{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;word-break:break-word;
}

/* =========================================================================
 * 4. 카테고리 리스트 페이지 (.coupon 정적 그리드, owl 아님) — 높이 균일
 * ========================================================================= */
.category-page .coupon>.row,
.coupon-grid>.row{display:flex;flex-wrap:wrap;}
.category-page .coupon>.row>li,
.coupon-grid>.row>li{display:flex;float:none;margin-bottom:24px;}

/* =========================================================================
 * 5. 소개 answer-first 블록 (GEO/AEO — AI 검색 인용 최적 위치)
 * ========================================================================= */
.kc-intro{
  background:linear-gradient(135deg,var(--kc-navy),var(--kc-navy2));
  color:#fff; padding:26px 22px; border-radius:18px;
  margin:22px auto; max-width:1140px;
}
.kc-intro h2{color:#fff;font-size:23px;line-height:1.3;margin:0 0 10px;font-weight:800;}
.kc-intro p{color:#dbe4f0;font-size:15px;line-height:1.65;margin:0 0 14px;}
.kc-intro p strong{color:var(--kc-gold);}
.kc-steps{display:flex;flex-wrap:wrap;gap:12px;margin:0;padding:0;list-style:none;}
.kc-steps li{flex:1 1 220px;background:rgba(255,255,255,.08);border-radius:12px;padding:14px 16px;}
.kc-steps li b{display:block;color:var(--kc-gold);font-size:14px;margin-bottom:5px;}
.kc-steps li span{color:#e6edf7;font-size:13.5px;line-height:1.5;}
.kc-stats{display:flex;flex-wrap:wrap;gap:22px;margin-top:16px;}
.kc-stats div b{font-size:24px;color:var(--kc-gold);line-height:1;}
.kc-stats div span{display:block;font-size:12.5px;color:#c3d0e2;margin-top:3px;}

/* 카테고리 SEO 텍스트 블록 */
.kc-seo-cats{max-width:1140px;margin:22px auto;padding:0 12px;}
.kc-seo-cats h2{font-size:21px;color:var(--kc-ink);margin:0 0 12px;}
.kc-seo-cats .kc-cat-grid{display:flex;flex-wrap:wrap;gap:12px;}
.kc-seo-cats .kc-cat-grid a{
  flex:1 1 160px;border:1px solid var(--kc-line);border-radius:10px;
  padding:12px 14px;color:var(--kc-ink);text-decoration:none;background:#fff;
  transition:border-color .2s,box-shadow .2s;
}
.kc-seo-cats .kc-cat-grid a:hover{border-color:var(--kc-blue);box-shadow:var(--kc-shadow);}
.kc-seo-cats .kc-cat-grid b{display:block;font-size:14px;margin-bottom:3px;}
.kc-seo-cats .kc-cat-grid span{font-size:12.5px;color:var(--kc-sub);}

/* FAQ (AEO) */
.kc-faq{max-width:1140px;margin:24px auto;padding:0 12px;}
.kc-faq h2{font-size:21px;margin:0 0 14px;color:var(--kc-ink);}
.kc-faq details{border:1px solid var(--kc-line);border-radius:10px;padding:14px 16px;margin-bottom:10px;background:#fff;}
.kc-faq summary{font-weight:600;cursor:pointer;color:var(--kc-ink);font-size:15px;list-style:none;}
.kc-faq summary::-webkit-details-marker{display:none;}
.kc-faq summary::before{content:"＋";color:var(--kc-blue);font-weight:700;margin-right:8px;}
.kc-faq details[open] summary::before{content:"－";}
.kc-faq details p{margin:10px 0 0;color:#475467;font-size:14px;line-height:1.65;}

/* =========================================================================
 * 6. 반응형 — 태블릿/모바일 최대 가로 + overflow 0
 * ========================================================================= */
@media (max-width:991px){
  .category-page .coupon>.row>li.col-sm-4,
  .coupon-grid>.row>li.col-sm-4{width:50%!important;}
}
@media (max-width:575px){
  .category-page .coupon>.row>li.col-sm-4,
  .coupon-grid>.row>li.col-sm-4{width:100%!important;}
  .coupon-inner .c-img h3{font-size:17px;}
  .kc-intro{border-radius:0;margin-left:0;margin-right:0;padding:22px 16px;}
  .kc-steps li{flex-basis:100%;}
  .kc-stats{gap:16px;}
}
