/*
 * SUNAYAMA WordPress版 - ヘッダーCSS（Bricks対応）
 * makeshop common.css のヘッダー関連ルールを抽出・変換
 *
 * 変換ルール:
 *   header / .header / #header  →  #brx-header
 *   その他のクラスはmakeshopのHTMLと同一のため変更なし
 *
 * 注意:
 *   - input[type="text"] は検索欄スコープに限定（#brx-header 内）
 *   - SP時の nav スタイルは .sp-nav-wrap nav にスコープ限定
 *   - WPCodeBox2（CSS）またはBricks「カスタムCSS」に貼り付けて使用
 */

/* ============================================================
   PC/SP 表示切り替え（makeshopの .pc / .sp クラス再現）
============================================================ */
/* revert = 要素本来の display を維持（img は inline のまま、div は block のまま） */
#brx-header .sp { display: none !important; }
#brx-header .pc { display: revert; }

@media screen and (max-width: 768px) {
  #brx-header .pc { display: none !important; }
  #brx-header .sp { display: revert !important; }
}

/* --- ユーティリティ --- */
.mb30 { margin-bottom: 30px; }

/* --- リスト::markerリセット（ブラウザデフォルト打ち消し）--- */

body {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

#brx-header ul,
#brx-header ol {
  list-style: none;
}
#brx-header li::marker {
  content: none;
}
.navigation .cart-link img {
  vertical-align: baseline;
}
#brx-header ul,
#brx-header ol,
#brx-header dd {
  padding-inline-start: 0;
  /* margin-block-start: 0;
  margin-block-end: 0; */
}
#brx-header button {
  padding: revert;
}
#brx-header button,
#brx-header input,
#brx-header optgroup,
#brx-header select,
#brx-header textarea {
  font-family: revert;
  text-align: revert;
}
#brx-header .input,#brx-header input:not([type=submit]),#brx-header select,#brx-header textarea{
  padding: 0 0;
  vertical-align: middle;
}
#brx-header dl {
    margin-block-start: 0;
    margin-block-end: 0;
}
#brx-header img{
  vertical-align: inherit;
}

/* --- オーバーレイ（SPドロワー背景）--- */
.overlay {
  content: "";
  display: block;
  width: 0;
  height: 0;
  background-color: rgba(0, 0, 0, 0.5) !important;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s;
}
.overlay.open {
  width: 100%;
  height: 100%;
  opacity: 1;
}

/* ============================================================
   PC共通スタイル
============================================================ */

/* --- ヘッダー本体（Bricksリセット上書き含む）--- */
#brx-header {
  z-index: 999;
  padding: 0;
  background: #fff;
  font-size: 14px;
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1;
  color: #4d4d4d;
  box-sizing: border-box;
}
#brx-header *,
#brx-header *::before,
#brx-header *::after {
  box-sizing: border-box;
  /* line-height: inherit; */
}
#brx-header a:hover {
  text-decoration: none;
}

/* --- トップバー --- */
.top-bar {
  z-index: 999;
  margin: 0;
}
@-moz-document url-prefix() {
  .top-bar {
    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.4);
  }
}

/* --- ヘッダーインナー --- */
.header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* --- ロゴ --- */
.logo-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shop-logo {
  margin: 12px 0 15px;
}
.shop-logo img {
  max-height: 57px;
}

/* --- ヘッダーコンテンツバー（送料・決済・検索） --- */
.header-content {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
}
.header-content .header-shipping {
  margin-right: 10px;
}
.header-content .header-shipping p {
  letter-spacing: 2px;
}
.header-content .header-shipping p span {
  font-weight: bold;
  color: #8dbe17;
}
.header-content .pay {
  font-size: 12px;
  background: #f2f2f2;
  line-height: 20px;
  height: 20px;
  padding: 0 5px;
  margin-right: 3px;
}

/* --- ユーザーナビ（second-nav） --- */
.second-nav {
  display: flex;
  float: right;
  margin-bottom: 10px;
}
.second-nav li span {
  padding: 0 0 0 30px;
  font-size: 12px;
  color: #4d4d4d;
}
.second-nav li span::before {
  content: "";
  background: url(https://gigaplus.makeshop.jp/sunayamasoc/img/pc/h-nav1.png) no-repeat;
  width: 15px;
  height: 15px;
  display: inline-block;
  margin-right: 4px;
}
.second-nav li:nth-child(2) span::before {
  background: url(https://gigaplus.makeshop.jp/sunayamasoc/img/pc/h-nav4.png) no-repeat;
  width: 15px;
  height: 11px;
}
.second-nav li:nth-child(3) span::before {
  background: url(https://gigaplus.makeshop.jp/sunayamasoc/img/pc/h-nav2.png) no-repeat;
  width: 12px;
  height: 15px;
}
.second-nav li:nth-child(4) span::before {
  background: url(https://gigaplus.makeshop.jp/sunayamasoc/img/pc/h-nav3.png) no-repeat;
  width: 15px;
  height: 14px;
  position: relative;
  top: 2px;
  margin-right: 2px;
}
.second-nav img {
  display: block;
  margin: 0 auto 6px;
}

/* --- SP用要素をPC時に非表示 --- */
.sp-nav-wrap {
  display: none;
}
.sp-second-nav-wrap {
  display: none;
}

/* --- カートバッジ --- */
span.cart-badge {
  background: #fff;
  color: #fff;
  padding: 5px 7px !important;
  font-size: 12px !important;
  font-family: "Noto Sans JP", sans-serif;
  border-radius: 100%;
  position: absolute;
  top: 3px;
  right: 30px;
}

/* --- グローバルナビ（.navigation / .gnav）--- */
.gnav {
  background: #f7f4f0;
}
.nav {
  width: 100%;
  display: flex;
  margin: 0 auto;
  max-width: 1200px;
  justify-content: space-between;
}
.navigation ul li a span {
  font-size: 10px;
  font-weight: normal;
  color: #8dbe17;
  margin-top: 7px;
  display: block;
}
.navigation > div > .nav > li {
  width: calc(100% / 6);
  text-align: center;
  position: relative;
}
.navigation > div > .nav > li::before {
  content: "";
  width: 1px;
  height: 16px;
  background: #c7b399;
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
}
.navigation > div > .nav > li:hover {
  background: #e3d9cc;
}
.navigation ul .cart-link {
  background: #d1e5a2;
}
.navigation ul .cart-link:hover {
  background: #d1e5a2;
  opacity: 0.8;
}
.navigation ul .cart-link span {
  font-weight: bold;
  font-size: 14px;
  color: #564d49;
}
.navigation li.cart-link span {
  display: inline-block !important;
  font-weight: bold;
  font-size: 14px;
  color: #564d49;
}
.navigation ul .cart-link img {
  position: relative;
  top: 3px;
  left: -3px;
}
.navigation > div > .nav > li > a {
  transition: border 0.5s ease 0s;
  text-align: center;
  font-size: 14px;
  padding: 7px 0;
  display: block;
}
.navigation .drop-nv-wrap {
  display: none;
  position: absolute;
  top: 16px;
  z-index: -1;
}
.navigation .drop-nv-wrap ul {
  line-height: 1.4em;
  padding: 30px 0;
  overflow: scroll;
  overflow-x: auto;
  max-height: 80%;
  position: fixed;
  background-color: #f5f5f5;
}
.navigation .drop-nv-wrap ul li {
  text-align: left;
  margin: 12px 32px 0 0 !important;
  padding-left: 15px;
}
.navigation .drop-nv-wrap ul li a {
  padding: 0 0 0 12px !important;
  display: inline-block;
}
.dropdown-menu-list a:hover {
  text-decoration: underline !important;
}
.dropdown-menu-list a:before {
  content: "-";
  padding-right: 6px;
  vertical-align: text-top;
  font-weight: bold;
}

/* --- ドロップダウン開閉アイコン --- */
.article-title,
.article-title-pc {
  position: relative;
}
.article-title:after {
  content: "";
  position: absolute;
  right: 13px;
  top: 35%;
  transition: all 0.2s ease-in-out;
  display: block;
  width: 10px;
  height: 10px;
  border-top: solid 1px #c4a27a;
  border-right: solid 1px #c4a27a;
  -webkit-transform: rotate(135deg);
  transform: rotate(135deg);
}
.article-title.open:after,
.article-title-pc.open:after {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  top: 57%;
}

/* --- PC検索バー（スコープ限定）--- */
.header-content .search {
  float: right;
  position: relative;
  margin-left: 15px;
}
.header-content .search-icon {
  margin: 0;
  cursor: pointer;
  position: absolute;
  top: 3px;
  right: 5px;
}
.header-content input[type="text"] {
  padding: 3px 30px 3px 3px;
  border: 1px solid #ccc;
  outline: none;
  width: 295px;
  height: 26px;
}
@media screen and (max-width: 1024px) {
  .header-content input[type="text"] {
    width: 270px;
  }
}

/* ============================================================
   SP（768px以下）
============================================================ */
@media screen and (max-width: 768px) {
  #brx-header {
    padding: 0;
    width: 100%;
  }
  .top-bar {
    padding: 0;
    min-height: 54px;
  }
  .header-inner {
    padding: 0 10px;
  }
  .h-nav-wrap {
    display: none;
  }
  .logo-wrap {
    justify-content: center;
    height: 55px;
  }
  .shop-logo {
    margin: 0;
    float: none;
    text-align: center;
  }
  .shop-logo img {
    max-height: unset;
    width: 100px;
  }
  .nav,
  .second-nav {
    display: none;
  }

  /* --- ハンバーガーメニュー --- */
  .sp-nav-wrap {
    display: block;
  }
  .menu-trigger {
    display: inline-block;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    cursor: pointer;
    position: fixed;
    top: 18px;
    left: 16px;
    z-index: 100;
  }
  .menu-trigger span {
    display: inline-block;
    box-sizing: border-box;
    position: absolute;
    left: 0;
    width: 80%;
    height: 1.5px;
    background-color: #564d49;
    transition: all 0.5s;
  }
  .menu-trigger.active span {
    background-color: #6e6e6e;
  }
  .menu-trigger span:nth-of-type(1) { top: 0px; }
  .menu-trigger.active span:nth-of-type(1) { transform: translateY(12px) rotate(-45deg); }
  .menu-trigger span:nth-of-type(2) { top: 8px; }
  .menu-trigger.active span:nth-of-type(2) { opacity: 0; }
  .menu-trigger span:nth-of-type(3) { bottom: 10px; }
  .menu-trigger.active span:nth-of-type(3) { transform: translateY(-4px) rotate(45deg); }

  /* --- SPドロワーナビ --- */
  .sp-nav-wrap nav {
    width: 300px;
    height: 100%;
    padding-top: 50px;
    background: #fff !important;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    transform: translate(-300px);
    transition: all 0.5s;
  }
  .sp-nav-wrap nav.open {
    transform: translate(0, 0);
    overflow: scroll;
    overflow-x: hidden;
    height: 100%;
  }
  .sp-nav-wrap nav.open ul {
    margin: 0 15px;
  }
  .sp-nav-wrap nav li {
    color: #6e6e6e;
    text-align: left;
  }
  .sp-nav-wrap nav li > a {
    font-size: 16px;
    display: block;
    padding: 15px 10px;
    border-bottom: 1px solid #f2f1f1;
    color: #4d4d4d;
    position: relative;
  }
  .sp-nav-wrap nav li > a::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 39%;
    transition: all 0.2s ease-in-out;
    display: block;
    width: 10px;
    height: 10px;
    border-top: solid 1px #c4a27a;
    border-right: solid 1px #c4a27a;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
  }

  /* --- SNSリンク --- */
  .side-sns {
    display: flex;
    margin: 0 auto !important;
    justify-content: center;
    width: 100%;
  }
  .side-sns li {
    height: 28px;
    margin: 0 5px;
  }
  .side-sns li a {
    padding: 0;
    border-bottom: 0 !important;
  }
  .side-sns li img {
    height: 28px !important;
    width: auto;
  }

  /* --- SP検索バー --- */
  .sp-search {
    padding: 4px 15px;
    background: #f7f4f0;
  }
  dl.search1 {
    position: relative;
    background-color: #fff;
    border: 1px solid #ccc;
  }
  dl.search1 dt {
    padding: 5px 30px 5px 5px;
    height: 35px;
  }
  dl.search1 dt input {
    border: none;
    border-radius: 0;
    outline: none;
    background: none;
    height: 100%;
    width: 100%;
  }
  dl.search1 dd {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
  }
  dl.search1 dd img { width: 100%; }
  dl.search1 dd button {
    display: block;
    background: none;
    border: none;
  }
  dl.search1 dd button span {
    display: block;
    width: 20px;
    height: 20px;
  }

  /* --- SPカートリンク --- */
  .sp-second-nav-wrap {
    display: flex;
    position: absolute;
    top: 18px;
    right: 16px;
  }
  .cart-link {
    margin-left: 16px;
  }
  .cart-link img {
    height: 22px;
  }

  /* --- アコーディオン（SPナビ） --- */
  .accordion-container {
    position: relative;
    width: 100%;
    cursor: pointer;
    margin: 0;
  }
  .accordion-container .article-title {
    display: block;
    position: relative;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    color: #4d4d4d;
    padding: 15px 10px;
    font-size: 16px;
    border-bottom: 1px solid #f2f1f1;
  }
  .accordion-content {
    display: none;
    padding: 0;
    font-family: "Noto Sans JP", sans-serif;
  }
  .accordion-content p a {
    position: relative;
    padding: 15px 15px 15px 30px;
    text-align: left;
    display: block;
    background: #f4f0eb;
    margin-bottom: 1px;
    font-size: 14px;
    color: #4d4d4d;
  }
  .accordion-content p a::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 39%;
    transition: all 0.2s ease-in-out;
    display: block;
    width: 10px;
    height: 10px;
    border-top: solid 1px #c4a27a;
    border-right: solid 1px #c4a27a;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
  }
  .accordion-content p.categorySwitch a::after {
    -webkit-transform: rotate(135deg);
    transform: rotate(135deg);
  }
  .accordion-content p.categorySwitch.open a::after {
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
  }
  p.dropdown-menu-list > a {
    background: #f9f7f5 !important;
    padding-left: 45px;
  }
  .dropdown-menu-list a:before {
    content: "";
  }
}
