/*
Theme Name: GeneratePress Child
Theme URI: https://mug.io.kr
Description: Mug.io.kr 전용 GeneratePress 자식 테마 (링크 hover 라인 근본 제거 + 최적화)
Author: 탁지훈
Template: generatepress
Version: 1.1.5
*/

/* ✅ 부모 테마 스타일 로드 */
@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: 16px;
  line-height: 1.8;
  color: #333;
}

/* ✅ 본문 */
.entry-content {
  font-size: 18px;
  line-height: 33px;
  font-weight: 400;
}

/* ✅ 헤딩 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 700;
  color: #222;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}
h1 { font-size: 1.7em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.3em; }
h5 { font-size: 1.1em; }
h6 { font-size: 1em; color: #666; }

/* ✅ 본문 단락 */
.entry-content p {
  font-size: 18px;
  line-height: 2;
  margin-bottom: 1.8em;
  color: #444;
}

/* ✅ 리스트 */
.entry-content ul,
.entry-content ol {
  font-size: 14px;
  color: #444;
  margin-bottom: 1.2em;
  padding-left: 1.4em;
}
.entry-content li {
  margin-bottom: 0.6em;
}

/* ✅ 링크 */
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: 0;
  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;
}

/* ✅ 사이드바 위젯 박스 */
aside.widget {
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 20px !important;
  margin-bottom: 25px;
  transition: box-shadow 0.3s ease;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
aside.widget:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
aside.widget ul,
aside.widget ol {
  padding-left: 0 !important;
  margin-left: 0 !important;
}
aside.widget p {
  margin-left: 0 !important;
}
aside.widget h2 {
  font-size: 1.2em;
  margin-top: 0.5em !important;
  margin-bottom: 0.6em;
  color: #333;
  font-weight: 600;
  line-height: 1.4;
}
aside.widget .widget-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 10px 0;
  color: #222;
  position: relative;
}
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;
}

/* 🔧 WooCommerce 상품 위젯 글자 두께 & 크기 조정 */
.woocommerce ul.product_list_widget li a {
  font-weight: 400 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #333;
}

/* ✅ GeneratePress 기본 배경 제거 */
.home.full-width-content .inside-article {
  background: none;
}

/* ✅ 헤더 검색버튼 */
.site-header button.wp-block-search__button {
  border: 1px solid var(--accent);
  margin-left: 0;
  border-radius: 0 5px 5px 0;
  overflow: hidden;
  padding: 10px;
  background-color: var(--accent);
  color: var(--dark-blue);
}

/* ✅ 검색 입력창 디자인 */
.site-header #wp-block-search__input-1 {
  border-radius: 5px 0 0 5px;
  border: 1px solid var(--accent);
}

/* ✅ WooCommerce 검색 버튼 */
.site-header .wc-block-product-search .wc-block-product-search__button {
  background-color: var(--accent);
  color: var(--dark-blue);
  margin-left: 0;
}

/* ✅ 검색창 전체 비율 */
.site-header .wp-block-search {
  display: flex;
  align-items: center;
  flex: 1;
  width: auto !important;
  max-width: none !important;
}

/* ✅ 입력창: 데스크탑은 350px, 모바일은 100% */
.site-header .wp-block-search__input,
.site-header .wc-block-product-search__field {
  flex: 1 1 350px !important;
  width: 350px !important;
  max-width: 100% !important;
  min-width: 200px;
}

/* ✅ 버튼: 고정 크기, 줄어들지 않게 */
.site-header .wp-block-search__button,
.site-header .wc-block-product-search__button {
  flex-shrink: 0 !important;
  padding: 10px 18px !important;
  border-radius: 0 5px 5px 0;
}

/* ✅ 반응형 처리: 모바일에서는 자동 폭 */
@media (max-width: 768px) {
  .site-header .wp-block-search__input,
  .site-header .wc-block-product-search__field {
    width: 100% !important;
    flex: 1 1 auto !important;
  }
}
