/*
Theme Name: GeneratePress Child
Theme URI: https://mug.io.kr
Description: Mug.io.kr 전용 GeneratePress 자식 테마 (링크 hover 라인 근본 제거 + 가독성 강화 + 모바일 여백 최적화 + 로고 설명문 숨김 복원 + 사이드바 폰트 축소 + 리스트 여백 개선)
Author: 탁지훈
Template: generatepress
Version: 1.2.7
*/

/* ✅ 부모 테마 스타일 로드 */
@import url("../generatepress/style.css");

/* ✅ 폰트 선언 */
@font-face {
  font-family: 'TheJamsil2Light';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302_01@1.0/TheJamsil2Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'TheJamsil4Medium';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302_01@1.0/TheJamsil4Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'TheJamsil5Bold';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302_01@1.0/TheJamsil5Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* ✅ 기본 구조 */
body {
  font-family: 'TheJamsil2Light', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 17px;
  line-height: 1.9;
  color: #333;
}

/* ✅ 본문 */
.entry-content {
  font-size: 19px;
  line-height: 1.8;
  font-weight: 400;
  color: #444;
  letter-spacing: -0.2px;
}

/* ✅ 헤딩 (잠실체 적용 + 가독성 강화) */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.9em;
  margin-bottom: 1em;
  line-height: 1.5;
}
h1 {
  font-family: 'TheJamsil5Bold', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-weight: 700;
  color: #111;
  font-size: 1.6em;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
}

/* ✅ h2 스타일 */
.entry-content h2,
.woocommerce div.product h2 {
  font-family: 'TheJamsil5Bold', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 1.3em;
  color: #111;
  border-left: 5px solid #2DB400;
  padding-left: 10px;
  margin-top: 2em;
  margin-bottom: 1.2em;
}

/* 🚫 상품 목록 썸네일 밑 제목엔 라인 제거 */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  border-left: none !important;
  padding-left: 0 !important;
  margin-top: 0.8em !important;
  margin-bottom: 0.6em !important;
}

/* ✅ h3 ~ h4 */
h3, h4 {
  font-family: 'TheJamsil4Medium', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-weight: 500;
  color: #333;
}
h3 { font-size: 1.2em; }
h4 { font-size: 1.2em; color: #3a3a3a; }

h5, h6 {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 600;
  color: #555;
}
h5 { font-size: 1.15em; }
h6 { font-size: 1em; }

/* ✅ 본문 단락 */
.entry-content p {
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 1.8em;
  color: #444;
}

/* ✅ 리스트 (여백 구조 근본 수정 + 가독성 향상) */
.entry-content ul,
.entry-content ol {
  font-size: 16px;
  color: #444;
  margin-top: 0;
  margin-bottom: 1.4em;
  margin-left: 0 !important;
  padding-left: 1.1em !important;   /* 기존 1.6em → 1.1em */
  list-style-position: inside;
}
.entry-content li {
  margin-bottom: 0.6em;
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-indent: 0;
  line-height: 1.9;
  color: #444;
}
@media (max-width: 768px) {
  .entry-content ul,
  .entry-content ol {
    padding-left: 0.8em !important; /* 모바일은 더 밀착 */
    list-style-position: inside;
  }
}

/* ✅ 링크 */
a {
  color: #cc0000;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  text-decoration: underline;
  color: #ff3366;
}

/* ✅ 테이블 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background: #fff;
  border: 1px solid #ddd;
  font-size: 15px;
}
table th,
table td {
  border: 1px solid #e5e5e5;
  padding: 12px 15px;
  text-align: left;
}
table th {
  background-color: #f8f8f8;
  font-weight: 600;
  color: #222;
}
table tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* ✅ 이미지 */
img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

/* ✅ WooCommerce 썸네일 */
.woocommerce ul.products li.product a img,
.woocommerce div.product div.images img {
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
}

/* ✅ 링크 hover 라인 제거 */
a img {
  display: block !important;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
  vertical-align: middle !important;
}
a:hover img,
a:focus img {
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
}
a:has(img) {
  display: inline-block !important;
  line-height: 0 !important;
  border: none !important;
  text-decoration: none !important;
}
a:hover,
a:focus {
  border-bottom: none !important;
  text-decoration: none !important;
}

/* ✅ WooCommerce 상품목록 위젯 (균형 고정형) */
.widget.woocommerce ul.product_list_widget {
  margin: 0;
  padding: 0;
}
.widget.woocommerce ul.product_list_widget li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  min-height: 80px;
  overflow: hidden;
}
.widget.woocommerce ul.product_list_widget li:last-child {
  border-bottom: none;
}
.widget.woocommerce ul.product_list_widget li img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.widget.woocommerce ul.product_list_widget li a {
  flex: 1;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
  color: #111;
  font-size: 15px;
  font-weight: 600;
}
.widget.woocommerce ul.product_list_widget li .star-rating {
  display: none;
}

/* ✅ 사이드바 위젯 박스 */
aside.widget {
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 25px !important;
  margin-bottom: 25px;
  border-radius: 10px;
  transition: box-shadow 0.3s ease;
}
aside.widget:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
aside.widget h2 {
  font-size: 1.25em;
  margin-top: 0.5em !important;
  margin-bottom: 0.6em;
  color: #222;
  font-weight: 600;
  line-height: 1.4;
  border-left: none !important;
  padding-left: 0 !important;
}
aside.widget .widget-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: #ffe3f1;
  margin-top: 6px;
  margin-bottom: 10px;
}
aside.widget ul {
  list-style: none;
  padding-left: 0;
}
aside.widget ul li {
  margin-bottom: 5px;
}
aside.widget ul li a {
  color: #333;
  text-decoration: none;
}
aside.widget ul li a:hover {
  text-decoration: underline;
  color: #cc0000;
}

/* ✅ 검색창 */
.wp-block-search__input {
  width: 280px !important;
  max-width: none !important;
}
.wp-block-search__button {
  margin-left: 5px !important;
}
.wp-block-search {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: auto;
  max-width: 400px;
}

/* ✅ 모바일 확장 */
@media (max-width: 768px) {
  .grid-container,
  .container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .inside-article {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .entry-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .inside-article img.wp-post-image,
  .inside-article h1.entry-title {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .inside-article img.wp-post-image {
    margin-top: 10px !important;
    margin-bottom: 18px !important;
  }
  .inside-article h1.entry-title {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
  }
}

/* ✅ 사이드바 폰트 (본문보다 2px 작게) */
.sidebar,
aside.widget,
.sidebar .widget,
.widget-area {
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: #444 !important;
}
.sidebar a,
aside.widget a,
.sidebar ul li,
.widget-area ul li {
  font-size: 15px !important;
  line-height: 1.8 !important;
}

/* ✅ 로고 옆 키워드(사이트 설명문) 완전 숨김 복원 */
.site-description,
.site-branding .site-description,
.site-branding-text .site-description {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  color: transparent !important;
}
