:root{
    --title-font-size:24px;
    --body-font-size:14px;
    --hamburger-font-size:14px;
  }
  body{font-size:var(--body-font-size);}
  
  /* ページ構成 */
  @media screen and (min-width: 561px) {
      h1 {
          margin-left: 4px;
      }
      .wonder-header-inner {
          padding: 6px;
      }
      .header-wrapper {
          position: fixed;
          width: 100%;
          top: 0;
          left: 0;
          overflow-y: auto;
          z-index: 1000;
      }
      .side-bar-wrapper {
          width: 180px;
          position: fixed;
          top: 118px;
          left: 0;
          bottom: 0;
          z-index: 1000;
          box-shadow: 3px 0 5px rgba(0, 0, 0, 0.1);
      }
  }
  
  /* ❸ SP 向けレイアウト（560px 以下） */
  @media screen and (max-width: 560px) {
      .category-menu-header {
        text-align: center;
      }
      .category-toggle-btn {          /* SP で表示 */
          display: block;
          left: auto;
          right: 16px;
          z-index: 9999;
      }
    
      .side-bar-wrapper {
          position: fixed;
          top: 0;
          right: 0;
          bottom: 0;
          width: 50%;
          max-width: 80%;
          background: #fff;
          box-shadow: -2px 0 8px rgba(0,0,0,.15); /* 影を左側へ */
          overflow-y: auto;
          transform: translateX(100%);   /* 画面外（右）へ退避 */
          transition: transform .3s ease;
          z-index: 1050;
          pointer-events: none;
      }
      .side-bar-wrapper.is-open {
          transform: translateX(0);
          pointer-events: auto;
      }
      .ec-search-header .ec-search-form {
          justify-content: flex-end !important;
      }
  }
  
  /* ヘッダー */
  .compare-link {
      padding: 8px 12px;
      background-color: #4c87af;
      color: white;
      border-radius: 9999px;
      text-decoration: none;
  }
  .compare-link:hover {
      background-color: #4c87afc4;
  }
  
  .ec-search-form__header {
      margin-bottom: 8px;
  }
  
  h2 {
  h2 {
      font-size: var(--title-font-size);
      font-weight: bold;
      color: #333;
      margin: 0;
    }
    }
  
    .ec-search-form__description {
      font-size: var(--body-font-size);
      color: #666;
      margin: 4px 0 0;
    }
  
  .ec-product-image {
      width: 100%;
      height: 180px !important;
      display: block;
      margin-bottom: 8px;
      object-fit: contain;
  }
  .img-description {
      font-size: 11px;
      color: #666;
      line-height: 1.4;
      min-height: 1rem;
      margin-top: -1rem;
      background: white;
      /* ▼ 複数行 ellipsis のための変更 ▼ */
      white-space: normal; /* nowrap を解除して複数行を許可 */
      overflow: hidden; /* はみ出しを隠す */
      text-overflow: ellipsis; /* 省略記号 */
      display: -webkit-box; /* Flexbox を基盤とした複数行省略 */
      -webkit-line-clamp: 1; /* 表示する行数 */
      -webkit-box-orient: vertical; /* 垂直方向に並べる */
  }
  
  .ec-product-name {
      font-size: 14px;
      font-weight: 600;
      color: #222;
      margin-bottom: 6px;
      line-height: 1;
    min-height: 2rem;
      /* ▼ 複数行 ellipsis のための変更 ▼ */
      white-space: normal; /* nowrap を解除して複数行を許可 */
      overflow: hidden; /* はみ出しを隠す */
      text-overflow: ellipsis; /* 省略記号 */
      display: -webkit-box; /* Flexbox を基盤とした複数行省略 */
      -webkit-line-clamp: 2; /* 表示する行数 */
      -webkit-box-orient: vertical; /* 垂直方向に並べる */
      /* ▲ 複数行 ellipsis のための変更 ▲ */
  }
  
  .ec-product-price-area {
      margin: 0 0 4px;
  }
  
  .final-price {
      font-size: 17px;
  line-height: 19px;
      font-weight: bold;
      color: #e60023;
      margin-bottom: 1px;
  }
  
  .list-price {
      text-decoration: line-through;
      font-size: 13px;
      color: #666;
      line-height: 1;
      white-space: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
  }
  
  .discount-rate {
      line-height: 15px;
      font-size: 17px;
      color: #ff2a2a;
      font-weight: bold;
  }
  
  .detail-button {
      width: 100%;
      padding: 8px;
      background: linear-gradient(135deg, #007aff 0%, #005ecb 100%);
      color: white;
      border: none;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 2px 4px rgba(0, 191, 255, 0.3);
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin-top: auto;
  }
  
  a {
      color: #007acc;
  }
  
  .detail-page-link {
      cursor: pointer;
  }
  .ec-product-card.detail-page-link:hover {
      opacity: 0.8;
  }

  /* -------------------------------------------------- */
  /* 共通ボタン基本スタイル */
  /* -------------------------------------------------- */
  .base-button-style {
      width: 100%;
      padding: 8px;
      border: none;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease; /* transitionはすべて共通 */
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 共通のシャドウ */
      position: relative;
      overflow: hidden;
      display: flex; /* アイコンとテキストを並べるためにflex */
      align-items: center; /* 垂直方向中央揃え */
      justify-content: center; /* 水平方向中央揃え */
      gap: 6px; /* アイコンとテキストの間隔 */
      text-decoration: none; /* aタグの場合に下線を消す */
      box-sizing: border-box; /* paddingで幅が広がらないように */
  }
  
  /* ホバー時の共通効果 */
  .base-button-style:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* ホバー時のシャドウ */
      transform: translateY(-1px); /* ホバー時のわずかな上昇 */
  }
  
  /* クリック時の共通効果 */
  .base-button-style:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  /* 共通の光沢エフェクト */
  .base-button-style::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      transition: left 0.5s;
  }
  
  .base-button-style:hover::before {
      left: 100%;
  }
  
  .wonder-buy-button {
      width: 100%;
      padding: 8px;
      border: none;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease; /* transitionはすべて共通 */
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 共通のシャドウ */
      position: relative;
      overflow: hidden;
      display: flex; /* アイコンとテキストを並べるためにflex */
      align-items: center; /* 垂直方向中央揃え */
      justify-content: center; /* 水平方向中央揃え */
      gap: 6px; /* アイコンとテキストの間隔 */
      text-decoration: none; /* aタグの場合に下線を消す */
      box-sizing: border-box; /* paddingで幅が広がらないように */
      height: 100%;
  }
  
  /* ホバー時の共通効果 */
  .wonder-buy-button:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* ホバー時のシャドウ */
      transform: translateY(-1px); /* ホバー時のわずかな上昇 */
  }
  
  /* クリック時の共通効果 */
  .wonder-buy-button:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  /* 共通の光沢エフェクト */
  .wonder-buy-button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      transition: left 0.5s;
  }
  
  .wonder-buy-button:hover::before {
      left: 100%;
  }
  
  /* -------------------------------------------------- */
  /* 各ボタン固有スタイル */
  /* -------------------------------------------------- */
  
  /* 商品詳細を見るボタン (元々のスタイル) */
  .detail-button {
      background: linear-gradient(135deg, #0099ff 0%, #0091cb 100%);
      color: white;
      box-shadow: 0 2px 4px rgba(0, 122, 255, 0.3);
  }
  .detail-button:hover {
      background: linear-gradient(135deg, #0099ff 0%, #0091cb 100%);
      box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
  }
  .detail-button:active {
      box-shadow: 0 2px 4px rgba(0, 122, 255, 0.3);
  }
  
  /* カートに入れるボタン (赤系統) */
  .wonder-buy-button {
      background: linear-gradient(135deg, #ff5800 0%, #ff5800 100%); /* 赤系のグラデーション */
      color: white;
      box-shadow: 0 2px 4px rgba(255, 95, 95, 0.3); /* 赤系のシャドウ */
  }
  .wonder-buy-button:hover {
      background: linear-gradient(135deg, #ff5800 0%, #ff5800 100%);
      box-shadow: 0 4px 12px rgba(255, 95, 95, 0.4);
  }
  .wonder-buy-button:active {
      box-shadow: 0 2px 4px rgba(255, 95, 95, 0.833);
  }
  
  /* 比較リストに追加するボタン (青系統 - detail-buttonとは異なる青) */
  .compare-add-button {
      background: linear-gradient(135deg, #4c87af 0%, #4c87af 100%);
      color: white; /* 文字色は白を維持 */
      box-shadow: 0 2px 4px rgba(76, 158, 175, 0.3); /* 新しい青系のシャドウ */
  }
  .compare-add-button:hover {
      background: linear-gradient(135deg, #4c87af 0%, #4c87af 100%);
      box-shadow: 0 4px 12px rgba(76, 158, 175, 0.4);
  }
  .compare-add-button:active {
      box-shadow: 0 2px 4px rgba(76, 158, 175, 0.4);
  }
  
  /* SVGアイコンの共通スタイル */
  .button-icon {
      width: 16px; /* アイコンの幅 */
      height: 16px; /* アイコンの高さ */
      fill: currentColor; /* 親要素の文字色を継承 */
  }
  
  @media screen and (min-width: 561px) {
      .button-container {
      display: flex;
      justify-content: center;
      margin-top: 16px;
      max-height: 50px;
      flex: 1 1 0;
      gap: 6px;
      }
  
      .button-container > * {
          flex: 1 1 0;
      }
  }
  @media screen and (max-width: 560px) {
      /* ボタンの配置例 */
      .button-container {
          display: flex;
          flex-direction: column;
          gap: 10px; /* ボタン間のスペース */
          margin: 20px;
      }

      .wonder-buy-button {
        padding: 8px;
      }
  }
  
  /* パンクズ */
  .js-category-breadcrumb {
      display: inline-block;
      margin: 12px 0 0 0;
      font-size: 0.9rem;
  }
  .crumb {
      position: relative;
      padding: 2px 4px;
      cursor: pointer;
      color: #007acc;
  }
  .crumb.root {
      color: #555;
  }
  .submenu {
      position: absolute;
      top: 100%;
      left: 0;
      background: #fff;
      border: 1px solid #ccc;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      list-style: none;
      margin: 0;
      padding: 4px 0;
      z-index: 1000;
      min-width: 160px;
      max-height: 300px;
      overflow: scroll;
  }
  .submenu li {
      padding: 4px 12px;
      white-space: nowrap;
      cursor: pointer;
  }
  .submenu li:hover {
      background: #f0f8ff;
  }
  button, .detail-button, .wonder-buy-button, .ec-search-button {
          /* 左上・右上・右下・左下 順に指定 */
          border-radius: 9999px 9999px 9999px 9999px;
  
          /* 横長を想定して丸みを演出 */
          display: inline-block;
  }
  
  /* サイドコンテンツ */
  .view-detail-button {
    cursor: pointer;
  }
  #slide-body {
    padding: 40px;
  }
  .slide-panel {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100%;
      z-index: 9999;
      pointer-events: none;
      /* display: flex; ← これを削除 */
  }
  
  .slide-panel .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100%;
      background: rgba(0, 0, 0, 0.3);
      display: none;
      z-index: 1;
  }
  
  .slide-panel .slide-content {
      position: absolute;
      top: 0;
      right: 0;
      width: 50vw;
      max-width: 600px;
      height: 100%;
      background: white;
      transform: translateX(100%);
      transition: transform 0.3s ease;
      pointer-events: auto;
      z-index: 2;
      max-height: 100vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch; /* スマホでの慣性スクロール */
      box-sizing: border-box;
  }
  
  
  .slide-panel.open {
      pointer-events: auto;
  }
  
  .slide-panel.open .overlay {
      display: block;
  }
  
  .slide-panel.open .slide-content {
      transform: translateX(0);
      overscroll-behavior: contain;
  }
  
  .close-btn {
      position: absolute;
      top: 8px;
      right: 16px;
      z-index: 3;
      background: transparent;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #333;
      height: 10px;
  }
  
  @media screen and (max-width: 560px) {
      #slide-body {
        padding: 30px;
      }
      .slide-panel .slide-content {
          width: 95vw;
      }
      .slide-footer-button-container {
          bottom: 100px !important;
      }
  }
  
  
  .slide-content {
      display: flex;
      flex-direction: column;
      height: 100%;
      position: relative;
  }
  
  /* スクロール領域 */
  .slide-scrollable {
      flex: 1 1 auto;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      box-sizing: border-box;
  }
  
  /* フッターの固定ボタン */
  .slide-footer-button-container {
      display: flex;
      flex-direction: column;
      bottom: 30px;
      position: absolute;
      width: 100%;
  }
  
  .slide-footer-button {
      flex-shrink: 0;
      background: #ffffff;
  }
  
  .support-button {
      display: inline-block;
      color: #333333;
      text-decoration: none;
      font-size: 14px;
      text-align: left;
      padding: 8px;
  }
  
  .slide-footer-button:hover {
      background: #f0f0f0;
  }
  
  .wonder-ec-search-count {
      color: #555555;
  }
  
  /* EF */
  #ef-wrapper [type="radio"] {
      margin: unset !important;
  }
  
  .wonder-toCartLink a:hover {
      opacity: 1 !important;
  }
  
  .go-to-cart-form{text-align:center;margin-top:16px;}
  .go-to-cart-button{background:linear-gradient(135deg,#ffe359 0%,#ffd100 100%);color:#000;border:none;border-radius:9999px;padding:6px;font-size:11px;cursor:pointer;width:200px;}
  .go-to-cart-button:hover{opacity:0.8;}
  
  .faq-chat-button{background:#20A4EC;color:#fff;padding:8px 16px;border:none;border-radius:9999px;font-size:var(--body-font-size);cursor:pointer;}
  .faq-chat-button:hover{opacity:0.9;}
  
  .search-placeholder{pointer-events:none;}
  
  @media screen and (min-width: 561px) {
      [data-pc-fontsize="44px"] {
          font-size: 44px;
      }
  }
  @media screen and (min-width: 561px) {
      [data-pc-fontsize="44px"] {
          font-size: 44px;
      }
      [data-pc-fontsize="32px"] {
          font-size: 32px;
      }
      [data-pc-fontsize="22px"] {
          font-size: 22px;
      }
  }
  
  .chatbot-toggle-button-style {
      background-color: var(--chatbot-main-color);
      color: #fff;
      border: none;
      border-radius: 50px;
      padding: 12px 20px;
      cursor: pointer;
      box-shadow: 0 4px 12px --chatbot-shadow-color;
      display: flex;
      align-items: center;
  }
  
  .demo-container {
      position: relative;
      display: inline-block;
  }
  
  .demo-button {
      padding: 12px 24px;
      background: #007bff;
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 16px;
  }
  
  #search-popup {
      display: none;
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%) translateY(-12px);
      
      /* 背景とグラデーション */
      background: linear-gradient(135deg, #20a4ec 0%, #1890d9 100%);
      
      /* 影とグロー効果 */
      box-shadow: 
          0 10px 30px rgba(32, 164, 236, 0.4),
          0 0 20px rgba(24, 144, 217, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.2);
      
      /* ボーダーとサイズ */
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 16px;
      padding: 16px 24px;
      
      /* テキストスタイル */
      color: #ffffff;
      font-size: 16px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      white-space: nowrap;
      
      /* レイアウト */
      z-index: 999;
      
      /* アニメーション */
      animation: popupGlow 2s ease-in-out infinite alternate;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  /* グロー効果のアニメーション */
  @keyframes popupGlow {
      0% {
          box-shadow: 
              0 10px 30px rgba(32, 164, 236, 0.4),
              0 0 20px rgba(24, 144, 217, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
      }
      100% {
          box-shadow: 
              0 15px 40px rgba(32, 164, 236, 0.6),
              0 0 30px rgba(24, 144, 217, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
      }
  }
  
  /* 矢印（吹き出し効果） */
  #search-popup::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 12px solid transparent;
      border-right: 12px solid transparent;
      border-top: 12px solid #20a4ec;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  }
  
  /* ホバー効果 */
  #search-popup:hover {
      transform: translateX(-50%) translateY(-16px) scale(1.05);
      animation-play-state: paused;
      box-shadow: 
          0 20px 50px rgba(32, 164, 236, 0.7),
          0 0 40px rgba(24, 144, 217, 0.6),
          inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  
  /* アイコン追加 */
  #search-popup::before {
      content: '🔍';
      margin-right: 8px;
      font-size: 18px;
      animation: bounce 1.5s ease-in-out infinite;
  }
  
  @keyframes bounce {
      0%, 20%, 50%, 80%, 100% {
          transform: translateY(0);
      }
      40% {
          transform: translateY(-3px);
      }
      60% {
          transform: translateY(-2px);
      }
  }
  
  /* 表示状態 */
  #search-popup.show {
      display: block;
      animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  @keyframes slideIn {
      0% {
          opacity: 0;
          transform: translateX(-50%) translateY(10px) scale(0.8);
      }
      100% {
          opacity: 1;
          transform: translateX(-50%) translateY(-12px) scale(1);
      }
  }
  
  /* パルス効果 */
  .pulse-ring {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      height: 100%;
      border: 3px solid rgba(255, 255, 255, 0.5);
      border-radius: 16px;
      animation: pulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
  }
  
  @keyframes pulse {
      0% {
          transform: translate(-50%, -50%) scale(1);
          opacity: 1;
      }
      100% {
          transform: translate(-50%, -50%) scale(1.2);
          opacity: 0;
      }
  }
  
  /* デモ用コントロール */
  .controls {
      margin-top: 30px;
      text-align: center;
  }
  
  .toggle-btn {
      padding: 10px 20px;
      background: #28a745;
      color: white;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      margin: 0 10px;
      font-size: 14px;
      transition: background 0.3s;
  }
  
  .toggle-btn:hover {
      background: #218838;
  }

  /* ❶ ハンバーガーボタン（初期は非表示にして SP のみ表示） */
.category-toggle-btn {
    position: fixed;
    top: 11px;
    left: 8px;
    z-index: 1100;
    width: 32px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: none;            /* PC では非表示 */
  }
  .category-toggle-btn span {
    display: block;
    width: 100%;
    height: 4px;
    margin: 4px 0;
    background: #333;
    transition: transform .3s, opacity .3s;
  }
  
  /* ❷ 開閉アニメーション（×印） */
  .category-toggle-btn.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .category-toggle-btn.is-open span:nth-child(2) {
    opacity: 0;
  }
  .category-toggle-btn.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* ❸ SP 向けレイアウト（560px 以下） */
  @media screen and (max-width: 560px) {
    .category-menu-header {
      text-align: center;
    }
    .category-toggle-btn {          /* SP で表示 */
        display: block;
        left: auto;
        right: 8px;
        z-index: 9999;
    }
  
    .side-bar-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 75%;
        max-width: 80%;
        background: #fff;
        box-shadow: -2px 0 8px rgba(0,0,0,.15); /* 影を左側へ */
        overflow-y: auto;
        transform: translateX(100%);   /* 画面外（右）へ退避 */
        transition: transform .3s ease;
        z-index: 1050;
        pointer-events: none;
    }
    .side-bar-wrapper.is-open {
        transform: translateX(0);
        pointer-events: auto;
    }
  }