/*
Theme Name: GeneratePress Child
Theme URI: https://mug.io.kr
Description: Mug.io.kr 전용 GeneratePress 자식 테마 (링크 hover 라인 근본 제거 + 최적화)
Author: 탁지훈
Template: generatepress
Version: 1.1.3
*/

/* ✅ 부모 테마 스타일 로드 */
@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;          /* inline → block 전환 */
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
  vertical-align: middle !important;  /* baseline 제거 */
}
a:hover img,
a:focus img {
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
}
a:has(img) {
  display: inline-block !important;   /* inline-block으로 라인박스 제거 */
  line-height: 0 !important;
  border: none !important;
  text-decoration: none !important;
}
a:hover,
a:focus {
  border-bottom: none !important;     /* 하단 border 완전 제거 */
  text-decoration: none !important;   /* underline 제거 */
}

/* ✅ WooCommerce 사이드바 상품 위젯 */
.widget.woocommerce ul.product_list_widget {
  margin: 0;
  padding: 0;
}
.widget.woocommerce ul.product_list_widget li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  line-height: 1.5;
  min-height: 70px;
}
.widget.woocommerce ul.product_list_widget li:last-child {
  border-bottom: none;
}
.widget.woocommerce ul.product_list_widget li img {
  width: 65px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
}
.widget.woocommerce ul.product_list_widget li > a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  line-height: 1.5;
}
.widget.woocommerce ul.product_list_widget li del {
  color: #888;
  text-decoration: line-through;
  font-size: 13px;
  margin-right: 6px;
}
.widget.woocommerce ul.product_list_widget li ins {
  color: #000;
  font-weight: 700;
  font-size: 14px;
}
.widget.woocommerce ul.product_list_widget li .woocommerce-Price-amount {
  white-space: nowrap;
}

/* ✅ 사이드바 위젯 박스 */
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.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;
}

/* 검색창 입력창 길이 조정 */
.wp-block-search__input {
  width: 400px !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;           /* 100% → auto */
  max-width: 400px;      /* 전체 폭 제한 */
}
