/*
Theme Name: GeneratePress Child
Theme URI: https://mug.io.kr
Description: Mug.io.kr 전용 GeneratePress 자식 테마 (최적화 v1.2.0)
Author: 탁지훈
Template: generatepress
Version: 1.2.0
*/

/* ═══════════════════════════════════════════════════════════
   1. 부모 테마 & 폰트
═══════════════════════════════════════════════════════════ */

@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;
}

/* ═══════════════════════════════════════════════════════════
   2. 기본 구조
═══════════════════════════════════════════════════════════ */

body {
  font-family: 'TheJamsil2Light', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

/* ═══════════════════════════════════════════════════════════
   3. 링크
═══════════════════════════════════════════════════════════ */

a {
  color: #cc0000;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  text-decoration: underline;
  color: #ff3366;
}

/* 이미지 링크만 밑줄 제거 */
a:has(img) {
  display: inline-block;
  line-height: 0;
  text-decoration: none !important;
}

a:has(img):hover,
a:has(img):focus {
  text-decoration: none !important;
}

a img {
  display: block;
  border: none;
  outline: none;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════
   4. 헤딩
═══════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
}

h1 { font-size: 1.7em; }

h2 {
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 0.8em;
}

h3 {
  font-size: 1.3em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

h4 { font-size: 1.3em; }
h5 { font-size: 1.1em; }
h6 { font-size: 1em; color: #666; }

/* 헤딩 연속일 때 여백 축소 */
h2 + h3 { margin-top: 0.8em; }
h3 + h4 { margin-top: 0.6em; }

/* ═══════════════════════════════════════════════════════════
   5. 본문 콘텐츠 (.entry-content)
═══════════════════════════════════════════════════════════ */

.entry-content {
  font-size: 19px;
  line-height: 33px;
  font-weight: 400;
}

.entry-content p {
  font-size: 18px;
  line-height: 2;
  margin-bottom: 1.8em;
  color: #444;
}

.entry-content ul,
.entry-content ol {
  font-size: 16px;
  color: #444;
  margin-bottom: 1.2em;
  padding-left: 0.2em;
}


@media (max-width: 768px) {
  .separate-containers .inside-article,
  .separate-containers .comments-area,
  .separate-containers .page-header,
  .separate-containers .paging-navigation,
  .one-container .site-content,
  .inside-page-header {
    padding: 30px 15px;  /* 상하 30px, 좌우 15px */
  }
}

@media (max-width: 768px) {
  .entry-content ul,
  .entry-content ol {
    padding-left: 1em;
    margin-left: 0.3em;  /* 더 왼쪽으로 */
  }
}


.entry-content li {
  margin-bottom: 0.6em;
}

/* 본문 내 이미지 여백 */
.entry-content img,
.post-content img,
article img {
  margin-top: 30px;
  margin-bottom: 30px;
}

.wp-block-image,
figure.wp-caption {
  margin-top: 30px;
  margin-bottom: 30px;
}

/* ═══════════════════════════════════════════════════════════
   6. 이미지 기본
═══════════════════════════════════════════════════════════ */

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════
   7. 테이블
═══════════════════════════════════════════════════════════ */

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;
}

/* ═══════════════════════════════════════════════════════════
   8. 사이드바 위젯
═══════════════════════════════════════════════════════════ */

aside.widget {
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 20px !important;
  margin-bottom: 15px;
  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 h1,
aside.widget h2,
aside.widget h3,
aside.widget h4,
aside.widget h5,
aside.widget h6 {
  font-size: 1.2em;
  margin: 0 !important;
  padding: 0 !important;
  color: #333;
  font-weight: 600;
  line-height: 1.2 !important;
}

aside.widget h6 {
  font-weight: 300;
}

/* 사이드바 위젯 타이틀 */
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,
aside.widget ol {
  list-style: none;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

aside.widget p {
  margin-left: 0 !important;
}

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;
}

/* ═══════════════════════════════════════════════════════════
   9. 사이드바 배너 위젯
═══════════════════════════════════════════════════════════ */

.widget-banner {
  margin: 30px 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

.sidebar .widget-banner,
.sidebar .widget-banner .textwidget,
.sidebar .widget-banner .custom-html-widget {
  padding: 0 !important;
  margin: 0 !important;
}

.widget-banner img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  object-fit: cover !important;
}

.widget-banner a {
  display: block !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
}

/* ═══════════════════════════════════════════════════════════
 /* 10. 헤더 검색창 
═══════════════════════════════════════════════════════════ */

/* 1. 검색창 컨테이너 (기본 설정) */
.site-header .wp-block-search {
  display: flex;
  align-items: center;
  flex: 1;
  width: auto !important;
  max-width: none !important;
  flex-wrap: nowrap !important;
}

/* 2. 입력창 스타일 (공통) */
.site-header .wp-block-search__input,
.site-header .wc-block-product-search__field {
  flex: 1 1 auto !important;   /* 유동적인 너비 */
  width: 100% !important;
  max-width: 350px !important; /* PC에서는 최대 350px까지만 */
  min-width: 0 !important;
}

.site-header #wp-block-search__input-1 {
  border-radius: 5px 0 0 5px;
  border: 1px solid var(--accent);
}

/* 3. 검색 버튼 스타일 */
.site-header button.wp-block-search__button,
.site-header .wc-block-product-search__button {
  flex-shrink: 0 !important;
  padding: 10px 18px !important;
  border: 1px solid var(--accent);
  border-radius: 0 5px 5px 0;
  margin-left: 0;
  overflow: hidden;
  background-color: var(--accent);
  color: var(--dark-blue);
}

/* 📱 4. 모바일 전용 설정 (화면 너비 768px 이하일 때) */
@media (max-width: 768px) {
  /* 검색창 전체 틀을 화면의 90%로 설정하고 가운데 정렬 */
  .site-header .wp-block-search {
    width: 90% !important;      /* 화면의 90% 차지 */
    margin-left: auto !important;  /* 좌우 여백 자동(가운데 정렬) */
    margin-right: auto !important;
  }

  /* 입력창 너비 제한 해제 (90% 박스 안을 가득 채우기 위함) */
  .site-header .wp-block-search__input,
  .site-header .wc-block-product-search__field {
    max-width: none !important; /* 350px 제한을 풀고 유동적으로 늘어남 */
  }
}



/* ═══════════════════════════════════════════════════════════
   11. WooCommerce
═══════════════════════════════════════════════════════════ */

/* 썸네일 비율 유지 */
.woocommerce ul.products li.product a img,
.woocommerce div.product div.images img {
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
}

/* 상품명 */
.single-product .product_title {
  font-size: 25px !important;
  line-height: 1.3;
  font-weight: 700;
}

/* 상품 위젯 */
.woocommerce ul.product_list_widget li a {
  font-weight: 400 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #333;
}

/* ═══════════════════════════════════════════════════════════
   12. 기타
═══════════════════════════════════════════════════════════ */

/* GeneratePress 홈 배경 제거 */
.home.full-width-content .inside-article {
  background: none;
}

/* ═══════════════════════════════════════════════════════════
   위젯에서만 가격 제거
═══════════════════════════════════════════════════════════ */

.widget .woocommerce-Price-amount {
    display: none !important;
}






/* =========================
   기본 메뉴 스타일 20052011
   ========================= */
.widget_nav_menu .menu li {
    list-style: none;
    margin: 0;
    position: relative;
}

.widget_nav_menu .menu a {
    display: block;
    padding: 8px 0;         /* 클릭 영역 확보 */
    font-size: 14px;
    text-decoration: none;
    color: inherit;
    position: relative;
    line-height: 1.5;
}

/* =========================
   부모 메뉴 (아코디언 트리거)
   ========================= */
.widget_nav_menu .menu .menu-item-has-children > a {
    font-weight: 600;
    padding-right: 30px; /* 화살표 공간 확보 */
    cursor: pointer;
}

/* 화살표 (기본: 닫힘 ▶) */
.widget_nav_menu .menu .menu-item-has-children > a::after {
    content: "▶";
    position: absolute;
    right: 0;
    top: 50%;                   /* 상단 50% 지점 */
    transform: translateY(-50%); /* 정확히 수직 중앙 정렬 */
    font-size: 10px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* 화살표 (열림 상태 ▼ - 회전 효과 사용) */
.widget_nav_menu .menu .menu-item-has-children.open > a::after {
    /* 글자를 바꾸는 것보다 회전시키는게 더 부드럽습니다 */
    transform: translateY(-50%) rotate(90deg); 
    opacity: 1;
    color: #333;
}

/* =========================
   트리 구조 (서브 메뉴)
   ========================= */
.widget_nav_menu .menu li ul {
    display: none; /* 기본 숨김 */
    padding-left: 12px;
    margin-left: 6px;
    border-left: 1px solid #ddd; /* 선 두께 조정 */
    margin-top: 5px;
    margin-bottom: 10px;
}

/* 서브 메뉴 항목 */
.widget_nav_menu .menu li ul li a {
    padding: 6px 0 6px 8px;
    font-size: 13.5px;
    opacity: 0.8;
}

.widget_nav_menu .menu li ul li a:hover {
    opacity: 1;
    color: #000;
    font-weight: 500;
}