/*
Theme Name: GeneratePress Books
Theme URI: https://suzuki-books.com
Description: Child theme for Suzuki Books based on GeneratePress.
Author: Suzuki Books
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-books
*/

/* =========================================================
   Suzuki Books / GeneratePress
   旧サイト風：濃紺 + ゴールド + 白カード
========================================================= */

:root {
  --sb-main: #0C0516;
  --sb-main-hover: #1a1247;
  --sb-accent: #FFD700;
  --sb-bg: #f0f0f0;
  --sb-white: #ffffff;
  --sb-border: #dcdcdc;
  --sb-text: #333333;
  --sb-red: #D32F2F;
}

/* =========================================================
   1. 全体
========================================================= */

body {
  background: var(--sb-bg);
  color: var(--sb-text);
}

.site,
.site-content {
  background: var(--sb-bg);
}

.site-content {
  padding-top: 16px;
  padding-bottom: 32px;
}

.inside-article,
.sidebar .widget,
.woocommerce .site-main,
.separate-containers .inside-article {
  background: var(--sb-white);
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.separate-containers .inside-article {
  padding: 20px;
}

.sidebar .widget {
  padding: 14px;
}

/* =========================================================
   2. ヘッダー上段：サイトタイトル / 商品検索 / アカウント
========================================================= */

.site-header {
  background: var(--sb-bg);
  margin-bottom: 0;
}

.site-header .inside-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-branding,
.site-logo {
  flex: 0 0 25%;
  max-width: 25%;
}

.main-title {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0;
}

.main-title a,
.site-branding .main-title a {
  color: var(--sb-main) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.main-title a:hover,
.site-branding .main-title a:hover {
  color: var(--sb-accent) !important;
}

.site-description {
  margin-top: 4px;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sb-header-tools {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
}

.sb-header-search {
  flex: 0 1 520px;
  max-width: 520px;
  width: 100%;
}

.sb-header-search .woocommerce-product-search {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}

.sb-header-search .search-field {
  flex: 1 1 auto;
  height: 42px;
  padding: 10px 12px;
  border: 1px solid #bcbcbc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

/* 検索ボタン：旧サイト風の虫眼鏡アイコン */
.sb-header-search button[type="submit"] {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid #666;
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.sb-header-search button[type="submit"]::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='white' stroke-width='2'/%3E%3Cpath d='M16 16L21 21' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.sb-header-search button[type="submit"]:hover {
  background: #444;
  color: #fff;
}

/* マイアカウント：ボタンではなく薄いグレーのリンク */
.sb-header-account {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-left: auto;
  white-space: nowrap;
}

.sb-account-link {
  display: inline-block;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: #7a7a7a !important;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
}

.sb-account-link:hover {
  background: transparent !important;
  color: #444 !important;
  text-decoration: underline;
}

/* =========================================================
   3. メインナビ：メニュー / 旧サイト風買い物かご
========================================================= */

.main-navigation {
  background: var(--sb-main);
  clear: both;
}

.main-navigation,
.main-navigation .inside-navigation {
  min-height: 42px !important;
  height: 42px !important;
}

.main-navigation .inside-navigation {
  display: flex !important;
  align-items: center !important;
}

.main-navigation .main-nav {
  flex: 1 1 auto;
}

.main-navigation .main-nav,
.main-navigation .main-nav > ul,
.main-navigation .main-nav ul li {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

.main-navigation .main-nav ul li a {
  height: 42px !important;
  min-height: 42px !important;
  line-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  color: #fff;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
  background: var(--sb-main-hover);
  color: var(--sb-accent);
}

.main-navigation .menu-bar-items {
  flex: 0 0 auto;
  margin-left: auto;
  height: 42px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

.main-navigation .menu-bar-item {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

/* 買い物かご：旧サイト風 */
.sb-nav-cart {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

.sb-nav-cart-link {
  width: 235px;
  height: 42px !important;
  min-height: 42px !important;
  line-height: 42px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #090011;
  color: #ffffff !important;
  text-decoration: none !important;
  white-space: nowrap;
  box-sizing: border-box;
}

.sb-nav-cart-link:hover {
  background: #120326;
  color: #ffffff !important;
}

.sb-nav-cart-info {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

.sb-nav-cart-total {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 38px;
}

.sb-nav-cart-total .woocommerce-Price-amount,
.sb-nav-cart-total .woocommerce-Price-currencySymbol {
  color: inherit;
}

/* 旧簡易表示の黄色丸を完全に無効化 */
.sb-nav-cart-count {
  display: inline !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 0 8px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #9b9b9b !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 38px !important;
}

.sb-nav-cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 38px;
  margin-left: 12px;
  color: #ffffff;
}

.sb-nav-cart-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

button.menu-toggle,
button.menu-toggle:hover {
  color: #ffffff;
}

.mobile-menu-control-wrapper .menu-toggle,
.mobile-menu-control-wrapper .menu-toggle:hover,
.has-inline-mobile-toggle #site-navigation.toggled {
  background: var(--sb-main);
}

/* =========================================================
   4. 見出し
========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--sb-main);
}

.entry-title {
  color: var(--sb-main);
}

.wp-block-heading,
.entry-content h2,
.woocommerce-products-header__title {
  font-size: 1.4em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25em;
  margin-bottom: 1em;
  font-weight: bold;
  color: var(--sb-main);
}

/* =========================================================
   5. リンク・ボタン
========================================================= */

a {
  color: var(--sb-main);
}

a:hover {
  color: var(--sb-main-hover);
}

button,
html input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button:not(.is-link) {
  background: var(--sb-main);
  border-color: var(--sb-main);
  color: #ffffff;
  border-radius: 5px;
}

button:hover,
html input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wc-block-components-button:not(.is-link):hover {
  background: var(--sb-main-hover);
  border-color: var(--sb-main-hover);
  color: var(--sb-accent);
}

/* =========================================================
   6. WooCommerce 商品一覧
========================================================= */

.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  box-sizing: border-box;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none !important;
}

.woocommerce ul.products li.product {
  width: auto !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  min-width: 0;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.10);
}

.woocommerce ul.products li.product img {
  max-width: 100%;
  height: auto;
  background: #f5f5f5;
  border-radius: 4px;
  margin-bottom: 10px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  min-height: 5.6em;
  overflow: hidden;
  color: var(--sb-main);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.woocommerce ul.products li.product .price {
  color: var(--sb-red);
  font-weight: 700;
}

.woocommerce ul.products li.product a.button {
  color: #ffffff;
}

.woocommerce ul.products li.product a.button:hover {
  color: var(--sb-accent);
}

/* =========================================================
   7. 商品詳細
========================================================= */

.single-product .inside-article > .featured-image,
.single-product .page-header-image-single {
  display: none;
}

.single-product .entry-content,
.single-product div.product {
  display: flow-root;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.single-product .entry-content::after,
.single-product div.product::after {
  content: "";
  display: table;
  clear: both;
}

.single-product div.product .woocommerce-product-gallery,
.single-product div.product .summary {
  box-sizing: border-box;
  max-width: 100%;
}

.single-product div.product .woocommerce-product-gallery img {
  max-width: 100%;
  height: auto;
}

.single-product div.product .product_title {
  color: var(--sb-main);
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25em;
}

.single-product div.product p.price,
.single-product div.product span.price {
  color: var(--sb-red);
  font-weight: 700;
}

.summary.entry-summary p {
  margin: 2px 0;
}

.single-product div.product form.cart .button,
.single-product div.product form.cart button.single_add_to_cart_button,
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart button.single_add_to_cart_button {
  background: var(--sb-main) !important;
  border-color: var(--sb-main) !important;
  color: #ffffff !important;
  border-radius: 5px !important;
  font-weight: 700;
}

.single-product div.product form.cart .button:hover,
.single-product div.product form.cart button.single_add_to_cart_button:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
  background: var(--sb-main-hover) !important;
  border-color: var(--sb-main-hover) !important;
  color: var(--sb-accent) !important;
}

.additional-product-info {
  clear: both;
  margin: 20px 0 40px;
  padding: 20px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
}

.additional-product-info h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.additional-product-info p {
  margin: 5px 0;
}

/* =========================================================
   8. サイドバー
========================================================= */

.sidebar .widget-title {
  color: var(--sb-main);
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.sidebar .widget a {
  color: var(--sb-main);
}

.sidebar .widget a:hover {
  color: var(--sb-main-hover);
}

.widget_product_search form {
  display: flex;
  align-items: center;
  width: 100%;
}

.widget_product_search input.search-field {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
}

.widget_product_search button[type="submit"] {
  width: auto;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: var(--sb-main);
  color: #fff;
  cursor: pointer;
}

.widget_product_search button[type="submit"]:hover {
  background: var(--sb-main-hover);
  color: var(--sb-accent);
}

/* =========================================================
   9. サイドバー商品カテゴリ：アコーディオン
========================================================= */

.sidebar .wc-block-product-categories {
  margin: 0;
}

.sidebar .wc-block-product-categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .wc-block-product-categories-list-item {
  position: relative;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #eeeeee;
}

.sidebar .wc-block-product-categories-list-item:last-child {
  border-bottom: none;
}

.sidebar .wc-block-product-categories-list-item > a {
  display: block;
  min-height: 42px;
  padding: 11px 76px 11px 12px;
  color: var(--sb-main);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  box-sizing: border-box;
}

.sidebar .wc-block-product-categories-list-item > a:hover {
  background: #f6f6f6;
  color: var(--sb-main-hover);
}

/* 商品数 */
.sidebar .wc-block-product-categories-list-item-count {
  position: absolute;
  top: 9px;
  right: 42px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #666666;
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  box-sizing: border-box;
}

/* 開閉ボタン */
.sidebar .sb-category-toggle {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #ffffff;
  color: var(--sb-main);
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
}

.sidebar .sb-category-toggle:hover {
  background: var(--sb-main);
  border-color: var(--sb-main);
  color: #ffffff;
}

/* 子カテゴリ：初期状態は閉じる */
.sidebar .wc-block-product-categories-list-item > ul {
  display: none;
}

/* 開いている状態 */
.sidebar .wc-block-product-categories-list-item.is-open > ul {
  display: block;
}

/* 子カテゴリ領域 */
.sidebar .wc-block-product-categories-list--depth-1 {
  margin: 0;
  padding: 4px 0 8px 10px;
  border-left: 3px solid #eeeeee;
  background: #fafafa;
}

/* 子カテゴリ行 */
.sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item {
  border-bottom: none;
}

.sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item > a {
  min-height: 34px;
  padding: 7px 64px 7px 12px;
  color: #555555;
  font-size: 13px;
  font-weight: 600;
}

.sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item > a:hover {
  background: #ffffff;
  color: var(--sb-main);
}

.sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item-count {
  top: 5px;
  right: 42px;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid #dddddd;
}

/* 現在表示中のカテゴリは少し背景色 */
.sidebar .wc-block-product-categories-list-item.is-open > a {
  background: #f8f8f8;
}

/* アダルトカテゴリは少し控えめな注意色 */
.sidebar a[href*="/product-category/adult/"] {
  color: #5a2440;
}

.sidebar a[href*="/product-category/adult/"]:hover {
  color: #3f1730;
}

/* =========================================================
   10. フォーム
========================================================= */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sb-main-hover);
  box-shadow: 0 0 8px rgba(26, 18, 71, 0.18);
  background: #fff;
  outline: none;
}

/* =========================================================
   11. ページネーション
========================================================= */

.pagination .page-numbers,
.woocommerce-pagination .page-numbers {
  color: var(--sb-main);
}

.pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current {
  background: var(--sb-main);
  border-color: var(--sb-main);
  color: #ffffff;
}

.pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers:hover {
  background: var(--sb-main-hover);
  color: #ffffff;
}

/* =========================================================
   12. カートページ
========================================================= */

.woocommerce-cart .inside-article,
.woocommerce-cart .entry-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block,
.woocommerce-cart .wc-block-cart,
.woocommerce-cart .wc-block-components-sidebar-layout,
.woocommerce-cart .wc-block-components-main,
.woocommerce-cart .wc-block-components-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block > * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.woocommerce-cart .wc-block-cart-items,
.woocommerce-cart .wc-block-cart-items__row,
.woocommerce-cart .wc-block-components-totals-wrapper,
.woocommerce-cart .wc-block-components-totals-item,
.woocommerce-cart .wc-block-components-totals-footer-item,
.woocommerce-cart .wc-block-cart__submit-container,
.woocommerce-cart .wc-block-cart__submit-button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.woocommerce-cart .wc-block-cart-item__wrap,
.woocommerce-cart .wc-block-cart-item__product {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.woocommerce-cart .wc-block-grid,
.woocommerce-cart .wp-block-product-new,
.woocommerce-cart .wc-block-product-new {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

.woocommerce-cart .wc-block-grid__products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-cart .wc-block-grid__product {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  margin: 0 !important;
  padding: 10px !important;
  box-sizing: border-box !important;
}

.woocommerce-cart .wc-block-grid__product-image img {
  max-width: 100% !important;
  height: auto !important;
}

/* =========================================================
   13. チェックアウトページ
========================================================= */

.woocommerce-checkout .inside-article,
.woocommerce-checkout .entry-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.woocommerce-checkout .entry-content > .wp-block-woocommerce-checkout.alignwide,
.woocommerce-checkout .entry-content > .wp-block-woocommerce-checkout.alignfull {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .wp-block-woocommerce-checkout,
.woocommerce-checkout .wc-block-checkout {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .wc-block-components-sidebar-layout,
.woocommerce-checkout .wc-block-components-sidebar-layout.is-large {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px !important;
  gap: 32px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  align-items: start;
}

.woocommerce-checkout .wc-block-components-main {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .wc-block-components-sidebar {
  width: auto !important;
  max-width: 320px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .wc-block-components-sidebar > *,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block,
.woocommerce-checkout .wc-block-components-checkout-order-summary__content,
.woocommerce-checkout .wc-block-components-order-summary,
.woocommerce-checkout .wc-block-components-totals-wrapper,
.woocommerce-checkout .wc-block-components-totals-item {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .wc-block-components-order-summary-item,
.woocommerce-checkout .wc-block-components-order-summary-item__description,
.woocommerce-checkout .wc-block-components-product-name {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere;
  box-sizing: border-box !important;
}

.woocommerce-checkout input,
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-checkout .components-text-control__input,
.woocommerce-checkout .wc-block-components-text-input input,
.woocommerce-checkout .wc-block-components-select select,
.woocommerce-checkout .wc-blocks-components-select__select {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* =========================================================
   14. WooCommerce パスワード再設定フォーム
========================================================= */

.woocommerce form.woocommerce-ResetPassword.lost_reset_password {
  max-width: 360px !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

/* WooCommerce標準の2カラムfloatを解除 */
.woocommerce form.woocommerce-ResetPassword.lost_reset_password p.form-row,
.woocommerce form.woocommerce-ResetPassword.lost_reset_password p.form-row-first,
.woocommerce form.woocommerce-ResetPassword.lost_reset_password p.form-row-last,
.woocommerce form.woocommerce-ResetPassword.lost_reset_password .woocommerce-form-row {
  float: none !important;
  clear: both !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 1.25em !important;
  box-sizing: border-box !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password > p:first-child {
  margin-top: 0;
  line-height: 1.7;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password label {
  display: block !important;
  margin-bottom: 0.45em !important;
  font-weight: 600;
  line-height: 1.5 !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password .password-input {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password .password-input input,
.woocommerce form.woocommerce-ResetPassword.lost_reset_password input[type="password"],
.woocommerce form.woocommerce-ResetPassword.lost_reset_password input.input-text {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 44px;
  padding-right: 3em !important;
  box-sizing: border-box !important;
  transition: none !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password .show-password-input {
  position: absolute !important;
  top: 50% !important;
  right: 0.85em !important;
  transform: translateY(-50%) !important;
  width: 1.6em !important;
  height: 1.6em !important;
  min-width: 1.6em !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password #password_strength,
.woocommerce form.woocommerce-ResetPassword.lost_reset_password .woocommerce-password-strength {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 2.4em !important;
  margin: 0.6em 0 0 !important;
  clear: both !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  transition: none !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password .woocommerce-password-hint {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0.5em !important;
  clear: both !important;
  box-sizing: border-box !important;
  line-height: 1.6 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password .clear {
  display: none !important;
}

.woocommerce form.woocommerce-ResetPassword.lost_reset_password button[type="submit"] {
  min-width: 120px;
}

/* =========================================================
   15. マイアカウント画面
========================================================= */

/* WooCommerce標準のfloatレイアウトを解除して、横並びに作り直す */
.woocommerce-account .entry-content > .woocommerce {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 左側ナビゲーション */
.woocommerce-account .woocommerce-MyAccount-navigation {
  float: none !important;
  width: 240px !important;
  flex: 0 0 240px;
  margin: 0 !important;
  background: #ffffff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  box-sizing: border-box;
  order: 1;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
  margin: 0;
  border-bottom: 1px solid #eeeeee;
}

.woocommerce-account .woocommerce-MyAccount-navigation li:last-child {
  border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 13px 16px;
  color: #1f1730;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  background: #ffffff;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
  background: #f5f3f7;
  color: #2a2140;
}

/* 現在表示中のメニュー */
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: #2a2140;
  color: #ffffff;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a:hover {
  background: #352a52;
  color: #ffffff;
}

/* ログアウトだけ少し控えめ */
.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
  color: #666666;
}

/* 右側コンテンツ */
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  background: #ffffff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  box-sizing: border-box;
  order: 2;
}

.woocommerce-account .woocommerce-MyAccount-content p:first-child {
  margin-top: 0;
}

.woocommerce-account .woocommerce-MyAccount-content p:last-child {
  margin-bottom: 0;
}

/* 本文内の通常リンク */
.woocommerce-account .woocommerce-MyAccount-content a:not(.button) {
  background: transparent;
  color: #1f1730;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.woocommerce-account .woocommerce-MyAccount-content a:not(.button):hover {
  color: #4a3a68;
}

/* 注文一覧などのテーブル */
.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
  width: 100%;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
  padding: 12px;
  border-bottom: 1px solid #eeeeee;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table tr:last-child th,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table tr:last-child td {
  border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table th {
  background: #f7f7f7;
  color: var(--sb-main);
  font-weight: 700;
}

/* 注文一覧テーブルの操作ボタン */
.woocommerce-account .woocommerce-MyAccount-content table.shop_table .button,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table a.button,
.woocommerce-account .woocommerce-MyAccount-orders .button,
.woocommerce-account .woocommerce-orders-table .button,
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: auto;
  margin: 2px 4px 2px 0;
  padding: 0.45em 0.85em !important;
  border: 1px solid #d8d4dc !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #2a2140 !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.3 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table .button:hover,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table a.button:hover,
.woocommerce-account .woocommerce-MyAccount-orders .button:hover,
.woocommerce-account .woocommerce-orders-table .button:hover,
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button:hover {
  background: #f5f3f7 !important;
  border-color: #bdb6c8 !important;
  color: #0c0516 !important;
  box-shadow: none !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions,
.woocommerce-account table.shop_table td.woocommerce-orders-table__cell-order-actions {
  white-space: normal;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions a {
  margin-bottom: 4px;
}

/* 通知ボックス内のボタン */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-notice .button,
.woocommerce-account .woocommerce-MyAccount-content .wc-forward {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 0.55em 1em !important;
  border: 1px solid #d8d4dc !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #2a2140 !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.3 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-notice .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .wc-forward:hover {
  background: #f5f3f7 !important;
  border-color: #bdb6c8 !important;
  color: #0c0516 !important;
  box-shadow: none !important;
}

/* 通知ボックス内のボタン位置 */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message .button {
  float: right;
  margin-left: 1em;
}

/* 住所カード */
.woocommerce-account .woocommerce-Address {
  background: #ffffff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  box-sizing: border-box;
}

.woocommerce-account .woocommerce-Address-title h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* フォーム周り */
.woocommerce-account .woocommerce-MyAccount-content fieldset {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
}

.woocommerce-account .woocommerce-MyAccount-content legend {
  padding: 0 6px;
  color: var(--sb-main);
  font-weight: 700;
}

/* =========================================================
   16. フロントページ：共通
========================================================= */

.home .inside-article {
  padding: 24px;
}

.sb-front-section {
  margin-bottom: 42px;
}

.sb-front-section:last-child {
  margin-bottom: 0;
}

.sb-front-section h2 {
  color: var(--sb-main);
  font-size: 1.5rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.35em;
  margin-bottom: 12px;
}

.sb-front-lead {
  margin-bottom: 20px;
  color: #555;
}

/* =========================================================
   17. フロントページ：新着商品
========================================================= */

.sb-front-products {
  display: grid;
  gap: 18px;
}

.sb-front-products.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sb-front-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sb-front-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.10);
}

.sb-front-product-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.sb-front-product-image {
  margin-bottom: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.sb-front-product-image img {
  width: 100%;
  height: auto;
  display: block;
}

.sb-front-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--sb-main);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
  min-height: 0;
}

.sb-front-product-price {
  color: var(--sb-red);
  font-weight: 700;
}

.sb-front-product-card::after {
  content: "";
  display: block;
  flex: 1 1 auto;
}

/* =========================================================
   18. フロントページ：おすすめ商品 横スクロール
========================================================= */

.sb-featured-products-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.sb-featured-product-card {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  scroll-snap-align: start;
}

.sb-featured-product-card:hover {
  box-shadow: 0 5px 16px rgba(0,0,0,0.10);
}

.sb-featured-product-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.sb-featured-product-image {
  margin-bottom: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.sb-featured-product-image img {
  width: 100%;
  height: auto;
  display: block;
}

.sb-featured-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--sb-main);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
}

.sb-featured-product-price {
  color: var(--sb-red);
  font-weight: 700;
}

/* =========================================================
   19. 商品カード共通：カート追加ボタン
   新着商品・おすすめ商品の「追加」「買い物かごを表示」共通スタイル
========================================================= */

.sb-front-product-button,
.sb-featured-product-button {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.45rem !important;
  width: 100% !important;
  margin-top: 12px !important;
  text-align: center !important;
}

/* 通常の「お買い物カゴに追加」ボタン */
.sb-front-product-button a.button,
.sb-front-product-button .button,
.sb-front-product-button .add_to_cart_button,
.sb-featured-product-button a.button,
.sb-featured-product-button .button,
.sb-featured-product-button .add_to_cart_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 140px !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0.65em 1em !important;
  border-radius: 5px !important;
  background: var(--sb-main) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  white-space: normal !important;
}

.sb-front-product-button a.button:hover,
.sb-front-product-button .button:hover,
.sb-front-product-button .add_to_cart_button:hover,
.sb-featured-product-button a.button:hover,
.sb-featured-product-button .button:hover,
.sb-featured-product-button .add_to_cart_button:hover {
  background: var(--sb-main-hover) !important;
  color: var(--sb-accent) !important;
}

/* Ajax追加後に出る「買い物かごを表示」 */
.sb-front-product-button a.added_to_cart,
.sb-front-product-button a.added_to_cart.wc-forward,
.sb-featured-product-button a.added_to_cart,
.sb-featured-product-button a.added_to_cart.wc-forward {
  display: inline-flex !important;
  float: none !important;
  clear: both !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 140px !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0.62em 1em !important;
  border: 1px solid #d8d4dc !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #2a2140 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.sb-front-product-button a.added_to_cart:hover,
.sb-front-product-button a.added_to_cart.wc-forward:hover,
.sb-featured-product-button a.added_to_cart:hover,
.sb-featured-product-button a.added_to_cart.wc-forward:hover {
  background: #f5f3f7 !important;
  border-color: #bdb6c8 !important;
  color: #0c0516 !important;
}

/* =========================================================
   20. フロントページ：商品カテゴリ
========================================================= */

.sb-book-category-section {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sb-book-category-section + .sb-book-category-section {
  margin-top: 18px;
}

.sb-category-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
}

.sb-category-section-title {
  margin: 0;
  color: var(--sb-main);
  font-size: 1.15rem;
  font-weight: 700;
}

.sb-category-section-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--sb-main);
  text-decoration: none;
  white-space: nowrap;
}

.sb-category-section-more:hover {
  color: var(--sb-main-hover);
}

.sb-category-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sb-category-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  color: var(--sb-main);
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sb-category-card:hover {
  color: var(--sb-main);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.10);
}

/* 画像ありカード */
.sb-category-card.has-image {
  justify-content: flex-start;
}

.sb-category-card-thumb {
  display: none;
}

.sb-category-card.has-image .sb-category-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: #f5f5f5;
  overflow: hidden;
  flex: 0 0 auto;
  border-bottom: 1px solid #eeeeee;
}

.sb-category-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

/* 文字欄 */
.sb-category-card-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px 4px;
  color: var(--sb-main);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
}

/* 旧HTML対策 */
.sb-category-card-count {
  display: none;
}

.sb-category-card-placeholder {
  display: none;
}

/* 画像なしカード */
.sb-category-card:not(.has-image) {
  min-height: 108px;
  justify-content: center;
}

.sb-category-card:not(.has-image) .sb-category-card-name {
  min-height: 0;
  padding: 0 8px;
}

/* =========================================================
   21. フロントページ：新着情報
========================================================= */

.sb-news-list {
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  overflow: hidden;
}

.sb-news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sb-border);
}

.sb-news-item:last-child {
  border-bottom: none;
}

.sb-news-date {
  color: #666;
  font-size: 13px;
  white-space: nowrap;
}

.sb-news-title {
  color: var(--sb-main);
  font-weight: 700;
  text-decoration: none;
}

.sb-news-title:hover {
  color: var(--sb-main-hover);
  text-decoration: underline;
}

/* =========================================================
   22. サイト情報セクション（全ページ共通）
========================================================= */

.sb-common-info {
  background: var(--sb-bg);
  padding: 0 0 32px;
}

.sb-common-info-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.sb-common-info h2 {
  color: var(--sb-main);
  font-size: 1.4em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25em;
  margin-bottom: 1em;
  font-weight: bold;
}

.sb-info-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.sb-info-column {
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 6px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sb-info-column h3 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ccc;
  color: var(--sb-main);
  font-size: 1.05rem;
}

.sb-info-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sb-info-column li {
  border-bottom: 1px solid #eee;
}

.sb-info-column li:last-child {
  border-bottom: none;
}

.sb-info-column a {
  display: block;
  padding: 10px 0;
  color: var(--sb-main);
  text-decoration: none;
  font-weight: 700;
}

.sb-info-column a:hover {
  color: var(--sb-main-hover);
  text-decoration: underline;
}

/* =========================================================
   23. 年齢確認前の成人向け商品画像
========================================================= */

.sb-adult-product-unverified img,
.sb-adult-product-unverified .woocommerce-loop-product__link img,
.sb-adult-product-unverified .wc-block-grid__product-image img {
  filter: blur(12px);
  transform: scale(1.03);
}

.sb-adult-product-unverified .woocommerce-loop-product__link,
.sb-adult-product-unverified .wc-block-grid__product-link {
  position: relative;
}

.sb-adult-product-unverified .woocommerce-loop-product__link::after,
.sb-adult-product-unverified .wc-block-grid__product-link::after {
  content: "年齢確認が必要です";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em;
  background: rgba(12, 5, 22, 0.55);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

/* =========================================================
   24. フッター
========================================================= */

.site-footer {
  background: var(--sb-main);
  color: #ffffff;
  padding: 20px 0;
}

.site-footer a {
  color: #ffffff;
}

.site-footer a:hover {
  color: var(--sb-accent);
}

.footer-widgets {
  background: var(--sb-main);
  color: #ffffff;
}

/* =========================================================
   25. Contact Form 7：お問い合わせフォーム
========================================================= */

.entry-content .wpcf7 {
  width: 100%;
  max-width: 620px;
  margin: 2.2rem auto 0;
  box-sizing: border-box;
}

.entry-content .wpcf7 form {
  width: 100%;
  max-width: 620px;
  margin: 0;
  box-sizing: border-box;
}

.entry-content .wpcf7 .sb-contact-form {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
  box-sizing: border-box;
}

/* 各項目 */
.entry-content .wpcf7 .sb-contact-field {
  margin: 0 0 1.05rem;
  padding: 0;
  box-sizing: border-box;
}

.entry-content .wpcf7 .sb-contact-field-message {
  margin-bottom: 0.85rem;
}

/* 入力欄の幅 */
.entry-content .wpcf7 .sb-contact-field-name {
  max-width: 320px;
}

.entry-content .wpcf7 .sb-contact-field-email {
  max-width: 420px;
}

.entry-content .wpcf7 .sb-contact-field-type {
  max-width: 360px;
}

.entry-content .wpcf7 .sb-contact-field-message {
  max-width: 620px;
}

/* ラベル */
.entry-content .wpcf7 .sb-contact-form label {
  display: block;
  width: 100%;
  margin: 0;
  color: #222;
  font-weight: 700;
  line-height: 1.5;
  box-sizing: border-box;
}

/* 必須バッジ */
.entry-content .wpcf7 .sb-contact-form .required {
  display: inline-block;
  margin-left: 0.45em;
  padding: 0.1em 0.45em;
  border-radius: 999px;
  background: #f1f1f1;
  color: #555;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
}

/* CF7 wrap */
.entry-content .wpcf7 .sb-contact-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  margin-top: 0.42rem;
  box-sizing: border-box;
}

/* 入力欄 */
.entry-content .wpcf7 .sb-contact-form input[type="text"],
.entry-content .wpcf7 .sb-contact-form input[type="email"],
.entry-content .wpcf7 .sb-contact-form select,
.entry-content .wpcf7 .sb-contact-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.72em 0.85em;
  border: 1px solid #d7d2cc;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.entry-content .wpcf7 .sb-contact-form textarea {
  min-height: 185px;
  resize: vertical;
}

.entry-content .wpcf7 .sb-contact-form input[type="text"]:focus,
.entry-content .wpcf7 .sb-contact-form input[type="email"]:focus,
.entry-content .wpcf7 .sb-contact-form select:focus,
.entry-content .wpcf7 .sb-contact-form textarea:focus {
  outline: none;
  border-color: #8d847c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(120, 112, 105, 0.14);
}

/* プライバシーポリシー同意 */
.entry-content .wpcf7 .sb-contact-privacy {
  display: flex;
  align-items: center;
  gap: 0.5em;
  max-width: 620px;
  margin: 0 0 1.1rem;
  padding: 0;
  line-height: 1.6;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.entry-content .wpcf7 .sb-contact-privacy .wpcf7-form-control-wrap,
.entry-content .wpcf7 .sb-contact-privacy .wpcf7-acceptance,
.entry-content .wpcf7 .sb-contact-privacy .wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0;
  padding: 0;
}

.entry-content .wpcf7 .sb-contact-privacy label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  width: auto;
  margin: 0;
  font-weight: 400;
}

.entry-content .wpcf7 .sb-contact-privacy input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

/* Turnstile wrapper */
.entry-content .wpcf7 .cf7-cf-turnstile {
  display: block;
  width: 300px;
  max-width: 100%;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  line-height: 1;
  clear: both;
}

.entry-content .wpcf7 .cf7-cf-turnstile .cf-turnstile {
  display: block;
  width: 300px;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
}

.entry-content .wpcf7 .cf7-cf-turnstile iframe,
.entry-content .wpcf7 .cf7-cf-turnstile > div {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

.entry-content .wpcf7 .cf-turnstile-br {
  display: none !important;
}

/* 送信ボタン */
.entry-content .wpcf7 .sb-contact-submit {
  margin: 0;
  padding: 0;
}

.entry-content .wpcf7 .sb-contact-submit p {
  margin: 0;
  padding: 0;
}

.entry-content .wpcf7 .sb-contact-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 140px;
  min-height: 46px;
  padding: 0.85em 1.8em;
  border: none;
  border-radius: 7px;
  background: #6f6973;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.entry-content .wpcf7 .sb-contact-form input[type="submit"]:hover {
  background: #5f5963;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.entry-content .wpcf7 .sb-contact-form input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

.entry-content .wpcf7 .sb-contact-form input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* スピナー */
.entry-content .wpcf7 .wpcf7-spinner {
  vertical-align: middle;
  margin-left: 0.8em;
}

/* エラー表示 */
.entry-content .wpcf7 .wpcf7-not-valid-tip {
  margin-top: 0.35rem;
  color: var(--sb-red);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* 送信結果メッセージ */
.entry-content .wpcf7 form .wpcf7-response-output {
  max-width: 620px;
  margin: 1.5rem auto 0;
  padding: 0.9em 1em;
  border-radius: 6px;
  line-height: 1.6;
  box-sizing: border-box;
  text-align: left;
}

/* =========================================================
   26. 管理画面：在庫拠点・棚番号
========================================================= */

/* 商品一覧画面：拠点 / 棚 列 */
.wp-list-table .column-warehouse_location {
  width: 140px;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #2c3338;
}

/* 注文詳細画面：拠点 / 棚 列 */
.woocommerce_order_items_wrapper table.woocommerce_order_items th.sb-warehouse-header,
.woocommerce_order_items_wrapper table.woocommerce_order_items td.sb-warehouse-cell {
  width: 110px;
  min-width: 110px;
  text-align: left;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 12px;
  color: #2c3338;
  vertical-align: top;
}

/* 商品編集画面：棚番号入力欄 */
#woocommerce-product-data .options_group input#_shelf_number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}

/* pattern不一致時に枠を赤く */
#woocommerce-product-data .options_group input#_shelf_number:invalid {
  border-color: #d63638;
  box-shadow: 0 0 0 1px #d63638;
}

/* =========================================================
   27. レスポンシブ
========================================================= */

@media (max-width: 1200px) {
  /* 管理画面：拠点 / 棚 列を狭い画面では折り返し許容 */
  .woocommerce_order_items_wrapper table.woocommerce_order_items th.sb-warehouse-header,
  .woocommerce_order_items_wrapper table.woocommerce_order_items td.sb-warehouse-cell {
    width: auto;
    min-width: 90px;
    white-space: normal;
    word-break: break-all;
  }
}

@media (max-width: 1100px) {
  .woocommerce-checkout .wc-block-components-sidebar-layout,
  .woocommerce-checkout .wc-block-components-sidebar-layout.is-large {
    display: block !important;
  }

  .woocommerce-checkout .wc-block-components-main,
  .woocommerce-checkout .wc-block-components-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }

  .woocommerce-checkout .wc-block-components-sidebar {
    margin-top: 24px !important;
  }
}

@media (max-width: 1024px) {
  .woocommerce ul.products,
  .woocommerce-cart .wc-block-grid__products,
  .sb-front-products.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .sb-category-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .woocommerce-cart .wc-block-components-sidebar-layout {
    display: block !important;
  }

  .woocommerce-cart .wc-block-components-main,
  .woocommerce-cart .wc-block-components-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 768px) {
  .site-content {
    padding-top: 10px;
  }

  /* =========================================================
     スマホ：ヘッダー上段
     タイトル → 商品検索
     マイアカウントはメインメニュー内へ移動
  ========================================================= */

  .site-header .inside-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    box-sizing: border-box !important;
  }

  .site-branding,
  .site-logo {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .main-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .site-description {
    text-align: center !important;
  }

  /* スマホではヘッダー上段は検索だけ */
  .sb-header-tools {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .sb-header-search {
    flex: none !important;
    width: 100% !important;
    max-width: 360px !important;
    min-width: 0 !important;
  }

  .sb-header-search .woocommerce-product-search {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .sb-header-search .search-field {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    box-sizing: border-box !important;
  }

  .sb-header-search button[type="submit"] {
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 42px !important;
  }

  /* スマホではヘッダー上段のマイアカウントを非表示 */
  .sb-header-account {
    display: none !important;
  }

  /* =========================================================
     スマホ：ナビゲーション崩れ修正
     重要：開閉時に高さが広がるよう、固定heightを解除
  ========================================================= */

  .main-navigation {
    position: relative !important;
    z-index: 50 !important;
    clear: both !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    overflow: visible !important;
    background: var(--sb-main) !important;
  }

  .main-navigation .inside-navigation {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    background: var(--sb-main) !important;
  }

  .main-navigation .mobile-menu-control-wrapper {
    order: 1 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    background: var(--sb-main) !important;
  }

  .main-navigation button.menu-toggle,
  .main-navigation button.menu-toggle:hover,
  .main-navigation .menu-toggle {
    display: flex !important;
    align-items: center !important;
    height: 42px !important;
    min-height: 42px !important;
    line-height: 42px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    background: var(--sb-main) !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
  }

  .main-navigation button.menu-toggle .mobile-menu {
    line-height: 42px !important;
  }

  /* 閉じている時はメニュー本体を非表示 */
  .main-navigation:not(.toggled) .main-nav,
  .main-navigation:not(.toggled) .main-nav > ul {
    display: none !important;
  }

  /* カートは右側に表示 */
  .main-navigation .menu-bar-items {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    height: 42px !important;
    min-height: 42px !important;
    background: var(--sb-main) !important;
  }

  .main-navigation .menu-bar-item {
    height: 42px !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
  }

  .sb-nav-cart {
    height: 42px !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
  }

  .sb-nav-cart-link {
    width: auto !important;
    min-width: 138px !important;
    max-width: 170px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .sb-nav-cart-info {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .sb-nav-cart-total {
    font-size: 13px !important;
    line-height: 42px !important;
    white-space: nowrap !important;
  }

  .sb-nav-cart-count {
    display: none !important;
  }

  .sb-nav-cart-icon {
    flex: 0 0 auto !important;
    width: 20px !important;
    height: 42px !important;
    margin-left: 6px !important;
  }

  .sb-nav-cart-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  /* 開いた時のメニューを通常フローで表示。本文に重ねない */
  .main-navigation.toggled .main-nav {
    order: 3 !important;
    flex: 0 0 100% !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--sb-main) !important;
    position: static !important;
    clear: both !important;
  }

  .main-navigation.toggled .main-nav > ul,
  .main-navigation.toggled .main-nav ul {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--sb-main) !important;
    box-sizing: border-box !important;
  }

  .main-navigation.toggled .main-nav ul li {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-sizing: border-box !important;
  }

  .main-navigation.toggled .main-nav ul li a {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    line-height: 42px !important;
    padding: 0 20px !important;
    color: #ffffff !important;
    background: var(--sb-main) !important;
    box-sizing: border-box !important;
  }

  .main-navigation.toggled .main-nav ul li a:hover,
  .main-navigation.toggled .main-nav ul li.current-menu-item > a,
  .main-navigation.toggled .main-nav ul li.current-menu-ancestor > a {
    background: var(--sb-main-hover) !important;
    color: var(--sb-accent) !important;
  }

  /* スマホメニュー内：マイアカウント */
  .main-navigation .main-nav ul li.sb-mobile-account-menu-item {
    display: none !important;
  }

  .main-navigation.toggled .main-nav ul li.sb-mobile-account-menu-item {
    display: block !important;
  }

  .main-navigation.toggled .main-nav ul li.sb-mobile-account-menu-item a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #ffffff !important;
  }

  .main-navigation.toggled .main-nav ul li.sb-mobile-account-menu-item a:hover {
    color: var(--sb-accent) !important;
  }

  .sb-mobile-account-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 17px 17px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='4' stroke='white' stroke-width='2'/%3E%3Cpath d='M4.5 20C5.4 15.8 8.4 13.5 12 13.5C15.6 13.5 18.6 15.8 19.5 20' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  /* サブメニューがある場合 */
  .main-navigation.toggled .main-nav ul ul {
    position: static !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #120326 !important;
    box-shadow: none !important;
  }

  .main-navigation.toggled .main-nav ul ul li a {
    padding-left: 34px !important;
    background: #120326 !important;
  }

  /* 本文をナビの下に正常に流す */
  .site-content,
  #content {
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    padding-top: 10px !important;
  }

  /* =========================================================
     既存レスポンシブ設定
  ========================================================= */

  .separate-containers .inside-article,
  .home .inside-article {
    padding: 14px !important;
  }

  .woocommerce ul.products,
  .woocommerce-cart .wc-block-grid__products,
  .sb-front-products.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: auto;
  }

  .sb-category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sb-book-category-section {
    padding: 14px;
  }

  .sb-info-columns {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .entry-content > .woocommerce {
    display: block;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100% !important;
    flex: none;
    margin-bottom: 20px !important;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li {
    border-right: 1px solid #eeeeee;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li:nth-child(2n) {
    border-right: none;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation a {
    padding: 12px;
    font-size: 13px;
    text-align: center;
  }

  .woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  /* お問い合わせフォーム */
  .entry-content .wpcf7,
  .entry-content .wpcf7 form,
  .entry-content .wpcf7 .sb-contact-form,
  .entry-content .wpcf7 .sb-contact-field-name,
  .entry-content .wpcf7 .sb-contact-field-email,
  .entry-content .wpcf7 .sb-contact-field-type,
  .entry-content .wpcf7 .sb-contact-field-message,
  .entry-content .wpcf7 form .wpcf7-response-output {
    max-width: 100%;
  }

  .entry-content .wpcf7 {
    margin-top: 1.6rem;
  }

  .entry-content .wpcf7 .sb-contact-field {
    margin-bottom: 0.95rem;
  }

  .entry-content .wpcf7 .sb-contact-form textarea {
    min-height: 165px;
  }

  .entry-content .wpcf7 .cf7-cf-turnstile,
  .entry-content .wpcf7 .cf7-cf-turnstile .cf-turnstile {
    width: 300px;
    max-width: 100%;
  }

  .entry-content .wpcf7 .sb-contact-form input[type="submit"] {
    width: 100%;
  }

  /* マイアカウント：通知ボックス内のボタンを下に回す */
  .woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button,
  .woocommerce-account .woocommerce-MyAccount-content .woocommerce-message .button {
    float: none;
    display: flex !important;
    width: 100%;
    margin: 0.8em 0 0;
  }

  /* スマホ極小幅：ヘッダーの微調整 */
  .sb-header-tools {
    max-width: 320px !important;
  }

  .sb-nav-cart-link {
    min-width: 118px !important;
    max-width: 140px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .sb-nav-cart-total {
    font-size: 12px !important;
  }

  .sb-nav-cart-icon {
    margin-left: 4px !important;
  }
}

@media (max-width: 600px) {
  .sb-news-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .woocommerce ul.products,
  .woocommerce-cart .wc-block-grid__products,
  .sb-front-products.columns-4 {
    grid-template-columns: 1fr !important;
  }

  .sb-category-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sb-category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li {
    border-right: none;
  }
}