/* アコーディオン全体 */
.wbps .wbps-accordion {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow:hidden;
}

.wbps .wbps-acc + .wbps-acc {
  border-top: 1px solid #eee;
}

/* 見出し（button） */
.wbps .wbps-acc-header{
  all: unset;
  align-items:center;
  background:#fafafa;
  box-sizing:border-box;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  padding:14px 16px;
  width:100%;
}

.wbps .wbps-acc-header:active {
  border: none;
  box-shadow: none;
  outline: none;
}

.wbps .wbps-acc-left {
  align-items: center;
  display: flex;
  gap: 10px; 
}

.wbps .wbps-acc-title {
  font-weight: 600; 
}

.wbps .wbps-acc-icon {
  transition: transform .2s ease; 
}

.wbps .wbps-acc-header[aria-expanded="true"] .wbps-acc-icon {
  transform: rotate(45deg); 
}

.wbps .wbps-acc-check {
  accent-color:#2271b1; 
  pointer-events: none;
}

/* パネル */
.wbps .wbps-acc-panel {
  background:#fff;
  padding: 0 16px 14px;
}

/* 項目リスト */
.wbps .wbps-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 詳細項目 */
.wbps .wbps-item{
  align-items: flex-start;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
  padding: 10px 0 10px 28px;
}

.wbps .wbps-item:last-child {
  border-bottom: none;
}

.wbps .wbps-item-left {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  flex:1;
}

.wbps .wbps-item-check {
  accent-color: #2271b1;
  margin-top: 3px;
}

.wbps .wbps-item-name {
  font-weight: 500;
}

.wbps .wbps-item-suffix {
  font-size: .8em;
}

.wbps .wbps-item-meta {
  color:#666;
  font-size: .92em;
  margin-top:4px;
}

/* 追加条件（is_additional=1） */
.wbps .wbps-condline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.wbps .wbps-cond-input{
  border: 1px solid #ddd;
  border-radius: 6px;
  max-width: 45vw;
  padding: 6px 8px;
  width: 140px;
}

.wbps .wbps-cond-suffix {
  color: #444;
}

/* 数量 */
.wbps .wbps-qtyline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.wbps .wbps-qty-input{
  border: 1px solid #ddd;
  border-radius:6px;
  max-width: 35vw;
  padding: 6px 8px;
  width: 110px;
}

.wbps .wbps-qty-suffix {
  color: #444;
}

/* 料金（数量の下／チェック時のみ表示） */
.wbps .wbps-item-price{
  color: #222;
  display: none;
  font-weight: 600;
  margin-top: 6px;
}

/* === 合計パネル（親内で下部 sticky）=== */
.wbps-summary {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  bottom: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: none;
  font-family: inherit;
  margin-top: 1em;
  margin-left: auto;
  opacity: 0;
  overflow: hidden;
  position: sticky;
  transform: translateY(100%);
  transition: transform .3s ease, opacity .3s ease;
  width: 360px;
  z-index: 10;
}

@media (max-width: 768px) {
  .wbps-summary {
    margin-left: 0;
    width: 100%;
  }
}

/* 表示可能状態（高さを持つ） */
.wbps-summary.is-visible {
  display: block;
}

/* スライドイン完了 */
.wbps-summary.is-visible.is-open {
  opacity: 1;
  transform: translateY(0);
}

.wbps-summary-inner {
  display: grid;
  grid-template-rows: auto 1fr;
  max-height: 60vh;
}

/* 見出しはトグル（開閉アコーディオン） */
.wbps-summary-head {
  align-items: center;
  background: #f6f8fa;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  font-weight: 700;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
  user-select: none;
}

.wbps-summary-title {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.wbps-summary-caret {
  display: inline-block;
  font-size: .9em;
  line-height: 1;
  transition: transform .2s ease;
}

.wbps-summary.is-collapsed .wbps-summary-caret {
  transform: rotate(0deg);
}

.wbps-summary.is-visible:not(.is-collapsed) .wbps-summary-caret {
  transform: rotate(180deg);
}

.wbps-summary-total {
  margin-left: auto;
  font-weight: 800;
}

.wbps-summary-body {
  max-height: 0;
  overflow: hidden;
  padding: 10px 14px;
  transition: max-height .25s ease, padding .2s ease;
}

.wbps-summary.is-collapsed .wbps-summary-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.wbps-summary.is-visible:not(.is-collapsed) .wbps-summary-body {
  max-height: 42vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.wbps-summary:not(.is-collapsed) .wbps-summary-body {
  max-height: 42vh;
}

.wbps-summary-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wbps-summary-item + .wbps-summary-item {
  border-top: 1px dashed #eee;
  margin-top: 8px;
  padding-top: 8px;
}

.wbps-summary-item-name {
  font-weight: 600;
}

.wbps-summary-item-meta {
  color: #555;
  display: flex;
  font-size: .95em;
  gap: 12px;
  justify-content: space-between;
  margin-top: 4px;
}

.wbps-summary-item-sub {
  white-space: nowrap;
}