/*
 Theme Name:   Botiga Child
 Template:     botiga
 Version:      1.0.0
*/

/* 子テーマ用のカスタムCSSはここから下に記述 */

/* ----------------------------------------------------------
   Section 2 : 豪華カード型タブ（vbl-kind-tab / vbl-tabs）
   ---------------------------------------------------------- */

/* ============================
   基本配色（共通変数）
============================ */
:root {
  --vbl-primary: #5b35d5;
  --vbl-border:  #d7d7e0;
  --vbl-bg:      #fff;
  --vbl-bg-hover:#f6f6fb;
  --vbl-text:    #333;
}

/* ============================
   タブ列（左右矢印付きのスクロール帯）
============================ */
.vbl-tabs-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem; /* 左矢印 | タブ帯 | 右矢印 */
  align-items: center;
  gap: .35rem;
  margin-bottom: .5rem;
  width: 100%;
  min-width: 0; /* Grid子要素のはみ出し防止 */
  overflow: hidden;
}

.vbl-tabs-row > .vbl-tabs {
  min-width: 0;
}

/* 帯そのもの */
.vbl-kind-tab-wrap.vbl-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: .6rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: .25rem;
  width: 100%;
  max-width: 100%;
  scrollbar-width: none;
}
.vbl-kind-tab-wrap.vbl-tabs::-webkit-scrollbar {
  display: none;
}

/* ============================
   矢印ボタン
============================ */
.vbl-tabs-arrow {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e2e2ee;
  border-radius: 999px;
  background: #fff;
  color: var(--vbl-primary);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, opacity .15s;
}
.vbl-tabs-arrow:hover {
  background: #f4f1ff;
  border-color: #d7d7ef;
}
.vbl-tabs-arrow[disabled] {
  opacity: .35;
  cursor: default;
}

/* ============================
   カード型タブ本体
============================ */
.vbl-kind-tab {
  flex: 0 0 auto;
  width: clamp(120px, calc((100% - 1.2rem) / 3), 180px);
  scroll-snap-align: start;

  border: 1px solid var(--vbl-border);
  background: var(--vbl-bg);
  color: var(--vbl-text);
  border-radius: 14px;

  padding: .5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  cursor: pointer;

  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.vbl-kind-tab:hover {
  background: var(--vbl-bg-hover);
}

.vbl-kind-tab.active,
.vbl-kind-tab.is-active {
  background: var(--vbl-primary);
  color: #fff;
  border-color: var(--vbl-primary);
  box-shadow: 0 2px 10px rgba(91,53,213,.25);
}

/* ============================
   画像エリア（正方形の大きい画像）
============================ */
.vbl-tab__thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形 */
  border-radius: 10px;
  overflow: hidden;
  background: #f2f2f7;
}

.vbl-tab__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 中心トリミング */
  display: block;
}

/* 種類名ラベル（上に重ねる） */
.vbl-tab__caption {
  position: absolute;
  inset: 0 0 auto 0; /* 上全体 */
  padding: .35rem .5rem;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  text-align: center;

  background: linear-gradient(
    180deg,
    rgba(0,0,0,.55),
    rgba(0,0,0,0)
  );
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.vbl-kind-tab.active .vbl-tab__caption {
  color: #fff;
}

/* ============================
   金額表示（画像下に太字で）
============================ */
.vbl-tab__price {
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  opacity: .98;
  margin-top: 0;
}

.vbl-kind-tab.active .vbl-tab__price {
  color: #fff;
}

/* ============================
   スマホ時：少しだけ幅を調整
============================ */
@media (max-width: 430px) {
  .vbl-kind-tab {
    width: clamp(110px, calc((100% - 1rem) / 3), 150px);
  }
}

/* ----------------------------------------------------------
   Section 3 : 種類カード UI（kind-card）
   ---------------------------------------------------------- */

/* カード本体 */
.kind-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: box-shadow .15s, transform .1s;
}

/* ホバー時のアクセント（任意） */
.kind-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

/* カード内ヘッダー（名前・価格） */
.kind-card__header {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kind-card__name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.kind-card__price {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.3;
}

/* 画像部分（共通） */
.kind-card__image {
  margin-top: auto;
  width: 100%;
  background: #f7f7f7;
}

/* 実画像 */
.kind-card__image img {
  width: 100%;
  height: 150px;        /* 高さを統一 */
  object-fit: cover;    /* 中央トリミング */
  display: block;
}

/* 画像なし時のプレースホルダー */
.kind-card__image--placeholder {
  width: 100%;
  height: 150px;
  background: #f7f7f7;
  display: grid;
  place-items: center;
  color: #999;
  font-size: 14px;
}

/* ----------------------------------------------------------
   Section 4 : カートページ（テーブル版 UI）
   ---------------------------------------------------------- */

/* テーブル全体（横幅いっぱい / 枠なし / コンパクト） */
.viblien-cart-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.viblien-cart-table th,
.viblien-cart-table td {
  padding: 4px 6px;
  border: none;
  white-space: nowrap;
}

/* 画像 */
.viblien-cart-table td img {
  width: 80px;
  height: auto;
  display: block;
}

/* 価格・小計・合計など右寄せ */
.viblien-cart-table td.price,
.viblien-cart-table td.total,
.viblien-cart-table td.group-total,
.viblien-cart-table td.row-subtotal {
  text-align: right;
}

/* 数量入力（フィットさせる） */
.viblien-cart-table input[type="number"].qty {
  width: 4.5ch;
  min-width: 0;
  height: 26px;
  padding: 2px 4px;
  box-sizing: border-box;
  text-align: center;
}

/* 数量 + 削除リンク（横並び） */
.viblien-cart-table td.qty .qty-remove {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.viblien-cart-table td.qty .remove-mini {
  font-size: 12px;
  color: #777;
  text-decoration: underline;
  cursor: pointer;
}
.viblien-cart-table td.qty .remove-mini:hover {
  color: #333;
}

/* 種類が変わる境目（太めの線） */
.viblien-cart-table tr.kind-separator td {
  border-top: 2px solid #e5e5e5;
}
/* 表の最上段は太線にならないように */
.viblien-cart-table tbody tr.kind-separator:first-child td {
  border-top: none;
}

/* 行の高さ調整（Botiga上書き対策） */
.woocommerce-cart tr.cart_item td {
  padding: 2px 5px;
}

/* ===== 左側（テーブル）、右側（合計） ===== */
.viblien-cart-left {
  flex: 1 1 auto;
  min-width: 0;
}
.viblien-cart-right {
  flex: 0 0 320px;   /* 好みに応じて 300〜360px */
  max-width: 360px;
  min-width: 280px;
}

/* 右側パネルの余計な枠を消す */
.viblien-cart-right .cart_totals,
.viblien-cart-right .wc-block-cart-totals,
.viblien-cart-right .wp-block-woocommerce-cart-totals-block {
  border: none;
  box-shadow: none;
  margin: 0;
}
/* ===== ブレークポイント：スマホはカードUIへ ===== */
@media (max-width: 960px) {
  .viblien-cart-wrap {
    flex-direction: column;
  }

  .viblien-cart-left,
  .viblien-cart-right {
    width: 100%!important;
    max-width: 100%;
    flex: none;
    min-width: 0;
  }
}
@media (max-width: 640px) {
  .viblien-cart-left {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .viblien-cart-table {
    min-width: 720px; /* 列数に応じて調整 */
  }
}

/* ----------------------------------------------------------
   Section 5 : スマホ用カートカード UI（viblien-cart-cards）
   ---------------------------------------------------------- */

/* PC では非表示、スマホで表示 */
.viblien-cart-left .viblien-cart-cards {
  display: none;
}

@media (max-width: 768px) {
  .viblien-cart-left .viblien-cart-table {
    display: none;          /* 表形式は非表示 */
  }
  .viblien-cart-left .viblien-cart-cards {
    display: block;         /* カード方式を表示 */
  }
}

/* ===== カード本体 ===== */
.viblien-card {
  border: 1px solid #e6e6e9;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  margin: 12px 0 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

/* 上段：画像 + 種類名 */
.viblien-card-header {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.viblien-card-title {
  font-weight: 700;
  font-size: 15px;
}
.viblien-card-meta {
  color: #666;
  font-size: 12px;
  margin-top: 2px;
}
.viblien-card-price {
  font-weight: 600;
  margin-top: 6px;
  color: #5a2ea6; /* 紫アクセント */
}

/* ===== サイズ行 ===== */
.size-block {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #eee;
}

/* サイズ行の1段目：サイズ名 + 数量横並び */
.size-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.size-label {
  font-weight: 600;
}

/* サイズ行の小計 */
.size-subtotal {
  margin-top: 6px;
  font-weight: 700;
  text-align: right;
}

/* 削除リンク */
.size-actions {
  margin-top: 4px;
  text-align: right;
}
.size-actions .remove-mini {
  font-size: 12px;
  color: #888;
  text-decoration: underline;
}
.size-actions .remove-mini:hover {
  color: #333;
}

/* ===== 数量UI（＋・入力・ー） ===== */
.quantity input.qty {
  min-width: 64px;
  height: 27px;
  text-align: center;
  font-size: 15px;
}
.quantity .minus,
.quantity .plus {
  min-width: 36px;
  height: 27px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.quantity .minus:active,
.quantity .plus:active {
  transform: scale(0.95);
}

/* ===== カード内の合計 ===== */
.card-total {
  margin-top: 10px;
  padding-top: 10px;
  font-weight: 700;
  text-align: right;
}

/* ----------------------------------------------------------
   Section 6 : チェックアウト - 注文内容レビュー表
   ---------------------------------------------------------- */

/* 表：全体整形 */
.viblien-review-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

/* 文字揃え（見出し中央） */
.viblien-review-order-table thead th {
  text-align: center !important;
  padding: 6px 4px;
}

/* 数量・小計などは右寄せ */
.viblien-review-order-table td,
.checkout-wrapper .product-total {
  text-align: right;
  padding: 6px 4px;
}

/* 商品名系だけ左寄せ */
.viblien-review-order-table td.product-name {
  text-align: left;
}

/* 配送方法(method)は左寄せ */
.viblien-review-order-table td.method {
  text-align: left !important;
  vertical-align: middle;
  white-space: nowrap;
}
.viblien-review-order-table td.method .method__label {
  display: inline-block;
  line-height: 1.3;
}

/* ----------------------------------------
   種類ラベル（画像左上に重ねる） ← 維持
---------------------------------------- */
.viblien-review-order-table td.kind {
  vertical-align: top;
}

/* ラッパー：相対位置指定 */
.viblien-review-order-table .kind-cell {
  position: relative;
  display: inline-block;
}

/* 種類画像 */
.viblien-review-order-table .kind-cell__img {
  max-width: 70px;
  height: auto;
  display: block;
}

/* 種類名ラベル（画像上に重ねる） */
.viblien-review-order-table .kind-cell__label {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.55);
  border-radius: 4px;
  line-height: 1.2;
  pointer-events: none;
}

/* スマホは少し小さく */
@media (max-width: 480px) {
  .viblien-review-order-table .kind-cell__img {
    max-width: 56px;
  }
  .viblien-review-order-table .kind-cell__label {
    font-size: 11px;
    padding: 2px 5px;
  }
}

/* ----------------------------------------------------------
   Section 7 : サイズテーブル（vbl-size-table）
   ---------------------------------------------------------- */

/* テーブル全体 */
.vbl-size-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: fit-content;          /* 中身にフィットさせる */
  border: 2px solid #333;      /* 外枠の太線 */
}

/* タイトル（caption） */
.vbl-size-table > caption.viblien-size-table-title {
  caption-side: top;
  padding: .5rem 0;
  font-weight: 700;
  border-bottom: 2px solid #333;   /* タイトルの下も太線 */
  margin: 0;
}

/* thead：ヘッダー下にも太線 */
.vbl-size-table thead th {
  border-bottom: 2px solid #333;
  background: #fff;
  text-align: center;
  padding: .5rem .75rem;
}

/* === 1列目：サイズ列（最小化） === */
.vbl-size-table th:nth-child(1),
.vbl-size-table td:nth-child(1) {
  width: 1%;                 /* 可能な限り縮める */
  white-space: nowrap;       /* 改行させない */
}

/* === 2列目・3列目：等幅、中央揃え === */
.vbl-size-table th:nth-child(2),
.vbl-size-table td:nth-child(2),
.vbl-size-table th:nth-child(3),
.vbl-size-table td:nth-child(3) {
  width: 10rem;              /* ご希望の固定幅（変更OK） */
  text-align: center;
}

/* === 本文セル === */
.vbl-size-table tbody td {
  border: 1px solid #dcdcdc; /* 本文は細線 */
  vertical-align: middle;
  background: #fff;          /* 画像透過時の抜け防止 */
 }
.vbl-table th, .vbl-table td {
    padding-top: 0px;
    padding-bottom: 0px;
}
	
/* === Inputはセル幅いっぱいに広げる === */
.vbl-size-table input[type="number"],
.vbl-size-table input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

/* === 数量UI（中央揃え・共通仕様） === */
.vbl-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.vbl-qty-input {
  width: 48px;
  text-align: center;
  font-size: 16px;
}

.vbl-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.woocommerce-cart-form .quantity {
        height: 27px;
    }

.woocommerce-cart .cart_totals h2 {
    font-size: initial;
}

.viblien-cart-wrap {
  display: flex;
  gap: 20px; /* 左右の間隔（お好みで調整） */
}

.viblien-cart-left {
  width: 80%;
}

.viblien-cart-right {
  width: 20%;
}


.vbl-qty-btn:active {
  transform: scale(0.95);
}

.vbl-size-table {
    border: 0;
}

  transform: translateY(0);

	

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}
/* テキストリンクのベース */
.vbl-text-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: #0a66c2;           /* 通常時の青（例: LinkedIn系の青） */
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}

/* 訪問済みの色（必要なければ通常色と同じに） */
.vbl-text-link:visited {
  color: #0a66c2;
}

/* ホバー時（色を少し濃く） */
.vbl-text-link:hover {
  color: #004182;
  text-decoration: underline;
}

/* クリック時（さらに濃く） */
.vbl-text-link:active {
  color: #00315f;
}

/* キーボード操作のフォーカス可視化（アクセシビリティ） */
.vbl-text-link:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ギャラリー画像をrelativeに */
.woocommerce-product-gallery__image {
  position: relative;
}

/* kindラベル */
.gallery-kind-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;

  background: rgba(0, 0, 0, 0.5); /* 黒 50% */
  color: #fff;
  font-weight: 700;
  font-size: 14px;

  padding: 6px 12px;
  border-radius: 14px;

  backdrop-filter: blur(2px); /* 少し高級感 */
  -webkit-backdrop-filter: blur(2px);

  letter-spacing: .05em;
  pointer-events: none;
}

