/*
 Theme Name:   maruwood
 Theme URI:    https://example.com/
 Description:  Storefrontの子テーマ
 Author:       あなたの名前
 Author URI:   https://example.com/
 Template:     storefront
 Version:      1.0.0
*/

/* ---------------------------------------------
 * サイドバー（BEM命名）
 * - 追従表示（sticky）
 * - 内部スクロール対応
 * --------------------------------------------- */
@media (min-width: 769px) {
  .col-full {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 0;
  }

  .content-area {
    width: 74%;
    float: none;
    margin-right: 2%;
  }

  .widget-area {
    width: 22%;
    float: none;
    margin-right: 0;
    display: block !important;
    /* サイドバーを確実に表示 */
  }

  .widget-area.sidebar--fixed {
    position: sticky;
    top: 150px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 24px;
    display: block !important;
    /* サイドバーを確実に表示 */
    z-index: 10;
  }

  /* 商品詳細以外でサイドバーを表示。ただし no-sidebar 指定ページは除外 */
  body:not(.single-product):not(.no-sidebar) .widget-area,
  body:not(.single-product):not(.no-sidebar) #secondary,
  body:not(.single-product):not(.no-sidebar) .sidebar {
    display: block !important;
  }
}

.sidebar__section {
  margin-bottom: 28px;
}

.sidebar__headline {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2f4d;
}

.sidebar__section--widgets .widget {
  margin-bottom: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e3e9f8;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(16, 36, 94, 0.06);
}

.sidebar__headline::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5b7cf7 0%, #314fd4 100%);
}

.sidebar__category-root,
.sidebar__tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar__tag-item {
  display: inline-block;
  margin: 0 8px 8px 0;
}

.sidebar__tag-link {
  display: inline-block;
  background: #f5f5f5;
  color: #333;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.95em;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar__tag-link:hover {
  background: #0073aa;
  color: #fff;
}

/* 決済関連ページではサイドバーを非表示 */
body.no-sidebar .widget-area {
  display: none !important;
}

body.no-sidebar .content-area {
  margin-right: 0 !important;
}

/* ---------------------------------------------
 * 商品カテゴリリスト（親子階層）
 * --------------------------------------------- */
.sidebar__category-item {
  margin-bottom: 8px;
}

.sidebar__category-link {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar__category-link:hover {
  color: #0073aa;
  text-decoration: underline;
}

/* ---------------------------------------------
 * 子カテゴリグリッド表示
 * --------------------------------------------- */
.child-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.child-cat-grid .product-category {
  text-align: center;
}

.child-cat-grid .product-category a {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s;
}

.child-cat-grid .product-category:hover a {
  transform: translateY(-4px) scale(1.03);
}

.sidebar__category-root {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar__category-group {
  border: 1px solid #dbe3f7;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.sidebar__category-group.is-active,
.sidebar__category-group:hover {
  border-color: #4b6bd8;
}

.sidebar__category-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sidebar__category-parent-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e69;
  text-decoration: none;
}

.sidebar__category-parent-text {
  line-height: 1.3;
}

.sidebar__category-parent-link:hover {
  color: #415caa;
}

.sidebar__category-children {
  list-style: none;
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid #eef2fb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar__category-child {
  margin: 0;
}

.sidebar__category-child-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: #405077;
  font-size: 0.92rem;
  padding: 4px 0;
  gap: 8px;
  transition: color 0.2s ease;
}

.sidebar__category-child-link:hover {
  color: #4c66b6;
}

.sidebar__category-child-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4cde6;
  margin-top: 3px;
}

.sidebar__category-child.is-active .sidebar__category-child-dot {
  background: #4b6bd8;
}

.sidebar__category-child-text {
  line-height: 1.2;
}

.sidebar__category-child.is-active>.sidebar__category-child-link {
  color: #2f4ca1;
  font-weight: 600;
}

/* デフォルトでは非表示 */
.category-fab,
.bottom-sheet {
  display: none;
}

/* ---------------------------------------------
 * モバイル向けカテゴリボトムシート & FAB
 * --------------------------------------------- */

/* 既存サイドバーを隠す */
.widget-area.sidebar--fixed {
  display: none !important;
}

/* 🎨 Modern Category FAB Design - Mobile Only */
.is-product-bottomsheet .category-fab {
  display: flex !important;
  position: fixed;
  top: 83%;
  right: 18px;
  width: auto;
  height: 72px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.is-product-bottomsheet .category-fab:hover {
  transform: scale(1.05) translateY(-52%);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.is-product-bottomsheet .category-fab__icon {
  font-size: 24px;
  margin-bottom: 2px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.is-product-bottomsheet .category-fab__label {
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  line-height: 1;
  letter-spacing: 0.5px;
}

/* 🎨 Enhanced Bottom Sheet Design */
.bottom-sheet {
  display: block !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  transition: all 0.3s ease;
  pointer-events: none;
}

.bottom-sheet[aria-hidden="false"] {
  pointer-events: auto;
}

.bottom-sheet__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bottom-sheet[aria-hidden="false"] .bottom-sheet__overlay {
  opacity: 1;
}

.bottom-sheet__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: white;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bottom-sheet[aria-hidden="false"] .bottom-sheet__panel {
  transform: translateY(0);
}

.bottom-sheet__header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 18px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.bottom-sheet__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-icon {
  font-size: 22px;
}

.bottom-sheet__close--fixed {
  position: sticky;
  right: 24px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #666;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 20;
  padding: 20px;
}

.bottom-sheet__close--fixed:hover {
  background: #f5f5f5;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bottom-sheet__content {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 🎨 Category List Enhancements */
.bottom-sheet__content .category-list {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.bottom-sheet__content .category-list li {
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.bottom-sheet__content .category-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.bottom-sheet__content .category-list a {
  padding: 16px 20px;
  background: white;
  border-left: 4px solid #667eea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
}

.bottom-sheet__content .category-list a:hover {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
  color: #667eea;
}

/* カテゴリー数のバッジ */
.bottom-sheet__content .category-list .count {
  background: #667eea;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* 小さい画面での調整 */
@media (max-width: 480px) {
  .category-fab {
    height: 64px;
    right: 18px;
  }

  .bottom-sheet__header {
    padding: 18px;
  }

  .bottom-sheet__content {
    padding: 18px;
  }
}

.form-row span input.input-text,
.form-row span textarea,
.select2-container--default .select2-selection--single .select2-selection__rendered {
  background-color: white;
  display: block;
  border: 1px solid;
  border-radius: 4px;
}

.form-row span textarea {
  resize: vertical;
}

.form-row span textarea:focus {
  background-color: whitesmoke;
}

#payment .payment_methods>li.wc_payment_method :not(.woocommerce-notice) {
  background-color: white;
}

#payment .form-row.place-order {
  background-color: white;
}

.continue-shopping-button {
  align-items: center;
  display: inline-flex;
  height: auto;
  justify-content: center;
  position: relative;
  text-align: center;
  transition: box-shadow .1s linear;
  color: white;
  background-color: #030303;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar__category-item--child {
  font-size: 14px;
}

/* ---------------------------------------------
 * 会社名フォーム表示制御
 * 顧客タイプが「法人または個人事業主」以外の場合は非表示
 * --------------------------------------------- */
.company_name_form {
  display: none;
}

/* ---------------------------------------------
 * Select2のwidth調整
 * billing_customer_type_field内のselect2-containerを100%幅に
 * --------------------------------------------- */
#billing_customer_type_field .select2-container {
  width: 100% !important;
}

/* ---------------------------------------------
 * チェックアウト顧客区分 注意書き
 * --------------------------------------------- */
.checkout-field.checkout-field--customer-type .description {
  display: block !important;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

/* ---------------------------------------------
 * 顧客区分説明文の常時表示制御
 * billing / shipping いずれもフォーカスに依存せず表示
 * --------------------------------------------- */
#billing_customer_type-description,
#shipping_customer_type-description {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

#post-9 .entry-header {
  display: none;
}

.products li img {
  max-height: 250px;
  min-height: 250px;
  object-fit: contain;
}

.wc-block-cart-item__image img {
  max-height: 100px;
  object-fit: contain;
}

.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

.wc-block-components-totals-item .wc-block-components-totals-item__value strong {
  display: none !important;
}

.woocommerce-product-gallery__wrapper a {
  position: relative;
}

/* カテゴリーに戻るボタン */
.product-back-button {
  margin: 20px 0 30px 0;
  padding: 0;
}

.back-to-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #ddd;
}

.back-to-category:hover {
  background: #007cba;
  color: white !important;
  border-color: #007cba;
  transform: translateX(-3px);
}

.back-to-category .arrow {
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.back-to-category:hover .arrow {
  transform: translateX(-3px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .product-back-button {
    margin: 15px 0 20px 0;
  }

  .back-to-category {
    padding: 8px 16px;
    font-size: 13px;
  }
}

.storefront-full-width-content.single-product div.product .summary {
  position: relative;
  z-index: 20;
}

/* =============================
 * デザイン追加（To-do対応）
 * ============================= */
/* 同カテゴリ(related/upsells) 2列化（スマホ） */
@media (max-width: 480px) {

  .related ul.products,
  .upsells ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* カテゴリーページ見出し調整 */
.woocommerce-products-header__title.page-title {
  font-size: 1.75rem;
  line-height: 1.3;
}

/* カテゴリーページ商品名（やや小さめ） */
.products .woocommerce-loop-product__title {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* 送料説明文を小さく */
.shipping-note,
.product .shipping-note {
  font-size: 0.875rem;
}

/* パンくずの余白調整 */
.woocommerce-breadcrumb {
  margin: 8px 0 16px;
}

/* タグ・価格右寄せ */
.price,
.tag {
  text-align: right;
}

/* テーブルの横スクロール対策 */
.entry-content table,
.product .entry-content table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 写真下テキストの回り込み抑止 */
.product .woocommerce-product-gallery__wrapper a {
  display: inline-block;
}

.product .woocommerce-product-gallery__wrapper a+div {
  clear: both;
}

/* 管理者視認性向上（price.phpのtop/bottom説明枠） */
body.is-admin-viewing .top-description,
body.is-admin-viewing .bottom-description {
  outline: 2px dashed #ff7f0e;
  outline-offset: 4px;
  background: rgba(255, 127, 14, 0.05);
}

body.is-admin-viewing .top-rich-description,
body.is-admin-viewing .bottom-rich-description {
  outline: 2px dashed #3498db;
  outline-offset: 4px;
  background: rgba(255, 127, 14, 0.05);
}



/* =============================
 * PDFモーダル(dialog)のレイアウト調整
 * ============================= */
.mw-pdf-dialog {
  width: min(90vw, 600px);
  height: min(90vh, 800px);
  max-width: 95vw;
  max-height: 95vh;
  border: none;
  padding: 0;
}

.mw-pdf-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.mw-pdf-dialog form {
  position: sticky;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 8px;
  z-index: 2;
}

.mw-pdf-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background-color: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  padding: 0;
}

.mw-pdf-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.mw-pdf-dialog .mw-pdf-frame {
  width: 100%;
  height: calc(100% - 48px);
  border: 0;
  display: block;
}

.storefront-breadcrumb {
  margin-bottom: 0 !important;
}

.woocommerce-products-header {
  padding: 0 0 2rem !important;
}

@media screen and (max-width: 480px) {
  ul.products li.product {
    width: 48% !important;
    clear: none !important;
  }

  ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
  }

  ul.products li.product:nth-of-type(2n) {
    margin-right: 0;
  }
}

/* =============================
 * WooCommerce: Cart UI（カート画面の可読性と操作性を改善）
 * - テーブルの行間/罫線/背景の統一
 * - サムネイルの視認性向上（80px・角丸・軽いシャドウ）
 * - 数量入力のサイズ/フォーカスリング改善
 * - 合計ボックスのカード化 + デスクトップでsticky
 * - CTAはテーマ色に追従（色は指定しない）
 * ============================= */
.woocommerce-cart .shop_table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: #fff;
}

.woocommerce-cart .shop_table thead th {
  background: #fafafa;
  font-weight: 700;
  color: #222;
}

.woocommerce-cart .shop_table th,
.woocommerce-cart .shop_table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.woocommerce-cart .product-name {
  text-align: left;
}

.woocommerce-cart .product-thumbnail img {
  width: 80px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.woocommerce .quantity .qty {
  width: 72px;
  height: 40px;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
}

.woocommerce .quantity .qty:focus {
  outline: none;
  border-color: inherit;
  /* アクセント色はテーマに委譲 */
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

@media (min-width: 992px) {
  .woocommerce-cart .cart-collaterals {
    grid-template-columns: 1fr 360px;
    align-items: start;
  }

  .woocommerce-cart .cart_totals {
    position: sticky;
    top: 24px;
  }
}

section.storefront-sticky-add-to-cart {
  z-index: 200;
}

div.storefront-sticky-add-to-cart__content {
  justify-content: space-between;
  width: 100%;
}

/* ---------------------------------------------
 * PC商品詳細ページでボトムシート/FABを有効化
 * - body.is-product-bottomsheet が付与されている場合のみ
 * --------------------------------------------- */
@media (min-width: 769px) {

  /* PCで有効化（閉じているときは見えないがDOM上は存在） */
  body.is-product-bottomsheet .category-fab,
  body.is-product-bottomsheet .bottom-sheet {
    display: block !important;
  }

  /* FAB位置（PC） */
  body.is-product-bottomsheet .category-fab {
    display: flex !important;
    position: fixed;
    right: 24px;
    z-index: 1000;
  }

  /* コンテナ（PC） */
  body.is-product-bottomsheet .bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    transition: all 0.3s ease;
    pointer-events: none;
  }

  body.is-product-bottomsheet .bottom-sheet[aria-hidden="false"],
  body.is-product-bottomsheet .bottom-sheet.bottom-sheet--open {
    pointer-events: auto;
  }

  /* オーバーレイ（PC） */
  body.is-product-bottomsheet .bottom-sheet__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  body.is-product-bottomsheet .bottom-sheet[aria-hidden="false"] .bottom-sheet__overlay,
  body.is-product-bottomsheet .bottom-sheet.bottom-sheet--open .bottom-sheet__overlay {
    opacity: 1;
  }

  /* パネル（PC） */
  body.is-product-bottomsheet .bottom-sheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 78vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.is-product-bottomsheet .bottom-sheet[aria-hidden="false"] .bottom-sheet__panel,
  body.is-product-bottomsheet .bottom-sheet.bottom-sheet--open .bottom-sheet__panel {
    transform: translateY(0);
  }
}

.woocommerce-cart .cart_totals {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.woocommerce-cart .cart_totals h2 {
  font-size: 18px;
  margin: 0 0 12px;
  font-weight: 700;
}

/* チェックアウトCTA（形状のみ。色は既存テーマに追従） */
.woocommerce-cart .wc-proceed-to-checkout {
  margin-top: 16px;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: block;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
}

/* カラム幅の最適化（価格・数量・小計） */
.woocommerce-cart .shop_table th.product-price,
.woocommerce-cart .shop_table td.product-price {
  white-space: nowrap;
  text-align: right;
}

.woocommerce-cart .shop_table th.product-quantity,
.woocommerce-cart .shop_table td.product-quantity {
  white-space: nowrap;
}

.woocommerce-cart .shop_table th.product-subtotal,
.woocommerce-cart .shop_table td.product-subtotal {
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 768px) {

  /* 数量UI（±ボタンのモダン化と横並び） */
  .woocommerce .mw-qty-stepper {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
  }

  .woocommerce .mw-qty-dec,
  .woocommerce .mw-qty-inc {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #333;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
  }

  .woocommerce .mw-qty-dec:active,
  .woocommerce .mw-qty-inc:active {
    transform: translateY(1px);
  }

  .woocommerce .quantity .qty {
    width: 72px;
    /* 既存指定の再掲（視認性のため） */
    text-align: center;
  }
}

/* ---------------------------------------------
 * お問い合わせページ（BEM命名）
 * --------------------------------------------- */
.contact-page {
  padding: 0;
}

.contact-page__header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e3e9f8;
}

.contact-page__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2f4d;
  margin: 0;
  line-height: 1.4;
}

.contact-page__content {
  max-width: 100%;
}

.contact-page__intro {
  margin-bottom: 32px;
  padding: 24px;
  background: #f8f9ff;
  border-left: 4px solid #5b7cf7;
}

.contact-page__intro-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e69;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.contact-page__notice {
  margin-top: 16px;
  padding: 16px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e3e9f8;
}

.contact-page__notice-text {
  font-size: 0.95rem;
  color: #405077;
  margin: 0;
  line-height: 1.8;
}

.contact-page__notice-text strong {
  color: #2c3e69;
  font-weight: 700;
}

/* Contact Form 7 スタイル調整 */
.contact-page .wpcf7-form {
  margin-top: 32px;
}

/* 会社名フィールドの初期状態（非表示） */
.contact-page .company_name_form,
.contact-page .company-field {
  display: none;
}

.contact-page .wpcf7-form p {
  margin-bottom: 20px;
}

.contact-page .wpcf7-form label {
  display: block;
  font-weight: 600;
  color: #2c3e69;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.contact-page .wpcf7-form input[type="text"],
.contact-page .wpcf7-form input[type="email"],
.contact-page .wpcf7-form input[type="tel"],
.contact-page .wpcf7-form input[type="url"],
.contact-page .wpcf7-form textarea,
.contact-page .wpcf7-form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dbe3f7;
  border-radius: 6px;
  font-size: 1rem;
  color: #333;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-page .wpcf7-form input[type="text"]:focus,
.contact-page .wpcf7-form input[type="email"]:focus,
.contact-page .wpcf7-form input[type="tel"]:focus,
.contact-page .wpcf7-form input[type="url"]:focus,
.contact-page .wpcf7-form textarea:focus,
.contact-page .wpcf7-form select:focus {
  outline: none;
  border-color: #5b7cf7;
  box-shadow: 0 0 0 3px rgba(91, 124, 247, 0.1);
}

.contact-page .wpcf7-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-page .wpcf7-form input[type="submit"],
.contact-page .wpcf7-form button[type="submit"] {
  background: linear-gradient(180deg, #5b7cf7 0%, #314fd4 100%);
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(91, 124, 247, 0.3);
}

.contact-page .wpcf7-form input[type="submit"]:hover,
.contact-page .wpcf7-form button[type="submit"]:hover {
  background: linear-gradient(180deg, #314fd4 0%, #1f3bb3 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 124, 247, 0.4);
}

.contact-page .wpcf7-form input[type="submit"]:active,
.contact-page .wpcf7-form button[type="submit"]:active {
  transform: translateY(0);
}

.contact-page .wpcf7-validation-errors,
.contact-page .wpcf7-mail-sent-ok {
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.contact-page .wpcf7-validation-errors {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
}

.contact-page .wpcf7-mail-sent-ok {
  background: #d4edda;
  border: 1px solid #28a745;
  color: #155724;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .contact-page__title {
    font-size: 1.75rem;
  }

  .contact-page__intro {
    padding: 20px;
  }

  .contact-page__intro-text {
    font-size: 1rem;
  }

  .contact-page .wpcf7-form input[type="submit"],
  .contact-page .wpcf7-form button[type="submit"] {
    width: 100%;
    padding: 16px;
  }
}

.site-header-cart a.cart-contents {
  display: inline-flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.site-header-cart a.cart-contents::after {
  font-size: 2rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .storefront-handheld-footer-bar .search .search-field {
    padding-right: 45px !important;
  }

  /* Storefront の隠蔽CSSを上書きして検索ボタンを表示 */
  .storefront-handheld-footer-bar .search form input[type=submit],
  .storefront-handheld-footer-bar .search form button[type=submit] {
    clip: auto !important;
    clip-path: none !important;
    height: auto !important;
    width: fit-content !important;
    position: absolute !important;
    overflow: visible !important;
    margin: 0 !important;
    background: transparent !important;
    border: gray 1px solid !important;
    border-radius: 20% !important;
    top: 50% !important;
    right: 10px !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
    color: gray;
    padding: 5px !important;
    left: 85%;
  }
}