@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/

/* =========================================
   JAPATHOME 모바일 카테고리 메뉴 최종본
========================================= */

@media screen and (max-width: 1023px) {

  /* 모바일에서는 PC 메뉴 숨김 */
  #navi .navi-in > ul.menu-pc {
    display: none !important;
  }

  /* 모바일 카테고리 3열 × 2행 */
  #navi .navi-in > ul.menu-mobile {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;

    /* 위아래 행 높이 완전히 동일 */
    grid-auto-rows: 46px !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    background: #cc2529 !important;
  }

  /* 각각의 메뉴 칸 */
  #navi .navi-in > ul.menu-mobile > li {
    width: auto !important;
    height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #cc2529 !important;

    /* 은은한 칸 구분선 */
    border-right: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.42) !important;

    box-sizing: border-box !important;
  }

  /* 오른쪽 끝 메뉴는 세로 구분선 제거 */
  #navi .navi-in > ul.menu-mobile > li:nth-child(3n) {
    border-right: none !important;
  }

  /* 아래쪽 3개는 하단 구분선 제거 */
  #navi .navi-in > ul.menu-mobile > li:nth-child(n+4) {
    border-bottom: none !important;
  }

  /* 링크 영역을 메뉴 칸 전체 높이에 정확히 맞춤 */
  #navi .navi-in > ul.menu-mobile > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 4px !important;

    color: #ffffff !important;
    background: #cc2529 !important;

    text-align: center !important;
    text-decoration: none !important;

    box-sizing: border-box !important;
  }

  /* Cocoon 캡션도 정중앙 정렬 */
  #navi .navi-in > ul.menu-mobile .caption-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
  }

  /* 카테고리 설명문 제거 */
  #navi .navi-in > ul.menu-mobile .item-description,
  #navi .navi-in > ul.menu-mobile .sub-caption {
    display: none !important;
  }

  /* 카테고리명 */
  #navi .navi-in > ul.menu-mobile .item-label {
    display: block !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #ffffff !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    text-align: center !important;
    white-space: nowrap !important;
  }

  /* 현재 보고 있는 카테고리 강조 */
  #navi .navi-in > ul.menu-mobile .current-menu-item > a,
  #navi .navi-in > ul.menu-mobile .current-menu-parent > a,
  #navi .navi-in > ul.menu-mobile .current-category-ancestor > a {
    background: #a9181d !important;
  }

  /* 터치/hover 시 살짝 진하게 */
  #navi .navi-in > ul.menu-mobile > li > a:hover,
  #navi .navi-in > ul.menu-mobile > li > a:active {
    background: #b71d22 !important;
  }
}